Issue 7026: test_urllib: unsetting missing 'env' variable (original) (raw)

Created on 2009-10-01 00:49 by srid, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (14)
msg93384 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-10-01 00:49
test test_urllib failed -- Traceback (most recent call last): File "/home/apy/rrun/tmp/autotest/apy/lib/python2.6/test/ test_urllib.py", line 106, in setUp env.unset(k) NameError: global name 'env' is not defined Looking in trunk's copy I see this: def setUp(self): # Records changes to env vars self.env = test_support.EnvironmentVarGuard() # Delete all proxy related env vars for k, v in os.environ.iteritems(): if 'proxy' in k.lower(): del env[k] Should not that be "del self.env[k]"?
msg93385 - (view) Author: Sridhar Ratnakumar (srid) Date: 2009-10-01 00:49
The above mentioned traceback occurs in 2.6.3rc1
msg93388 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-01 01:51
Fixed that in revision 75166. Even in release26-maint got to chnage it from env.unset(k) to self.env.unset(k).
msg93394 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-10-01 07:56
Can this issue be closed then?
msg93395 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-01 08:58
This needs to be changed in python2.6 branch as well. I was hesitant as barry was making the build. After the branch opens, I shall make the changes in that and close the issue.
msg93573 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2009-10-05 04:17
Committed revision 75254 for release26-maint.
msg97421 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-08 17:48
The method does not work as expected. See : ---------------------------------------------------------------------- Author: Sridhar Ratnakumar (srid) Date: 2010-01-08 18:26 I get this error while running Python 2.6.4 tests (on 64-bit Linux box) test_urllib test test_urllib failed -- Traceback (most recent call last): File "/home/apy/rrun/tmp/autotest/apy/lib/python2.6/test/test_urllib.py", line 104, in setUp for k, v in os.environ.iteritems(): RuntimeError: dictionary changed size during iteration ----------------------------------------------------------------------
msg97424 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-08 17:56
Index: Lib/test/test_urllib.py =================================================================== --- Lib/test/test_urllib.py (revision 77361) +++ Lib/test/test_urllib.py (working copy) @@ -101,7 +101,7 @@ # Records changes to env vars self.env = test_support.EnvironmentVarGuard() # Delete all proxy related env vars - for k, v in os.environ.iteritems(): + for k in os.environ.keys(): if 'proxy' in k.lower(): self.env.unset(k)
msg97426 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-01-08 18:26
Fixed in revision 77367
msg97429 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-08 18:40
Thanks. It should be propagated to 2.7.
msg97433 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-01-08 19:10
Yes, I indeed, I quickly moved to patch it up in the trunk and did a svn submit -m "..." I had your big patch for tests in the trunk. I have reverted it for now and shall fix this one only.
msg101535 - (view) Author: Sridhar Ratnakumar (srid) Date: 2010-03-22 21:14
Re-opening. test_urllib in 3.1.2 fail similarly (on Linux 64-bit): test_urllib Warning: os.environ was modified by test_urllib test test_urllib failed -- Traceback (most recent call last): File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/test/test_urllib.py", line 122, in setUp for k in os.environ.keys(): File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/_abcoll.py", line 404, in __iter__ for key in self._mapping: File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/os.py", line 404, in __iter__ for key in self.data: RuntimeError: dictionary changed size during iteration
msg102428 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-04-06 00:44
Sridhar, I am unable to reproduce this bug in the 3.x (py3k and release31-maint) on 64 bit linux. I glance at the code to see any underpinnings for this RuntimeError and could not find any at the place the exception occurred. Is it anyway related to other buildout issue you had mentioned? Can you provide the steps to reproduce?
msg102921 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-04-12 06:45
I am unable to reproduce this issue in the trunk/py3k. Buildbots have not complained either. I am closing this bug. srid: If you have steps to reproduce, feel free to reopen it.
History
Date User Action Args
2022-04-11 14:56:53 admin set github: 51275
2010-04-12 06:45:20 orsenthil set status: open -> closedmessages: +
2010-04-06 00:44:57 orsenthil set messages: +
2010-03-22 21:14:42 srid set status: closed -> openmessages: + versions: + Python 3.1
2010-01-08 19:10:15 orsenthil set messages: +
2010-01-08 18:40:20 flox set messages: + versions: + Python 2.7
2010-01-08 18:26:08 orsenthil set status: open -> closedresolution: fixedmessages: +
2010-01-08 17:56:25 flox set messages: +
2010-01-08 17:53:37 flox set messages: -
2010-01-08 17:53:08 flox set messages: +
2010-01-08 17:48:54 flox set status: closed -> opennosy: + floxmessages: + resolution: fixed -> (no value)
2009-10-05 04:17:12 orsenthil set status: open -> closedmessages: +
2009-10-01 08:58:06 orsenthil set nosy: + barrymessages: +
2009-10-01 07:56:21 georg.brandl set nosy: + georg.brandlmessages: +
2009-10-01 01:51:32 orsenthil set nosy: + orsenthilmessages: + assignee: orsenthilresolution: fixed
2009-10-01 00:50:00 srid set messages: +
2009-10-01 00:49:09 srid create