Created attachment 653446 [details] Fixed ebuild Hello, I am working a package (mail-client/alot), that use notmuch, on the last bump, the test suite fail to run (worked before). Here a example of the error when running the test suite: ====================================================================== ERROR: tests.widgets.test_globals (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tests.widgets.test_globals Traceback (most recent call last): File "/usr/lib64/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.6/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/tests/widgets/test_globals.py", line 22, in <module> from alot.widgets import globals as globals_ File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/widgets/globals.py", line 14, in <module> from ..db.attachment import Attachment File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/__init__.py", line 4, in <module> from .thread import Thread File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/thread.py", line 6, in <module> from .message import Message File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/message.py", line 10, in <module> from notmuch import NullPointerError ModuleNotFoundError: No module named 'notmuch'====================================================================== ERROR: tests.widgets.test_globals (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tests.widgets.test_globals Traceback (most recent call last): File "/usr/lib64/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.6/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/tests/widgets/test_globals.py", line 22, in <module> from alot.widgets import globals as globals_ File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/widgets/globals.py", line 14, in <module> from ..db.attachment import Attachment File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/__init__.py", line 4, in <module> from .thread import Thread File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/thread.py", line 6, in <module> from .message import Message File "/var/tmp/portage/mail-client/alot-0.9.1/work/alot-0.9.1/alot/db/message.py", line 10, in <module> from notmuch import NullPointerError ModuleNotFoundError: No module named 'notmuch' An other proxymaintainer (janko_j2) found a workaround: └─> diff -up notmuch-0.30.ebuild notmuch-0.30-1.ebuild --- notmuch-0.30.ebuild 2020-07-24 22:46:18.013401187 +0200 +++ notmuch-0.30-1.ebuild 2020-08-06 23:07:59.114650168 +0200 @@ -88,6 +88,12 @@ bindings() { rc=${?} popd || die fi + if use python; then + pushd bindings/python || die + ${@} + rc=${?} + popd || die + fi return ${rc} } From what I can tell this change is new in notmuch-0.30, and was not in notmuch-0.29.3-r2 which was working.
Created attachment 653448 [details] Diff between notmuch versions 29 and 30. [ebuild N ] net-mail/notmuch-0.29.3-r2:0/5::gentoo USE="crypt python -doc -emacs -mutt -nmbug -test -valgrind" PYTHON_TARGETS="python3_6 python3_7" 646 KiB [ebuild U ] net-mail/notmuch-0.30:0/5::gentoo [0.29.3-r2:0/5::gentoo] USE="crypt python -doc -emacs -mutt -nmbug -test -valgrind" PYTHON_TARGETS="python3_6 python3_7 python3_8%*" 696 KiB Difference in installed files is attached as a file, because it makes the comment too long for Bugzilla. Looks like "notmuch" changed to "notmuch2" in site-packages.
This is working as expected, see my comment for commit a1a1d15c423ca60bfc83e559a3efd82e05bc1f26. Upstream has introduced new Python bindings. net-mail/notmuch: Bump to version 0.30 Feature release 0.30, see https://notmuchmail.org/news/ . This ebuild adds support for Python 3.8 and for the new Python CFFI bindings (package name "notmuch2").
Hey, thank you both for the update, I found the release note about this module name change. I guess there is no issue, and alot is already working on that https://github.com/pazz/alot/pull/1511
(In reply to Ralph Seichter from comment #2) > This is working as expected, see my comment for commit > a1a1d15c423ca60bfc83e559a3efd82e05bc1f26. Upstream has introduced new Python > bindings. > > net-mail/notmuch: Bump to version 0.30 > > Feature release 0.30, see https://notmuchmail.org/news/ . > This ebuild adds support for Python 3.8 and for the new > Python CFFI bindings (package name "notmuch2"). It adds support for the new bindings but removes support for the old ones. They are still there: https://git.notmuchmail.org/git?p=notmuch;a=tree;f=bindings/python;h=2143d63b3687aaee8f32fe901f20c05b836a3cd6;hb=HEAD The module is named differently (notmuch vs. notmuch2) so installing in parallel should be possible. archlinux manages it, so I am sure also gentoo can do it ;) Probably introduce a new USE-Flag "deprecated" that will build the old bindings if enabled?
(In reply to Franz Trischberger from comment #4) > The module is named differently (notmuch vs. notmuch2) so installing in > parallel should be possible. archlinux manages it, so I am sure also gentoo > can do it ;) > Probably introduce a new USE-Flag "deprecated" that will build the old > bindings if enabled? I'd say always install them, since notmuch2 is not backwards-compatible with notmuch from what I've gathered. So this won't break anything.
The need for new Python bindings, and the subsequent development and calls for testing, have been discussed on the Notmuch mailing list at least since 2018. See for example the Tread started with message <154177495352.5588.12072713055654441286@x1.localdomain>. Among the reasons were segfaults and memory loss issues. The new CFFI based bindings in the "notmuch2" Python package, which the ebuild installs, were written to address the many issues of the old bindings (AFAIK originally developed with Python 2). I don't plan to support known-to-be-broken bindings when an alternative is available, and Guillaume, who filed this report, wrote in comment #3 that he agrees that it is not an issue to use that alternative.
Hey Ralph, first thank you for taking the time to answer this. I said before, 'there is no issue' because I assumed the old binding was not in the source anymore. I was really surprised to do such 'big' change in a minor release, and starting asking / digging more, but I was wrong the source tarball still contain the old binding. (In reply to Ralph Seichter from comment #6) > I don't plan to support > known-to-be-broken bindings when an alternative is available, I understand this stance but I don't agree with it: 1 It is in the source so the user should be able to control it 2 Upstream didn't drop the support of this code, so why should we ? In my use case, packaging tools around notmuch (afew, alot), work as been started but it is still not merged yet, so this situation force me to require '<net-mail/notmuch-0.30', and I would like to avoid that if possible. So please take this opinion in consideration, and let the user control that, a use flag seems reasonable solution, and when upstream drop it for real, we can drop as well.
(In reply to Guillaume Seren from comment #7) > I understand this stance but I don't agree with it That is your right, of course. However, I have deliberately dropped the old, buggy bindings. Rest assured it was not done willy-nilly. > so this situation force me to require '<net-mail/notmuch-0.30', and I > would like to avoid that if possible. As I would like to avoid packaging broken bindings for which an alternative exists. According to the QA reports, there are very few Gentoo packages that depend on net-mail/notmuch, two of which (bower and muchsync) I maintain myself. Two more are based on Go (aerc) or don't use Python bindings (neomutt). The only affected packages are maintained by you (alot and afew), and both need to be updated anyway to support Python 3.8. As a result of that, I won't add the old bindings. If that means you limit yourself to Notmuch 0.29 until you are ready, that's fine by me. Please don't re-open this issue again, it is not a bug.
(In reply to Ralph Seichter from comment #8) > > The only affected packages are maintained by you (alot and afew), and > both need to be updated anyway to support Python 3.8. > It needs notmuch module, which is not available, so it's forced to use notmuch-0.29 without python3.8 support. Come on, this is not too much to ask. Fedora and Arch ship latest notmuch with the "deprecated" module. If you won't update the ebuild adding them back, as upstream intended, I will. And I will consider finding a new maintainer for this package who's willing to cooperate with others working on this distro. You're supposed to make friends, not enemies.
(In reply to Joonas Niilola from comment #9) > > It needs notmuch module, which is not available, so it's forced to use > notmuch-0.29 without python3.8 support. > > Come on, this is not too much to ask. Fedora and Arch ship latest notmuch > with the "deprecated" module. If you won't update the ebuild adding them > back, as upstream intended, I will. And I will consider finding a new > maintainer for this package who's willing to cooperate with others working > on this distro. > > You're supposed to make friends, not enemies. I think we've reached a common consensus with rseichter on this one. He doesn't want to author/commit changes which might break the package, when he's aware of the technical deprecation of them. I on the other think we should try, because Fedora, Arch, openSUSE and Debian install both bindings and it'd make our lives easier here until upstream drops them. So I will take another look at this, and decide whether to commit the change or not tomorrow. And sorry rseichter for threatening to drop this into m-n, I acknowledge you've done a good job maintaining this package, and it'd benefit Gentoo if you kept doing so. I just hope this all serves the Greater Good in the end.
Apology accepted, Joonas, and good luck to you should you decide take a shot at it yourself.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=924742c75fda580701838e7af38d6a7af0db6da3 commit 924742c75fda580701838e7af38d6a7af0db6da3 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2020-08-09 06:44:39 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2020-08-09 07:13:56 +0000 net-mail/notmuch: install deprecated python bindings on 0.30 - There are still some packages in ::gentoo repo that depend on the deprecated 'notmuch' python modules. As other major distributions still provide these bindings, we should enable them too and give some extra time for other upstreams to update into using 'notmuch2'. Closes: https://bugs.gentoo.org/736204 Signed-off-by: Joonas Niilola <juippis@gentoo.org> net-mail/notmuch/{notmuch-0.30.ebuild => notmuch-0.30-r1.ebuild} | 6 ++++++ 1 file changed, 6 insertions(+)