Re: segfault using python bindings

2019-08-26 Thread David Bremner
Floris Bruynooghe writes: > > I'll try and send a first patch series in the coming week. > Sounds great. Thanks for you work on this, and for not being scared of by the bikeshedding ;). d ___ notmuch mailing list notmuch@notmuchmail.org

Re: segfault using python bindings

2019-08-26 Thread Floris Bruynooghe
On Wed 21 Aug 2019 at 12:02 -0400, Daniel Kahn Gillmor wrote: > On Tue 2019-08-20 19:20:30 +0200, Floris Bruynooghe wrote: >> For path series what did you have in mind? One single patch with the >> whole lot? The original history at https:://github/flub/notdb? >> Something in between? > > I

Re: segfault using python bindings

2019-08-23 Thread Rollins, Jameson
On Fri, Aug 23 2019, Daniel Kahn Gillmor wrote: > that matches my understanding too. i'd love to move forward with the > improved bindings, under a different name. > > if someone later figures out the compatibility layer that allows > implementation of the traditional "notmuch" module api atop

Re: segfault using python bindings

2019-08-23 Thread Daniel Kahn Gillmor
On Fri 2019-08-23 09:07:12 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> The other possibility would be to implement the old "notmuch" API on top >> of the new one with explicitly logged deprecations. But iirc, the >> semantics and object lifecycle/ownership issues are subtly

Re: segfault using python bindings

2019-08-23 Thread David Bremner
Daniel Kahn Gillmor writes: > The other possibility would be to implement the old "notmuch" API on top > of the new one with explicitly logged deprecations. But iirc, the > semantics and object lifecycle/ownership issues are subtly different > enough that this would be a non-trivial project.

Re: segfault using python bindings

2019-08-22 Thread Daniel Kahn Gillmor
On Thu 2019-08-22 19:37:34 +, Rollins, Jameson wrote: > Ug, this naming issue is unfortunate. I don't really like "notmuch3" as > a reference to python 3, honestly. how about notmuch3000? :P > What about making these new bindings only for python3, and the old ones > relegating to python2,

Re: segfault using python bindings

2019-08-22 Thread David Bremner
"Rollins, Jameson" writes: > What about making these new bindings only for python3, and the old > ones relegating to python2, and then just using the same name? Is > that too confusing? I imagine it can be done to have 'import notmuch' redirect to different things under python3 and python2.

Re: segfault using python bindings

