sysconfig values for `platstdlib` do not appear to be accurate
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Bug report
Bug description:
The values set for platstdlib in the sysconfig scheme paths are not consistent with the way sys.path is configured in getpath.py
sysconfig: https://github.com/python/cpython/blob/main/Lib/sysconfig/__init__.py#L28
getpath: https://github.com/python/cpython/blob/main/Modules/getpath.py#L182
Given this appears to have been wrong essentially forever, it appears nobody is using platstdlib for anything important (even I only noticed because running -m sysconfig inside a venv reports a platstdlib path inside the venv, which is definitely not right).
Still, it should be possible to make them at least a bit more consistent with the way sys.path is actually initialised (appending lib-dynload to the stdlib path looks to be sufficient for non-Windows system, but I'm less sure on Windows)
CPython versions tested on:
3.12
Operating systems tested on:
Linux, Windows
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
比較 Lib/sysconfig/init.py#L28 與 Modules/getpath.py#L182,先從 platstdlib 在 Linux 與 Windows 上如何形成開始。使用 sys.path 和 python -m sysconfig 在虛擬環境內外驗證產生的路徑;當 platstdlib 反映兩個平台上的實際初始化時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- operating-systems
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100