segfault using python bindings

David Bremner david at
Thu Aug 22 17:09:30 PDT 2019

"Rollins, Jameson" <jrollins at> 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.  Conceptually the two uses would
something like

| #!/usr/bin/python2.7
| import notmuch
| code1


| #!/usr/bin/python3
| import notmuch
| code2

It would break the naming logjam, but there are a few potential points
of confusion.

1) it requires gluing together the two sets bindings somehow,
complicating things like making a sensible

2) if I remember correctly, the differences in the API are going to
force code1 and code2 to be pretty different (hopefully Floris can
correct me here if I'm wrong). That might also make errors a bit
confusing if people get the interpreter wrong.

3) It would also probably complicate documenting both sets of
bindings. How would we make clear in the installed documentation which
was which?

> Do we need to maintain both concurrently?

I guess it depends a bit what you mean by 'maintain'. I do think we need
a transition period before we stop shipping the current bindings, as
several projects (and probably lots of smaller scripts) rely on them.
We might not be too motivated to add new features to the python2
bindings, but I guess we would probably fix any serious-enough bugs.

More information about the notmuch mailing list