Tests fail when `_interpreters` extension is disabled
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
Bug report
Bug description:
My CPython version: 3.14.4 (problem with 3.14.3 too)
Configure:
./configure --disable-shared --enable-optimizations --without-lto
Select modules:
./Modules/makesetup -c ./Modules/config.c.in -s ./Modules ./Setup.my.local
mv config.c ./Modules/
File (github says *.local file upload is not expected, change ext txt -> local)
Setup.my.txt
As you can see, the _interpreters module is disabled
And make:
make -j4
Error after testing:
...
File ".../Lib/test/datetimetester.py", line 7304, in test_concurrent_initialization_subinterpreter
...
Traceback (most recent call last):
File "<string>", line 2, in <module>
from concurrent.futures import InterpreterPoolExecutor
ImportError: cannot import name 'InterpreterPoolExecutor' from 'concurrent.futures'
...
Ran 1098 tests in 10.101s
FAILED (failures=1, skipped=53)
test test_datetime failed
make: *** [Makefile:990: profile-run-stamp] Error 2
I think a test with a non-existent module should be skipped, not crashed
Also, why does a test failure cause the build to fail if these tests are just needed to collect statistics?
CPython versions tested on:
3.14
Operating systems tested on:
Linux
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Lib/test/datetimetester.py 中 test_concurrent_initialization_subinterpreter 附近開始,檢查 concurrent.futures.InterpreterPoolExecutor 如何依賴 _interpreters 擴充功能。停用 _interpreters 後執行受影響的測試,接著確認無法使用的功能是否如預期般處理,並確認 profile-run 測試命令在沒有此失敗的情況下完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- build-system, testing-qa
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 62/100