Update usages of `PySys_FormatStderr` with locale-dependent `strerror`
未关闭
还没有人认领这个 Issue。
extension-modules
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- 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