Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938128 - <dev-vcs/mercurial-6.8.1 fails with dev-lang/python-3.12.5
Summary: <dev-vcs/mercurial-6.8.1 fails with dev-lang/python-3.12.5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Cédric Krier
URL:
Whiteboard:
Keywords:
Depends on: 937965
Blocks:
  Show dependency tree
 
Reported: 2024-08-18 02:20 UTC by Thomas Capricelli
Modified: 2024-08-26 21:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2024-08-18 02:20:54 UTC
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.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-18 02:35:54 UTC
Please include both emerge --info and the version of dev-vcs/mercurial.

*** This bug has been marked as a duplicate of bug 937965 ***
Comment 2 Thomas Capricelli 2024-08-18 20:21:21 UTC
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).
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-18 20:23:43 UTC
(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.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-18 20:29:38 UTC
cedk: please either backport the fix or stable 6.8.1. Thanks!
Comment 5 Larry the Git Cow gentoo-dev 2024-08-24 06:21:56 UTC
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(+)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-24 09:27:44 UTC
That needs a revbump (git mv is fine here).
Comment 7 Larry the Git Cow gentoo-dev 2024-08-24 10:25:05 UTC
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(-)
Comment 8 Thomas Capricelli 2024-08-26 21:43:13 UTC
I confirm it's ok now, thanks !