Message414064
The Windows functions that deal with environment variables are case-insensitive and case-preserving, like most Windows file systems. Many environment variables are conventionally written in all caps, but others aren't, such as `ProgramData`, `PSModulePath`, and `windows_tracing_logfile`.
os.environ forces all environment variable names to upper case when it's constructed. One consequence is that if you pass a modified environment to subprocess.Popen, you end up with variables named `PROGRAMDATA`, etc., even if you didn't modify their values.
While this is unlikely to break things since other software normally ignores the case, it's nonstandard behavior, and disconcerting when the affected variable names are shown to human beings.
Here's an example of someone being confused by this: https://stackoverflow.com/questions/19023238/why-python-uppercases-all-environment-variables-in-windows |
|
Date |
User |
Action |
Args |
2022-02-26 03:44:08 | benrg | set | recipients:
+ benrg, paul.moore, tim.golden, zach.ware, steve.dower |
2022-02-26 03:44:08 | benrg | set | messageid: <1645847048.14.0.626717468993.issue46861@roundup.psfhosted.org> |
2022-02-26 03:44:08 | benrg | link | issue46861 messages |
2022-02-26 03:44:07 | benrg | create | |
|