[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2021-03-04 Thread Eryk Sun
Change by Eryk Sun : -- type: -> enhancement versions: +Python 3.10 -Python 2.7, Python 3.7 ___ Python tracker ___ ___ Python-bugs-

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-08-27 Thread Daniel Martin
Daniel Martin added the comment: See also https://bugs.python.org/issue40961 - that bug is not about thread safety, but another quirk around env. variable setting that needs to be documented in the documentation for os.putenv and os.getenv, and so anyone addressing this bug should probably a

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-07-06 Thread Joannah Nanjekye
Change by Joannah Nanjekye : -- nosy: +nanjekyejoannah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-22 Thread Eryk Sun
Eryk Sun added the comment: > no need to remove that message. I was discussing the wrong API. It's not directly relevant that Windows API functions that access the process environment are protected by the PEB lock. Python primarily uses [_w]environ, a copy of the process environment that's

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-21 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, no need to remove that message. We'll want to make the docs clear that this does not apply to Windows. :) -- ___ Python tracker __

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-21 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg360245 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-18 Thread Eryk Sun
Eryk Sun added the comment: The warning would not apply to Windows. The environment block is part of the Process Environment Block (PEB) record, which is protected by a critical-section lock. The runtime library acquires the PEB lock before accessing mutable PEB values. For example: Getting

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: https://bugs.python.org/issue39376 tracks possible interpreter behavior changes. -- ___ Python tracker ___

[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-17 Thread Gregory P. Smith
New submission from Gregory P. Smith : The underlying API calls made by os.putenv() and os.environ[name] = value syntax are not thread safe on POSIX systems. POSIX _does not have_ any thread safe way to access the process global environment. In a pure Python program, the GIL prevents this fr