]> granicus.if.org Git - python/commitdiff
Fix a circular import dependency.
authorBrett Cannon <bcannon@gmail.com>
Wed, 25 Mar 2009 23:31:22 +0000 (23:31 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 25 Mar 2009 23:31:22 +0000 (23:31 +0000)
Lib/weakref.py

index 5f672c66a7ae1ef223075e1790dd09d2041da1b3..6663c262d1469a1b8c01da847445790873e95642 100644 (file)
@@ -9,8 +9,6 @@ http://www.python.org/dev/peps/pep-0205/
 # they are called this instead of "ref" to avoid name collisions with
 # the module-global ref() function imported from _weakref.
 
-import collections
-
 from _weakref import (
      getweakrefcount,
      getweakrefs,
@@ -22,6 +20,8 @@ from _weakref import (
 
 from _weakrefset import WeakSet
 
+import collections  # Import after _weakref to avoid circular import.
+
 ProxyTypes = (ProxyType, CallableProxyType)
 
 __all__ = ["ref", "proxy", "getweakrefcount", "getweakrefs",