Author: Armin Rigo <[email protected]>
Branch:
Changeset: r52389:21f1095789ea
Date: 2012-01-20 10:12 +0100
http://bitbucket.org/pypy/pypy/changeset/21f1095789ea/
Log: Skip this import if it fails because of _weakref (transplanted from
ffedd17ff570417c0201182e14a61bafe7b7697a)
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