[3.12 Regression] backport of gh-120233 to 3.12 (gh-121350) breaks mercurial, working with 3.12.4
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
mercurial 6.8 fails to start with the 3.12 branch 2024-07-15, but works with 3.12.4:
~$ hg
Traceback (most recent call last):
File "/usr/bin/hg", line 57, in
from mercurial import dispatch
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
super().exec_module(module)
File "", line 257, in exec_module
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "/usr/lib/python3/dist-packages/hgdemandimport/demandimportpy3.py", line 52, in exec_module
super().exec_module(module)
File "", line 267, in exec_module
AttributeError: partially initialized module 'threading' has no attribute 'RLock' (most likely due to a circular import)
Commenting out the hgdemandimport.enable() at line 55 of /usr/bin/hg, it works:
Complete bug report at https://bugs.debian.org/1076449
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report identifies /usr/bin/hg and hgdemandimport.enable() at line 55, with a Debian bug report as additional context. First reproduce the mercurial 6.8 startup failure on the 3.12 branch versus 3.12.4 and inspect the gh-120233/gh-121350 regression; done means hg starts without the threading circular-import error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100