[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)
STINNER Victor
report at bugs.python.org
Tue Feb 18 12:53:04 CET 2014
STINNER Victor added the comment:
putenv("=value") does nothing: it doesn't create a variable with an empty name. You can test with the attach test_empty_env_var.py script (written for Linux).
Attached reject_empty_env_var.patch patch modifies posix.putenv() to raise a ValueError if the name is empty.
The patch is incomplete, the Windows part should also be modified. But I didn't test yet if Windows supports variables with empty name.
----------
nosy: +haypo
Added file: http://bugs.python.org/file34132/test_empty_env_var.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20658>
_______________________________________
More information about the Python-bugs-list
mailing list