[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread Eryk Sun
Eryk Sun added the comment: I suggest closing this issue as a duplicate of bpo-43702. -- ___ Python tracker ___ ___

[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread Eryk Sun
Eryk Sun added the comment: This should be handled in _winapi.CreateProcess(). An environment block is technically required to be sorted. (Ages ago this was a MUST requirement for getting and setting variables to work correctly, since the implementation depended on the sort order, but I

[issue46862] subprocess makes environment blocks with duplicate keys on Windows

2022-02-25 Thread benrg
New submission from benrg : On Windows, if one writes env = os.environ.copy() env['http_proxy'] = 'whatever' or either of the documented equivalents ({**os.environ, ...} or (os.environ | {...})), and passes the resulting environment to subprocess.run or subprocess.Popen, the spawned