provide a way to access the unmodified environment (variables) of a Python script
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
実装ファイルやテストは指定されていません。環境の変更と提案された API を理解するため、まず PEP 538 と issue 72367 にあるリンク先の議論を確認してください。具体的な設計とそれに対応するカバレッジについて合意されれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Feature or enhancement
As described in https://github.com/python/cpython/issues/72367#issuecomment-1140355246 and the following comments, the implementation of PEP 538 makes it impossible to access the original unmodified environment (variables) with which a process have been invoked.
I have no problem with the goal of PEP 538 itself or the locale coercion, but this is a problem for any use-case the wants to act on the original locale.
Using PYTHONCOERCECLOCALE=0 is no solution either, as then this modifies the original locale and one couldn't decide whether it's just there to prevent Python's setting of LC_CTYPE=C or whether it was really intended to be in the environment suo jure.
Neither is it obviously a solution to use build-time options.
A solution could be to add another os.original_environment or something like that, which gives the true original environment, without any changes that Python itself may have made.
If Python would ever only modify (by itself) the environment with respect to LC_CTYPE and locale coercion, it could also be enough to simply give the program a way to find out whether that was done, and what the original value (or unset) of LC_CTYPE was.
Pitch
Example use cases are given in the previous discussion mentioned below.
In short, pretty much anything that is intended to serve as a wrapper could require the true original environment.
Imagine one would want to implement the POSIX env utility in Python.
Previous discussion
See https://github.com/python/cpython/issues/72367#issuecomment-1140355246 .
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python/cpython のほかの issue
-
docs pending
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
stdlib type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
build type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
stdlib topic-email type-feature
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
🐛 Bug 🔔 Pending processing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
jumpserver/jumpserver#17584 ·