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 pitrou
Recipients benjamin.peterson, gregory.p.smith, jnoller, kristjan.jonsson, pitrou, r.david.murray
Date 2009-10-11.12:03:09
SpamBayes Score 5.3292894e-07
Marked as misclassified No
Message-id <1255262592.45.0.297366114203.issue7060@psf.upfronthosting.co.za>
In-reply-to
Content
It was a bad idea to revert the change, because we may now forget about
the problem rather than fix it.

It is likely that the "dictionary changed size during iteration" occurs
because a GC collection gets triggered during the iteration on the
weakdict. A GC collection can destroy some objects in that case because
keeping an exception around (which the unittest change does) usually
creates reference cycles through the frame's locals.

It seems that WeakValueDictionary.items() isn't very robust in py3k ;)
We probably need to add list-returning variants, e.g. a listitems()
method (and, probably, listkeys() and listvalues() too)?
History
Date User Action Args
2009-10-11 12:03:12pitrousetrecipients: + pitrou, gregory.p.smith, kristjan.jonsson, benjamin.peterson, jnoller, r.david.murray
2009-10-11 12:03:12pitrousetmessageid: <1255262592.45.0.297366114203.issue7060@psf.upfronthosting.co.za>
2009-10-11 12:03:10pitroulinkissue7060 messages
2009-10-11 12:03:09pitroucreate