Re: Crash with Python bindings

Subject:Re: Crash with Python bindings

Date:Fri, 16 Mar 2018 08:59:44 -0300

To:W. Trevor King ,Justus Winter

Cc:notmuch@notmuchmail.org

From:David Bremner


"W. Trevor King" <wking@tremily.us> writes:

> you can avoid the abort (which happens when q.__del__ is called after
> db.__del__).  We could make that sort of cleanup easier with context
> managers for Query objects (we have them for databases since [3]), and
> they look like the only object that keep an internal database
> reference:
>
>   with Database() as db:
>     with Query(db, "*") as q:
>       # do something with q
>     db.close()
>

I'm reminded [1] that this problem still exists. If noone has any idea
of a fix, should we document one of the workarounds?

      
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893057
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: