** Description changed: + [ Impact ] + + The current release of mercurial fails to start with Python 3.12.5 or + later. Although this version of Python is not currently in noble, it is + planned to be as part of noble's LTS lifecycle. + + [ Test Plan ] + + Start a noble container, install mercurial and verify it works: + + lxc launch ubuntu:n merctest + lxc shell merctest + apt update + apt install -y mercurial + hg --version + + Upgrade to a version of python >=3.12.5. Because this is not yet + available in noble, we'll use the oracular debs. Still within the + container: + + apt install ubuntu-dev-tools + pull-lp-debs python3-defaults + pull-lp-debs python3.12 + pull-lp-debs openssl + apt install ./python3_3.12.6-0ubuntu1_amd64.deb ./python3-minimal_3.12.6-0ubuntu1_amd64.deb ./libpython3-stdlib_3.12.6-0ubuntu1_amd64.deb ./libpython3.12-stdlib_3.12.6-1_amd64.deb ./python3.12-minimal_3.12.6-1_amd64.deb ./python3.12_3.12.6-1_amd64.deb ./libpython3.12-minimal_3.12.6-1_amd64.deb ./libssl3t64_3.3.1-2ubuntu1_amd64.deb ./libpython3.12t64_3.12.6-1_amd64.deb + hg --version + + At this point, mercurial should crash complaining "AttributeError: + partially initialized module 'threading' has no attribute 'RLock' (most + likely due to a circular import)" + + Upgrade mercurial to the version in noble-proposed, and re-run hg + --version to verify the fix. + + [ Regression Potential ] + + Minimal; the patch in question is already part of the mercurial release + in oracular, which has a version of python >=3.12.5. The patch itself is + minimal, simply marking two modules (threading and _weakrefset) for + standard import (not lazy), and altering a couple of test cases to deal + with modified output syntax in the later version. Mercurial itself also + has a comprehensive test suite. + + [ Original Description ] + hg fails to start with Python 3.12.5 and Python 3.13.0rc1 (see the Debian bug for details). This patch adds the threading module to the list of modules which cannot be lazy imported. We will backport Python 3.12.5 to the 24.04 LTS release, so update mercurial first to avoid later breakage. There are no code changes, except for the threading module now being loaded at startup. Test case: hg starts with Python 3.12.5
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2076152 Title: SRU: add threading to the list of modules which cannot be lazy imported To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mercurial/+bug/2076152/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs