This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shiinee
Recipients eric.araujo, erik.bray, jesstess, orsenthil, shiinee
Date 2014-06-07.19:43:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1402170218.37.0.78868656351.issue21463@psf.upfronthosting.co.za>
In-reply-to
Content
I've made a test for this patch with a very minimal mock ftpwrapper. We can see it fails on dictionary size change without Erik's fix:

======================================================================
ERROR: test_ftp_cache_pruning (test.test_urllib.urlopen_HttpTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/skyler/cpython/Lib/test/test_urllib.py", line 336, in test_ftp_cache_pruning
    urlopen('ftp://localhost')
  File "/home/skyler/cpython/Lib/test/test_urllib.py", line 45, in urlopen
    return opener.open(url)
  File "/home/skyler/cpython/Lib/urllib/request.py", line 1631, in open
    return getattr(self, name)(url)
  File "/home/skyler/cpython/Lib/urllib/request.py", line 1914, in open_ftp
    for k in self.ftpcache.keys():
RuntimeError: dictionary changed size during iteration
History
Date User Action Args
2014-06-07 19:43:38shiineesetrecipients: + shiinee, orsenthil, eric.araujo, jesstess, erik.bray
2014-06-07 19:43:38shiineesetmessageid: <1402170218.37.0.78868656351.issue21463@psf.upfronthosting.co.za>
2014-06-07 19:43:38shiineelinkissue21463 messages
2014-06-07 19:43:38shiineecreate