python / python/cpython

[3.12 Regression] backport of gh-120233 to 3.12 (gh-121350) breaks mercurial, working with 3.12.4

未關閉
#122,438 8 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

type-bug
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

報告指出了第 55 行的 /usr/bin/hg 和 hgdemandimport.enable(),並以 Debian 錯誤報告作為補充背景。首先在 3.12 分支上相對於 3.12.4 重現 mercurial 6.8 的啟動失敗,並檢查 gh-120233/gh-121350 回歸;當 hg 能夠在沒有 threading 循環匯入錯誤的情況下啟動時,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
operating-systems, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。