summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-03-25 23:31:22 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-03-25 23:31:22 (GMT)
commit663fffa4e2d4e4eb4955bfcedfe09453899d1210 (patch)
tree7079691b8b7ed4c13d9db5381ade35cf77e9ddfc
parent52dc06b23cea3c46cdfcfb4e420d4fddcaf29f61 (diff)
downloadcpython-663fffa4e2d4e4eb4955bfcedfe09453899d1210.zip
cpython-663fffa4e2d4e4eb4955bfcedfe09453899d1210.tar.gz
cpython-663fffa4e2d4e4eb4955bfcedfe09453899d1210.tar.bz2
Fix a circular import dependency.
-rw-r--r--Lib/weakref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/weakref.py b/Lib/weakref.py
index 5f672c6..6663c26 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -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",