Author: Armin Rigo <[email protected]>
Branch: remove-objspace-options
Changeset: r83857:993d83f6db5a
Date: 2016-04-25 12:55 +0200
http://bitbucket.org/pypy/pypy/changeset/993d83f6db5a/
Log: Fix for (at least some) ztranslation tests
diff --git a/pypy/module/__builtin__/interp_classobj.py
b/pypy/module/__builtin__/interp_classobj.py
--- a/pypy/module/__builtin__/interp_classobj.py
+++ b/pypy/module/__builtin__/interp_classobj.py
@@ -186,6 +186,14 @@
class Cache:
def __init__(self, space):
from pypy.interpreter.typedef import _getusercls
+
+ if hasattr(space, 'is_fake_objspace'):
+ # hack: with the fake objspace, we don't want to see typedef's
+ # _getusercls() at all
+ self.cls_without_del = W_InstanceObject
+ self.cls_with_del = W_InstanceObject
+ return
+
self.cls_without_del = _getusercls(
space.config, W_InstanceObject, False, reallywantdict=True)
self.cls_with_del = _getusercls(
diff --git a/pypy/objspace/fake/objspace.py b/pypy/objspace/fake/objspace.py
--- a/pypy/objspace/fake/objspace.py
+++ b/pypy/objspace/fake/objspace.py
@@ -120,6 +120,8 @@
'bytearray', 'buffer', 'set', 'frozenset']
class FakeObjSpace(ObjSpace):
+ is_fake_objspace = True
+
def __init__(self, config=None):
self._seen_extras = []
ObjSpace.__init__(self, config=config)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit