python / python/cpython

Update usages of `PySys_FormatStderr` with locale-dependent `strerror`

オープン
#128,022 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。