msg118598 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2010-10-13 22:46 |
Running the test suite on py3k r85440, I get the following failure: ====================================================================== ERROR: test_getproxies_environment_keep_no_proxies (__main__.ProxyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_urllib.py", line 121, in setUp for k in os.environ.keys(): File "/home/barry/projects/python/py3k/Lib/_abcoll.py", line 410, in __iter__ for key in self._mapping: File "/home/barry/projects/python/py3k/Lib/os.py", line 441, in __iter__ for key in self._data: RuntimeError: dictionary changed size during iteration This is consistent (i.e. fails every time) on Ubuntu 10.10 amd64. |
|
|
msg118669 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2010-10-14 15:27 |
This may not be a Python bug. The failure is consistent on all Ubuntu 10.10 machines I've tried, including both i386 and x86_64 platforms. I've gone back many svn revisions and even pulled down earlier alpha tarballs and the failure is consistent. This does *not* fail on the one Ubuntu 10.04 x86_64 VM I've tried. Will try on Debian squeeze next. |
|
|
msg118670 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2010-10-14 15:30 |
I have seen this in very inconsistent manner. |
|
|
msg118671 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2010-10-14 15:35 |
Senthil, can you provide any additional information on where/when you've seen this? AFAICT, test_urllib.py is the only test it shows up, but it's totally consistent. What OS/platforms have you seen this happen on? Same test or different one? |
|
|
msg118696 - (view) |
Author: Senthil Kumaran (orsenthil) *  |
Date: 2010-10-14 17:19 |
I had seen with test_urllib, but it was inconsistent for me. Sometimes make distclean and run had worked fine. This was on Ubuntu 10.04, Intel 64 bit. It is surprising, if it is seen consistently on Ubuntu 10.10 ( I have not upgraded to this yet, so have not tried). |
|
|
msg118705 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2010-10-14 18:09 |
The problem occurs on Ubuntu 10.10 because there's a new environment variable called $UBUNTU_MENUPROXY in the default user environment. This is why it suddenly showed up in Python 3.1 and why it does not occur on other OS (even Ubuntu 10.04). ProxyTests.setUp() conditional is too naive. Will attach patch, commit and backport. |
|
|
msg118710 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2010-10-14 18:29 |
Er, this patch is horrible. You should fix the generic bug, not workaround it on your particular environment. The test still fails with NO_PROXY: $ NO_PROXY=1 ./python -m test.regrtest test_urllib [1/1] test_urllib Warning -- os.environ was modified by test_urllib test test_urllib failed -- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/test/test_urllib.py", line 121, in setUp for k in os.environ.keys(): File "/home/antoine/py3k/__svn__/Lib/_abcoll.py", line 410, in __iter__ for key in self._mapping: File "/home/antoine/py3k/__svn__/Lib/os.py", line 441, in __iter__ for key in self._data: RuntimeError: dictionary changed size during iteration |
|
|
msg118711 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2010-10-14 18:32 |
Fixed in r85489, please backport. |
|
|
msg119571 - (view) |
Author: Barry A. Warsaw (barry) *  |
Date: 2010-10-25 19:30 |
This was already backported but the issue wasn't closed. |
|
|