Message257437
os.environ is never changed by getproxies_environment()
Like Martin Panter, I will curious to know as how the user experienced this issue in the place.
@Raymond Hettinger: If the dict is only read and never modified in the fuction, does it still make sense to have a defensive list() as you suggested? If yes, then there will be couple of places in the stdlib code that will need this change.
```
$ ag os.environ.items Lib
Lib/distutils/_msvccompiler.py
80: for key, value in os.environ.items()
Lib/test/test_os.py
679: for key, val in os.environ.items():
Lib/test/test_wsgiref.py
427: os_environ = dict(os.environ.items())
Lib/urllib/request.py
2453: for name, value in os.environ.items():
Lib/wsgiref/handlers.py
47: for k, v in os.environ.items():
```
My understanding is, if the function is not manipulation and only reading the dictionary, a defensive list or copy is not required. And, this bug report should be closed. |
|
Date |
User |
Action |
Args |
2016-01-04 02:40:13 | orsenthil | set | recipients:
+ orsenthil, rhettinger, martin.panter, alphalfalfa |
2016-01-04 02:40:13 | orsenthil | set | messageid: <1451875213.75.0.696612628345.issue25641@psf.upfronthosting.co.za> |
2016-01-04 02:40:13 | orsenthil | link | issue25641 messages |
2016-01-04 02:40:12 | orsenthil | create | |
|