Jelle Zijlstra added the comment: 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. ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30441> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com