There is a weird failure when building mercurial: $ mock -r fedora-rawhide-x86_64 init [mercurial (master)]$ fedpkg --release master mockbuild -N ... ... installs python3.9-3.9.0~rc1-2.fc34 ... ... make -C doc make[1]: Entering directory '/builddir/build/BUILD/mercurial-5.4/doc' /usr/bin/python3 gendoc.py "hg-ssh.8" > hg-ssh.8.txt.tmp Traceback (most recent call last): File "/builddir/build/BUILD/mercurial-5.4/doc/gendoc.py", line 39, in <module> from mercurial.i18n import ( File "/usr/lib64/python3.9/importlib/util.py", line 245, in __getattribute__ self.__spec__.loader.exec_module(self) SystemError: <built-in function compile> returned NULL without setting an error make[1]: *** [Makefile:22: hg-ssh.8.txt] Error 1 make[1]: Leaving directory '/builddir/build/BUILD/mercurial-5.4/doc' make: *** [Makefile:64: doc] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.j1o0Ut (%build) This did not happen with beta 5: $ koji download-build --rpm python3-3.9.0~b5-2.fc33.x86_64 $ koji download-build --rpm python3-libs-3.9.0~b5-2.fc33.x86_64 $ koji download-build --rpm python3-devel-3.9.0~b5-2.fc33.x86_64 $ mock -r fedora-rawhide-x86_64 install ./python3*-3.9.0~b5-2.fc33.x86_64.rpm [mercurial (master)]$ fedpkg --release master mockbuild -N --disablerepo=\* (builds fine or dies on unrelated emacs error later in the build)
I can reproduce on Fedora 32 outside of mock: $ fedpkg clone mercurial $ cd mercurial $ fedpkg prep $ cd mercurial-5.4 $ cp -a hg hg3 $ PYTHON=/usr/bin/python3.9 make all /usr/bin/python3.9 setup.py build running build running build_mo running build_py running build_ext running build_scripts make -C doc make[1]: Entering directory '/home/churchyard/rpmbuild/fedora-scm/mercurial/mercurial-5.4/doc' /usr/bin/python3.9 gendoc.py "hgrc.5" > hgrc.5.txt.tmp Traceback (most recent call last): File "/home/churchyard/rpmbuild/fedora-scm/mercurial/mercurial-5.4/doc/gendoc.py", line 39, in <module> from mercurial.i18n import ( File "/usr/lib64/python3.9/importlib/util.py", line 245, in __getattribute__ self.__spec__.loader.exec_module(self) SystemError: <built-in function compile> returned NULL without setting an error This will make ti much easier to bisect, but I won't get to it today.
> but I won't get to it today. Couldn't resist. Git bisect says it is: https://github.com/python/cpython/commit/d2bea2636d5f0c2b196966315790af8e79c7bf82 Victor, please make a look.
Just leeting know that the same issue happens on F33 as well.
I reported the issue upstream: https://bugs.python.org/issue41631 It's a Python 3.9 regression. I understand that only projects which monkey-patch the __import__() function, like Mercurial, are impacted.
Note that __import__'s docs do mention that it can be replaced: https://docs.python.org/3/library/functions.html#__import__ Since Python 3.3, doing so is strongly discouraged, but nevertheless it should be possible.
Created attachment 1713421 [details] Workaround for FTBFS on Python 3.9 I was able to build with this one-line patch. I'm not sure whether to call this a workaround or a fix -- that depends on how the CPython issue is solved.
Thanks Petr! We will try it.
Sorry; I meant to post that comment on the Mercurial bug. Here's a PR for mercurial dist-git: https://src.fedoraproject.org/rpms/mercurial/pull-request/12
FEDORA-2020-bc1902e34e has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-bc1902e34e
FEDORA-2020-bc1902e34e has been pushed to the Fedora 33 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-bc1902e34e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-bc1902e34e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
Hello Petr, Could you offer this patch to Mercurial upstream? Possibly with a link to https://bugs.python.org/issue41631 instead of Bugzilla. I'm growing more and more convinced that the patch is the right way to go for Mercurial, and I'd like to hear their opinion. But I'm not very familiar with their bug-reporting process.
Hi Petr, thanks for reminder. Reported: https://bz.mercurial-scm.org/show_bug.cgi?id=6407
This is fixed in Python 3.9.0rc2 (to be released this week).
FEDORA-2020-78bb031321 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-78bb031321
FEDORA-2020-bc1902e34e has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-78bb031321 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.