Author: Matti Picus <matti.pi...@gmail.com>
Branch: cpyext-subclass-setattr
Changeset: r94236:98123cec9206
Date: 2018-04-04 19:50 +0300
http://bitbucket.org/pypy/pypy/changeset/98123cec9206/

Log:    backed out changeset 36ff2c150968, try a different approach
        (arigato)

diff --git a/pypy/module/cpyext/typeobject.py b/pypy/module/cpyext/typeobject.py
--- a/pypy/module/cpyext/typeobject.py
+++ b/pypy/module/cpyext/typeobject.py
@@ -858,7 +858,6 @@
     track_reference(space, py_obj, w_obj)
     # __init__ wraps all slotdefs functions from py_type via add_operators
     w_obj.__init__(space, py_type)
-    w_obj.flag_cpytype = True
     w_obj.ready()
 
     finish_type_2(space, py_type, w_obj)
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
@@ -1199,9 +1199,7 @@
     for w_base in w_self.bases_w:
         if not isinstance(w_base, W_TypeObject):
             continue
-        # set only in cpyext type_realize, so user-created types will
-        # still use w_root_attach_pyobj (in cpyext.pyobject)
-        #w_self.flag_cpytype |= w_base.flag_cpytype
+        w_self.flag_cpytype |= w_base.flag_cpytype
         w_self.flag_abstract |= w_base.flag_abstract
         if w_self.flag_map_or_seq == '?':
             w_self.flag_map_or_seq = w_base.flag_map_or_seq
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to