Roundup Robot added the comment:
New changeset 657d21b4b121 by Antoine Pitrou in branch '3.4':
Closes #21173: Fix len() on a WeakKeyDictionary when .clear() was called with
an iterator alive.
https://hg.python.org/cpython/rev/657d21b4b121
New changeset 27533444b964 by Antoine Pitrou in branch
Antoine Pitrou added the comment:
Thank you for reporting this. Here is a patch with tests.
--
stage: - patch review
versions: +Python 3.5 -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file36802/weakdictlen.patch
___
Python tracker
New submission from Philip Jenvey:
len() on WeakKeyDictionarys can fail with ValueErrors when _IterationGuards are
kept alive
Attached is a test showing this:
==
ERROR: test_weak_keys_len_destroy_while_iterating
Changes by Philip Jenvey pjen...@underboss.org:
--
keywords: +patch
Added file: http://bugs.python.org/file34751/issue21173-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21173
___