[issue39413] Implement os.unsetenv() on Windows

STINNER Victor report at bugs.python.org
Tue Jan 21 13:16:30 EST 2020


STINNER Victor <vstinner at python.org> added the comment:

I checked the doc: _putenv("VAR=") removes the environment variable "VAR". It's well documented:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-wputenv?view=vs-2019

"You can remove a variable from the environment by specifying an empty value_string, or in other words, by specifying only varname=."

So Python 3.8 os._unsetenv() is correct, but this function was not exposed, and so this issue remains relevant: Python 3.8 documents that os.unsetenv() is available on Windows, but it's not.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39413>
_______________________________________


More information about the Python-bugs-list mailing list