Update usages of `PySys_FormatStderr` with locale-dependent `strerror`
未關閉
還沒有人認領這個 Issue。
extension-modules
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
strerror is locale-dependent but PySys_FormatStderr is not. The usage is https://github.com/python/cpython/blob/7303f06846b69016a075bca7ad7c6055f29ad024/Modules/main.c#L377-L379 and we should update it to be locale-dependent. This is a follow-up to https://github.com/python/cpython/pull/126746#discussion_r1885039989.
This would be quite hard to test as pointed out by Serhiy, so I won't work on this for now. Others may pick that task.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Modules/main.c 的第 377-379 行開始,閱讀相關 pull request 中的討論,了解圍繞 PySys_FormatStderr 以及依賴 locale 的 strerror 輸出的理由。確認預期的 locale 行為,並確定如何驗證完成情況,同時注意 issue 中提到這很難測試。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- c, python
- 領域
- operating-systems
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 38/100