This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JelleZijlstra
Recipients JelleZijlstra, osantana
Date 2017-05-23.15:47:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Even with the patch, I don't think it's safe to modify os.environ while it's being accessed concurrently in another thread. The other thread's modification could arrive while the dict() call in your patch is running (in CPython the GIL might protect you, but that's an implementation detail).

I think the real solution is that your application uses a lock or some other concurrency mechanism to protect access to os.environ.
Date User Action Args
2017-05-23 15:47:53JelleZijlstrasetrecipients: + JelleZijlstra, osantana
2017-05-23 15:47:53JelleZijlstrasetmessageid: <>
2017-05-23 15:47:53JelleZijlstralinkissue30441 messages
2017-05-23 15:47:53JelleZijlstracreate