[pypy-issue] [issue1703] Crash when overriding PyType_Type.tp_new

Armin Rigo tracker at bugs.pypy.org
Mon Mar 10 07:53:50 CET 2014


Armin Rigo <armin.rigo at gmail.com> added the comment:

Checked in the tests as
cpyext/test/test_typeobject.py:test_tp_new_in_subclass_of_type.  The issue is
that PyType_Type.tp_new just calls slot_tp_new, which calls again
space.getattr(w_type, space.wrap("__new__")), leading to infinite recursion.

Unsure how much there is really to fix.  It seems to me that *any* slot has the
same problem.  But then probably not, otherwise this issue would have shown up
much earlier...

----------
nosy: +arigo
status: unread -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1703>
________________________________________


More information about the pypy-issue mailing list