2019-08-22 Thread Rollins, Jameson
On Thu, Aug 22 2019, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> (i also find "notmuch2" rather unsatisfying, but python doesn't have a >> meaningful versioning system for backwards-incompatible API changes for >> its modules, so this kind of name augmentation is the only strategy

Re: segfault using python bindings

2019-08-22 Thread David Bremner
Daniel Kahn Gillmor writes: > > (i also find "notmuch2" rather unsatisfying, but python doesn't have a > meaningful versioning system for backwards-incompatible API changes for > its modules, so this kind of name augmentation is the only strategy i'm > aware of). Naming is hard. What about

Re: segfault using python bindings

2019-08-21 Thread Daniel Kahn Gillmor
On Tue 2019-08-20 19:20:30 +0200, Floris Bruynooghe wrote: > Sounds reasonable, just a quick note that I'm on holiday at the moment > and generally won't be too quick. But I guess there's no rush. I was > also trying to improve the docs but got sidetracked at some point. > There should be

Re: segfault using python bindings

2019-08-20 Thread Floris Bruynooghe
On Thu 15 Aug 2019 at 09:28 -0300, David Bremner wrote: > Floris Bruynooghe writes: > >> On Wed 14 Aug 2019 at 16:20 -0300, David Bremner wrote: >>> >>> Can you remind me what the percieved blockers are for merging into the >>> main notmuch tree? I'm less hung up on python2 compatibility than I

Re: segfault using python bindings

2019-08-15 Thread David Bremner
Floris Bruynooghe writes: > On Wed 14 Aug 2019 at 16:20 -0300, David Bremner wrote: >> >> Can you remind me what the percieved blockers are for merging into the >> main notmuch tree? I'm less hung up on python2 compatibility than I used >> to be, fwiw. I'd be ok with shipping the old python2

Re: segfault using python bindings

2019-08-15 Thread Floris Bruynooghe
On Wed 14 Aug 2019 at 16:20 -0300, David Bremner wrote: > Floris Bruynooghe writes: > >> These are at https://github.com/flub/notmuch/tree/cffi/bindings/python-cffi >> >> I'm not really convinced of the way forward last time it was discussed >> on how to get them merged into notmuch itself so

Re: segfault using python bindings

2019-08-14 Thread David Bremner
Floris Bruynooghe writes: > These are at https://github.com/flub/notmuch/tree/cffi/bindings/python-cffi > > I'm not really convinced of the way forward last time it was discussed > on how to get them merged into notmuch itself so have failed to put in > the not insignificant effort. > > I've

Re: segfault using python bindings

2018-11-19 Thread Dirk Van Haerenborgh
Thanks, The documentation regarding lifetime of pointers is indeed at some points rather limited. Is there ever a need for calling thread/message_destroy? >From what I understood, lifetime is like this: Database > Query > Threads > Thread > Messages > Message I assumed that destroying a

Re: segfault using python bindings

2018-11-18 Thread David Bremner
Dirk Van Haerenborgh writes: > This is not a typo. I deliberately duplicated that bit. > The second time it runs that loop, it will always segfault, unless you > omit the first 'notmuch_message_destroy' call. > > Given your example, I suspect the Python3 bindings to do something very > similar.

Re: segfault using python bindings

2018-11-18 Thread Dirk Van Haerenborgh
Hi, I've encountered something very similar just today. But not with python, but my rust bindings. I could very easily reproduce it using: for (messages = notmuch_thread_get_messages (thread); notmuch_messages_valid (messages); notmuch_messages_move_to_next (messages)) { notmuch_message_t

Re: segfault using python bindings

2018-11-16 Thread David Bremner
Floris Bruynooghe writes: >> As I mentioned last time this was discussed, the python bindings are >> currently more or less a core part of notmuch as both the test >> suite and developement need them. > > Sure, I think pypi publishing is orthogonal to this however. Either or > both versions of

Re: segfault using python bindings

2018-11-16 Thread Floris Bruynooghe
On Fri 16 Nov 2018 at 07:15 -0500, Daniel Kahn Gillmor wrote: > On Fri 2018-11-16 06:27:12 -0400, David Bremner wrote: >> Floris Bruynooghe writes: >> >>> These are at https://github.com/flub/notmuch/tree/cffi/bindings/python-cffi >>> >>> I'm not really convinced of the way forward last time it

Re: segfault using python bindings

2018-11-16 Thread Floris Bruynooghe
On Fri 16 Nov 2018 at 06:29 -0400, David Bremner wrote: > Brian May writes: > >> Floris Bruynooghe writes: >> >>> I've since wondered if just getting them standalone on pypi is perhaps a >>> useful service in the mean time as it's relatively little effort. And >>> if there eventually is a

Re: segfault using python bindings

2018-11-16 Thread Daniel Kahn Gillmor
On Fri 2018-11-16 06:27:12 -0400, David Bremner wrote: > Floris Bruynooghe writes: > >> These are at https://github.com/flub/notmuch/tree/cffi/bindings/python-cffi >> >> I'm not really convinced of the way forward last time it was discussed >> on how to get them merged into notmuch itself so have

Re: segfault using python bindings

2018-11-16 Thread David Bremner
Brian May writes: > Floris Bruynooghe writes: > >> I've since wondered if just getting them standalone on pypi is perhaps a >> useful service in the mean time as it's relatively little effort. And >> if there eventually is a desire again to get them merged in some way >> that could still be

Re: segfault using python bindings

2018-11-16 Thread David Bremner
Floris Bruynooghe writes: > > These are at https://github.com/flub/notmuch/tree/cffi/bindings/python-cffi > > I'm not really convinced of the way forward last time it was discussed > on how to get them merged into notmuch itself so have failed to put in > the not insignificant effort. > > I've

Re: segfault using python bindings

2018-11-15 Thread Floris Bruynooghe
Hi, On Sun 11 Nov 2018 at 16:16 -0400, David Bremner wrote: > David Čepelík writes: > >> Hello Notmuch devs, >> >> I'm facing an issue trying to use the Python bindings. This trivial >> piece of code segfaults: >> >> import notmuch > > I don't remember the details [1], but there are known

Re: segfault using python bindings

2018-11-11 Thread Gaute Hope
David Bremner writes on November 11, 2018 21:16: [1]: There is some discussion in the list archives. See id:87lg5z74l3@tethera.net Regards, Gaute ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

Re: segfault using python bindings

2018-11-11 Thread David Bremner
David Čepelík writes: > Hello Notmuch devs, > > I'm facing an issue trying to use the Python bindings. This trivial > piece of code segfaults: > > import notmuch I don't remember the details [1], but there are known conflicts between recent versions of python3 and the way the notmuch python

segfault using python bindings

2018-11-09 Thread David Čepelík
Hello Notmuch devs, I'm facing an issue trying to use the Python bindings. This trivial piece of code segfaults: import notmuch database = notmuch.Database() threads = database.create_query('tag:inbox and not tag:killed').search_threads() for t in threads: