[issue43041] copying WeakValueDictionary is not iteration safe

2021-01-27 Thread Daniel Romberg
Daniel Romberg added the comment: Sorry, I meant an exception. I changed the type to "behavior", thanks for the hint. -- type: crash -> behavior ___ Python tracker <https://bugs.pytho

[issue43041] copying WeakValueDictionary is not iteration safe

2021-01-27 Thread Daniel Romberg
New submission from Daniel Romberg : The copy operation is not safe to use during iteration. The following test case raises a "RuntimeError: dictionary changed size during iteration": import weakref class Class: pass def TEST_weakValue(): d = weakref.WeakValueDictionary()

[issue35615] "RuntimeError: Dictionary changed size during iteration" when copying a WeakValueDictionary

2021-01-25 Thread Daniel Romberg
Daniel Romberg added the comment: I think this issue needs to be reopened. The problem has not been solved completely. We experience a lot fewer crashes in weakref than before this fix, however, there are recursive situations in which copy() is invoked while iterating the