Skip to content

Commit 663fffa

Browse files
committed
Fix a circular import dependency.
1 parent 52dc06b commit 663fffa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/weakref.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
# they are called this instead of "ref" to avoid name collisions with
1010
# the module-global ref() function imported from _weakref.
1111

12-
import collections
13-
1412
from _weakref import (
1513
getweakrefcount,
1614
getweakrefs,
@@ -22,6 +20,8 @@
2220

2321
from _weakrefset import WeakSet
2422

23+
import collections # Import after _weakref to avoid circular import.
24+
2525
ProxyTypes = (ProxyType, CallableProxyType)
2626

2727
__all__ = ["ref", "proxy", "getweakrefcount", "getweakrefs",

0 commit comments

Comments
 (0)