Fedora Account System
Red Hat Associate
Red Hat Customer
mercurial fails to build with Python 3.15.0a7. + make install-doc DESTDIR=/builddir/build/BUILD/mercurial-7.2-build/BUILDROOT MANDIR=/usr/share/man make -C doc PREFIX="/usr/local" install make[1]: Entering directory '/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/doc' python3 gendoc.py commandlist > commandlist.txt.tmp Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1261, in _find_and_load_unlocked ImportError: deferred import of 'heapq.nlargest' raised an exception during resolution The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/doc/gendoc.py", line 48, in <module> initialization.init() ^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/initialization.py", line 76, in <module> bundle2_part_handlers.init() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2_part_handlers.py", line 79, in <module> @parthandler( ~~~~~~~~~~~^ b'changegroup', ^^^^^^^^^^^^^^^ ...<7 lines>... ), ^^ ) ^ File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2_part_handlers.py", line 67, in parthandler bundle2.validateparttype(parttype) ^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2.py", line 2049, in <module> class AbortFromPart(error.Abort): ^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/error.py", line 16, in <module> import difflib File "<frozen importlib.util>", line 208, in __getattribute__ File "/usr/lib64/python3.15/difflib.py", line 34, in <module> from heapq import nlargest as _nlargest ImportError: cannot import name 'nlargest' from 'heapq' (/usr/lib64/python3.15/heapq.py) python3 gendoc.py "hg-ssh.8" > hg-ssh.8.txt.tmp Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1261, in _find_and_load_unlocked ImportError: deferred import of 'heapq.nlargest' raised an exception during resolution The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/doc/gendoc.py", line 48, in <module> initialization.init() ^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/initialization.py", line 76, in <module> bundle2_part_handlers.init() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2_part_handlers.py", line 79, in <module> @parthandler( ~~~~~~~~~~~^ b'changegroup', ^^^^^^^^^^^^^^^ ...<7 lines>... ), ^^ ) ^ File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2_part_handlers.py", line 67, in parthandler bundle2.validateparttype(parttype) ^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/bundle2.py", line 2049, in <module> class AbortFromPart(error.Abort): ^^^^^^^^^^^ File "<frozen importlib.util>", line 208, in __getattribute__ File "<frozen importlib._bootstrap_external>", line 747, in exec_module File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed File "/builddir/build/BUILD/mercurial-7.2-build/mercurial-7.2/mercurial/error.py", line 16, in <module> import difflib File "<frozen importlib.util>", line 208, in __getattribute__ File "/usr/lib64/python3.15/difflib.py", line 34, in <module> from heapq import nlargest as _nlargest ImportError: cannot import name 'nlargest' from 'heapq' (/usr/lib64/python3.15/heapq.py) https://docs.python.org/3.15/whatsnew/3.15.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10222339-mercurial/ For all our attempts to build mercurial with Python 3.15, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/mercurial/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.15: https://copr.fedorainfracloud.org/coprs/g/python/python3.15/ Let us know here if you have any questions. Python 3.15 is planned to be included in Fedora 45. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Reported upstream: https://foss.heptapod.net/mercurial/mercurial-devel/-/issues/10095 Workaround prepared in: https://src.fedoraproject.org/rpms/mercurial/pull-request/24
FEDORA-2026-c8f1778c50 (mercurial-7.2-2.fc45) has been submitted as an update to Fedora 45. https://bodhi.fedoraproject.org/updates/FEDORA-2026-c8f1778c50
FEDORA-2026-c8f1778c50 (mercurial-7.2-2.fc45) has been pushed to the Fedora 45 stable repository. If problem still persists, please make note of it in this bug report.