You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document that os.environ forcibly upper-cases keys on case-insensitive OSs #101754
Note that it wouldn't be hard to make os.environ case insensitive but case preserving, starting with Python 3.12 or 3.13. I discussed a possible implementation in issue #73010.
Activity
brettcannon commentedon Feb 9, 2023
This came up when using Python to read the environment then trying to merge the results with Node's environment variable APIs which do not normalize.
karrtikr commentedon Feb 9, 2023
Source code:
cpython/Lib/os.py
Line 755 in f1f3af7
eryksun commentedon Feb 9, 2023
Note that it wouldn't be hard to make
os.environcase insensitive but case preserving, starting with Python 3.12 or 3.13. I discussed a possible implementation in issue #73010.OTheDev commentedon Feb 11, 2023
Thoughts on the following (third note) suggested fix?
EDIT: on second thought, I think I prefer
gh-101754: Document that Windows converts keys in `os.environ` to upp…
pythongh-101754: Document that Windows converts keys in `os.environ` …
pythongh-101754: Document that Windows converts keys in `os.environ` …
gh-101754: Document that Windows converts keys in `os.environ` to upp…
gh-101754: Document that Windows converts keys in `os.environ` to upp…
Merge branch 'main' into nodeaddict