[pypy-commit] pypy default: Last missing __objclass__

arigo pypy.commits at gmail.com
Mon Jan 16 14:38:00 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r89619:4dc79c0c13a6
Date: 2017-01-16 20:37 +0100
http://bitbucket.org/pypy/pypy/changeset/4dc79c0c13a6/

Log:	Last missing __objclass__

diff --git a/pypy/objspace/std/test/test_typeobject.py b/pypy/objspace/std/test/test_typeobject.py
--- a/pypy/objspace/std/test/test_typeobject.py
+++ b/pypy/objspace/std/test/test_typeobject.py
@@ -1333,3 +1333,4 @@
         assert int.__dict__['imag'].__objclass__ is int
         assert file.closed.__objclass__ is file
         assert type.__dict__['__name__'].__objclass__ is type
+        assert type.__dict__['__doc__'].__objclass__ is type
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -958,7 +958,7 @@
     __base__ = GetSetProperty(descr__base),
     __mro__ = GetSetProperty(descr_get__mro__),
     __dict__=GetSetProperty(type_get_dict),
-    __doc__ = GetSetProperty(descr__doc),
+    __doc__ = GetSetProperty(descr__doc, cls=W_TypeObject),
     mro = gateway.interp2app(descr_mro),
     __flags__ = GetSetProperty(descr__flags),
     __module__ = GetSetProperty(descr_get__module, descr_set__module),


More information about the pypy-commit mailing list