Documentation for os.environ should say that os.environ caching behavior is undefined if other threads are setting environment values
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Documentation
It says here:
This mapping is captured the first time the os module is imported, typically during Python startup as part of processing site.py. Changes to the environment made after this time are not reflected in os.environ, except for changes made by modifying os.environ directly.
It should mention the caveat that such cashing would cause undefined behavior or/and crashes when other threads would be setting environment values. This would be true at least on Linux and FreeBSD.
The same should be mentioned in the documentation of the function that initializes the Python interpreter and caches environment.
These functions are not thread-safe.
Linked PRs
- gh-152979
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue にリンクされている os.environ のドキュメントと、環境をキャッシュするインタープリター初期化関数のドキュメントを確認します。要求されているスレッドセーフティに関する注意書きを、リンクされている PR gh-152979 と比較します。他のスレッドが環境の値を変更した場合の動作を、関連する両方のドキュメント領域が正確に説明していれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation, operating-systems
- issue の種類
- ドキュメント
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100