Typically, any command (including --help) will fail with: % hg st Traceback (most recent call last): File "/usr/lib/python-exec/python3.12/hg", line 57, in <module> from mercurial import dispatch File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "/usr/lib/python3.12/site-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module super().exec_module(module) File "<frozen importlib.util>", line 257, in exec_module File "<frozen importlib._bootstrap>", line 1360, in _find_and_load File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 935, in _load_unlocked File "/usr/lib/python3.12/site-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module super().exec_module(module) File "<frozen importlib.util>", line 267, in exec_module AttributeError: partially initialized module 'threading' has no attribute 'RLock' (most likely due to a circular import) Reproducible: Always Expected Results: I tried removing all extensions from mercurial, but that doesn't solve it. According to some google search, this happens when some `threading.py` or similar are present in the project, but mercurial only has `threading.c` for the c-based core. Anyway, this led me to suspect an interaction problem with python. I use mercurial daily, and it hasn't been updated for weeks. Python was today, from 3.12.4_p3 to 3.12.5 I masked 3.12.5, re-installed 3.12.4_p3, and now mercurial works perfectly again. I wonder how such a minor 'patch' update can have so huge consequences. FYI.
Please include both emerge --info and the version of dev-vcs/mercurial. *** This bug has been marked as a duplicate of bug 937965 ***
I don't understand. The duplicate is about updating 6.8.0 to 6.8.1, both of them ~amd64, my report is about amd64 (stable).
(In reply to Thomas Capricelli from comment #2) > I don't understand. > The duplicate is about updating 6.8.0 to 6.8.1, both of them ~amd64, my > report is about amd64 (stable). That's why I asked which version you're using.
cedk: please either backport the fix or stable 6.8.1. Thanks!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81549b33168154d1014a120bc28a2c7951bf1058 commit 81549b33168154d1014a120bc28a2c7951bf1058 Author: Cédric Krier <cedk@gentoo.org> AuthorDate: 2024-08-24 06:19:38 +0000 Commit: Cédric Krier <cedk@gentoo.org> CommitDate: 2024-08-24 06:19:38 +0000 dev-vcs/mercurial: apply demand import patch for python 3.12.4 Closes: https://bugs.gentoo.org/938128 Signed-off-by: Cédric Krier <cedk@gentoo.org> dev-vcs/mercurial/files/python3.12.patch | 51 ++++++++++++++++++++++++++++++++ dev-vcs/mercurial/mercurial-6.5.3.ebuild | 2 ++ dev-vcs/mercurial/mercurial-6.6.2.ebuild | 2 ++ dev-vcs/mercurial/mercurial-6.7.4.ebuild | 2 ++ 4 files changed, 57 insertions(+)
That needs a revbump (git mv is fine here).
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31c1e07c4fd2929034d4abcd046c560cf8cb61e6 commit 31c1e07c4fd2929034d4abcd046c560cf8cb61e6 Author: Cédric Krier <cedk@gentoo.org> AuthorDate: 2024-08-24 10:24:19 +0000 Commit: Cédric Krier <cedk@gentoo.org> CommitDate: 2024-08-24 10:24:19 +0000 dev-vcs/mercurial: revbump for demand import patch Bug: https://bugs.gentoo.org/938128 Signed-off-by: Cédric Krier <cedk@gentoo.org> dev-vcs/mercurial/{mercurial-6.5.3.ebuild => mercurial-6.5.3-r1.ebuild} | 0 dev-vcs/mercurial/{mercurial-6.6.2.ebuild => mercurial-6.6.2-r1.ebuild} | 0 dev-vcs/mercurial/{mercurial-6.7.4.ebuild => mercurial-6.7.4-r1.ebuild} | 0 3 files changed, 0 insertions(+), 0 deletions(-)
I confirm it's ok now, thanks !