diff options
author | Łukasz Langa <lukasz@langa.pl> | 2017-02-10 08:20:16 (GMT) |
---|---|---|
committer | Łukasz Langa <lukasz@langa.pl> | 2017-02-10 08:20:16 (GMT) |
commit | 40ee824d1dac41fd1aba9fa9a4e6e5fb353f2666 (patch) | |
tree | 3212b9dcd65f649fb1f7264bbd69a0f0ef665957 | |
parent | e5f2cc67be80961126e9fbf01c80620130fb4817 (diff) | |
parent | 57fe245e8c88f49899cf81b0efe289f599c0a249 (diff) | |
download | cpython-40ee824d1dac41fd1aba9fa9a4e6e5fb353f2666.zip cpython-40ee824d1dac41fd1aba9fa9a4e6e5fb353f2666.tar.gz cpython-40ee824d1dac41fd1aba9fa9a4e6e5fb353f2666.tar.bz2 |
Merge 3.6 (fix #29519)
-rw-r--r-- | Lib/weakref.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py index aaebd0c..787e33a 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -106,7 +106,7 @@ class WeakValueDictionary(collections.MutableMapping): self, *args = args if len(args) > 1: raise TypeError('expected at most 1 arguments, got %d' % len(args)) - def remove(wr, selfref=ref(self)): + def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref): self = selfref() if self is not None: if self._iterating: @@ -114,7 +114,7 @@ class WeakValueDictionary(collections.MutableMapping): else: # Atomic removal is necessary since this function # can be called asynchronously by the GC - _remove_dead_weakref(d, wr.key) + _atomic_removal(d, wr.key) self._remove = remove # A list of keys to be removed self._pending_removals = [] |