[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-24 Thread STINNER Victor
STINNER Victor added the comment: You're right, Windows works as expected. I close the issue. See https://github.com/python/cpython/pull/18115 for more information. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python

[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-22 Thread Eryk Sun
Eryk Sun added the comment: > The problem is that the _wputenv() function allows to insert variable > names containing the "=" character No, it does not. Your experiments uncovered bugs elsewhere with the implementations of _wgetenv and WINAPI GetEnvironmentVariableW, but this isn't one of

[issue39420] Windows: convertenviron() doesn't parse environment variables properly

2020-01-22 Thread STINNER Victor
New submission from STINNER Victor : os.environ is created by convertenviron() of posixmodule.c. The Windows implementation calls _wgetenv(L"") to initialize _wenviron, and then parses the _wenviron string. The _wenviron string is parsed by search for the first "=" character to split between