Author: Brian Kearns <[email protected]>
Branch: fix-tpname
Changeset: r71205:f1afb02b246a
Date: 2014-05-02 15:31 -0400
http://bitbucket.org/pypy/pypy/changeset/f1afb02b246a/

Log:    fix cpyext slot wrapper repr

diff --git a/pypy/module/cpyext/methodobject.py 
b/pypy/module/cpyext/methodobject.py
--- a/pypy/module/cpyext/methodobject.py
+++ b/pypy/module/cpyext/methodobject.py
@@ -174,7 +174,7 @@
     def descr_method_repr(self):
         return self.space.wrap("<slot wrapper '%s' of '%s' objects>" %
                                (self.method_name,
-                                self.w_objclass.getname(self.space)))
+                                self.w_objclass.name))
 
 def cwrapper_descr_call(space, w_self, __args__):
     self = space.interp_w(W_PyCWrapperObject, w_self)
diff --git a/pypy/module/cpyext/test/test_typeobject.py 
b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -33,7 +33,7 @@
         assert "copy" in repr(module.fooType.copy)
         assert repr(module.fooType) == "<type 'foo.foo'>"
         assert repr(obj2) == "<Foo>"
-        assert repr(module.fooType.__call__) == "<slot wrapper '__call__' of 
'foo' objects>"
+        assert repr(module.fooType.__call__) == "<slot wrapper '__call__' of 
'foo.foo' objects>"
         assert obj2(foo=1, bar=2) == dict(foo=1, bar=2)
 
         print(obj.foo)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to