PYTHONDONTWRITEBYTECODE documentation is incorrect
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Documentation
PYTHONDONTWRITEBYTECODE is documented in Doc/using/cmdline.rst as:
If this is set to a non-empty string, Python won't try to write
.pycfiles on the import of source modules.
This is incorrect. The variable is obtained in Python/initconfig.c as:
int dont_write_bytecode = 0;
_Py_get_env_flag(use_env, &dont_write_bytecode, "PYTHONDONTWRITEBYTECODE");
if (dont_write_bytecode) {
config->write_bytecode = 0;
}
and _Py_get_env_flag reads the environment variable value as integer, treating non-integer string as 1. Specifically, this means that PYTHONDONTWRITEBYTECODE=0 will not suppress writing .pyc files, even though the environment variable is assigned a non-empty string "0".
Linked PRs
- gh-143144
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Doc/using/cmdline.rst から始め、文書化された動作を Python/initconfig.c と比較します。特に、issue に示されている _Py_get_env_flag 呼び出しを確認してください。環境変数の説明を更新し、整数の解析と PYTHONDONTWRITEBYTECODE=0 の動作が正確になるようにします。文言が実装と一致すれば、ドキュメントは完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100