Osvaldo Santana Neto added the comment:

I agree with Jelle about the fix's implementation. But I disagree of suggestion 
to implement lock at the application side.

I disagree because some external libraries may want to access os.environ in a 
concurrent fashion without lock acquiring. That's the case reported in my 
previous comment: urllib/requests.py 
(https://github.com/python/cpython/blob/master/Lib/urllib/request.py#L2468) 
iterates over os.environ with no lock control.

How could I handle this issue in this case? Would it be a good idea  implement 
the lock mechanism in current os._Environ 
(https://github.com/python/cpython/blob/master/Lib/os.py#L666) mapping class?

----------

_______________________________________
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

Reply via email to