Skip to content

Commit c30038d

Browse files
Test
1 parent d1d5dce commit c30038d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/importlib/_bootstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class _List(list):
6262
class _WeakValueDictionary:
6363

6464
def __init__(self):
65-
self_weakref = _weakref.ref(self)
65+
# self_weakref = _weakref.ref(self)
6666

6767
# Inlined to avoid issues with inheriting from _weakref.ref before _weakref is
6868
# set by _setup(). Since there's only one instance of this class, this is
@@ -81,9 +81,9 @@ def __init__(self, ob, key):
8181

8282
@staticmethod
8383
def remove(wr):
84-
nonlocal self_weakref
84+
nonlocal self
8585

86-
self = self_weakref()
86+
# self = self_weakref()
8787
if self is not None:
8888
if self._iterating:
8989
self._pending_removals.append(wr.key)

0 commit comments

Comments
 (0)