This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tzickel
Recipients larry, loewis, paul.moore, steve.dower, tim.golden, tzickel, zach.ware
Date 2016-11-28.18:55:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480359346.4.0.287394822331.issue28824@psf.upfronthosting.co.za>
In-reply-to
Content
In Windows, python's os.environ currently handles the case sensitivity different that the OS. While it's true that the OS is case insensitive, it does preserve the case that you first set it as.

For example:
C:\Users\user>set aSD=Blah
C:\Users\user>set asd
aSD=Blah

But in python:
>>> import os
>>> 'aSD' in os.environ.keys()
False

Today as more people pass environment variables to processes, it's better to behave as the OS does. Basically I think that os.environ (both in 2.7 and 3) should preserve the case as well (for when you need to access / iterate over the keys or set a key), but ignore it when you get a key.

https://github.com/python/cpython/blob/b82a5a65caa5b0f0efccaf2bbea94f1eba19a54d/Lib/os.py#L733
History
Date User Action Args
2016-11-28 18:55:46tzickelsetrecipients: + tzickel, loewis, paul.moore, larry, tim.golden, zach.ware, steve.dower
2016-11-28 18:55:46tzickelsetmessageid: <1480359346.4.0.287394822331.issue28824@psf.upfronthosting.co.za>
2016-11-28 18:55:46tzickellinkissue28824 messages
2016-11-28 18:55:46tzickelcreate