[Python-Dev] Issue 10094

Senthil Kumaran orsenthil at gmail.com
Thu Oct 14 19:48:47 CEST 2010


On Thu, Oct 14, 2010 at 07:38:58PM +0200, Antoine Pitrou wrote:
> An easy way to reproduce is to have an environment variable named
> "PROXY":
> 
> $ PROXY=toto ./python -m test.regrtest -F test_urllib
> [  1] test_urllib
> Warning -- os.environ was modified by test_urllib
> test test_urllib failed -- Traceback (most recent call last):
>   File "/home/antoine/py3k/debug/Lib/test/test_urllib.py", line 121, in
> setUp for k in os.environ.keys():
>   File "/home/antoine/py3k/debug/Lib/_abcoll.py", line 410, in __iter__
>     for key in self._mapping:
>   File "/home/antoine/py3k/debug/Lib/os.py", line 441, in __iter__
>     for key in self._data:
> RuntimeError: dictionary changed size during iteration
> 
> There doesn't seem to be anything really mysterious, actually. The
> exception message says it all :)

That is indeed the case. It a bug to be fixed.

-- 
Senthil


More information about the Python-Dev mailing list