diff options
author | Fish <ltfish@users.noreply.github.com> | 2019-02-07 19:51:59 (GMT) |
---|---|---|
committer | Antoine Pitrou <pitrou@free.fr> | 2019-02-07 19:51:59 (GMT) |
commit | 96d37dbcd23e65a7a57819aeced9034296ef747e (patch) | |
tree | f8a5c4d702642dbc6da04a85d818ae7689d5a1db /Misc | |
parent | df8d2cde63c865446468351f8f648e1c7bd45109 (diff) | |
download | cpython-96d37dbcd23e65a7a57819aeced9034296ef747e.zip cpython-96d37dbcd23e65a7a57819aeced9034296ef747e.tar.gz cpython-96d37dbcd23e65a7a57819aeced9034296ef747e.tar.bz2 |
bpo-35615: Fix crashes when copying a Weak{Key,Value}Dictionary. (GH-11384)
Protect dict iterations by wrapping them with _IterationGuard in the
following methods:
- WeakValueDictionary.copy()
- WeakValueDictionary.__deepcopy__()
- WeakKeyDictionary.copy()
- WeakKeyDictionary.__deepcopy__()
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-12-30-20-00-05.bpo-35615.Uz1SVh.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-12-30-20-00-05.bpo-35615.Uz1SVh.rst b/Misc/NEWS.d/next/Library/2018-12-30-20-00-05.bpo-35615.Uz1SVh.rst new file mode 100644 index 0000000..4aff8f7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-12-30-20-00-05.bpo-35615.Uz1SVh.rst @@ -0,0 +1,3 @@ +:mod:`weakref`: Fix a RuntimeError when copying a WeakKeyDictionary or a +WeakValueDictionary, due to some keys or values disappearing while +iterating. |