Author: Armin Rigo <[email protected]>
Branch: stm
Changeset: r51513:ffedd17ff570
Date: 2012-01-20 10:12 +0100
http://bitbucket.org/pypy/pypy/changeset/ffedd17ff570/

Log:    Skip this import if it fails because of _weakref

diff --git a/lib-python/modified-2.7/UserDict.py 
b/lib-python/modified-2.7/UserDict.py
--- a/lib-python/modified-2.7/UserDict.py
+++ b/lib-python/modified-2.7/UserDict.py
@@ -85,8 +85,12 @@
     def __iter__(self):
         return iter(self.data)
 
-import _abcoll
-_abcoll.MutableMapping.register(IterableUserDict)
+try:
+    import _abcoll
+except ImportError:
+    pass    # e.g. no '_weakref' module on this pypy
+else:
+    _abcoll.MutableMapping.register(IterableUserDict)
 
 
 class DictMixin:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to