[issue39413] Implement os.unsetenv() on Windows

2020-01-27 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: New changeset 161e7b36b1ea871a1352ccfc1d4f4c1eda76830f by Victor Stinner in branch 'master': bpo-39413: Implement os.unsetenv() on Windows (GH-18163) https://github.com/python/cpython/commit/161e7b36b1ea871a1352ccfc1d4f4c1eda76830f -- _

[issue39413] Implement os.unsetenv() on Windows

2020-01-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17550 pull_request: https://github.com/python/cpython/pull/18163 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset b73dd02ea744288831f71363a7467552c09875ea by Victor Stinner in branch 'master': Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124) https://github.com/python/cpython/commit/b73dd02ea744288831f71363a7467552c09875ea -

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17511 pull_request: https://github.com/python/cpython/pull/18124 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17502 pull_request: https://github.com/python/cpython/pull/18115 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread miss-islington
miss-islington added the comment: New changeset 570724667d37fcb160cdef2b34190dc36e28155c by Miss Islington (bot) in branch '3.7': bpo-39413: os.unsetenv() is not available on Windows (GH-18108) https://github.com/python/cpython/commit/570724667d37fcb160cdef2b34190dc36e28155c -- nosy

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread miss-islington
Change by miss-islington : -- pull_requests: +17501 pull_request: https://github.com/python/cpython/pull/18114 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-22 Thread STINNER Victor
STINNER Victor added the comment: New changeset f84f65be5602e561fef04b66bb487fbc4e560db5 by Victor Stinner in branch '3.8': bpo-39413: os.unsetenv() is not available on Windows (GH-18108) https://github.com/python/cpython/commit/f84f65be5602e561fef04b66bb487fbc4e560db5 -- _

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17497 pull_request: https://github.com/python/cpython/pull/18108 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
STINNER Victor added the comment: PR 18107 still fix this issue (add os.unsetenv() to Python 3.9 on Windows), but fix the implementation (use _wputenv() rather than SetEnvironmentVariableW(), to update the CRT). -- ___ Python tracker

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17496 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/18107 ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
STINNER Victor 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 emp

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
STINNER Victor added the comment: > This bypasses the CRT's copy of the environment. If any C code calls > [_w]getenv, it will still see the variable defined. The only way it won't is > if setting the value also bypassed the CRT environment by directly calling > SetEnvironmentVariableW. Oh.

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread Eryk Sun
Eryk Sun added the comment: This bypasses the CRT's copy of the environment. If any C code calls [_w]getenv, it will still see the variable defined. The only way it won't is if setting the value also bypassed the CRT environment by directly calling SetEnvironmentVariableW. -- nosy:

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset 56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8 by Victor Stinner in branch 'master': bpo-39413: Implement os.unsetenv() on Windows (GH-18104) https://github.com/python/cpython/commit/56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8 -- _

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17492 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18104 ___ Python tracker ___ _

[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor
New submission from STINNER Victor : os.unsetenv() is documented to be available on Windows, but it's not. In Python 3.8, "del os.environ[key]" is implemented as: os.putenv(key.upper(), "") Attached PR implements it using SetEnvironmentVariableW(name, NULL). -- components: Library