Fix bug updating WeakKeyDictionary during iteration #1698

Merged
merged 1 commit into from Feb 17, 2013

Conversation

Projects
None yet
3 participants
Owner

mdboom commented Jan 23, 2013

This is an attempt to fix the bug reported in the mailing list thread "BUG: RuntimeError: dictionary changed size during iteration".

Fix itervalues -> values. As reported by Massimiliano Costacurta in m…
…ailing list thread "BUG: RuntimeError: dictionary changed size during iteration"
Member

pelson commented Jan 24, 2013

Does this fix the problem?

View changed from a copy to a view between python2.7 and python3.2. Maybe 2to3 handles this magic?

http://docs.python.org/2.7/library/stdtypes.html?highlight=dict#dict.values
http://docs.python.org/3.2/library/stdtypes.html?highlight=dict#dict.values

Owner

mdboom commented Jan 24, 2013

Yes -- 2to3 converts dict.values() into list(dict.values())

efiring added a commit that referenced this pull request Feb 17, 2013

Merge pull request #1698 from mdboom/iteritems_bug
Fix bug updating WeakKeyDictionary during iteration

@efiring efiring merged commit 610b182 into matplotlib:v1.2.x Feb 17, 2013

1 check failed

default The Travis build failed
Details

@mdboom mdboom deleted the mdboom:iteritems_bug branch Aug 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment