[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

Guido van Rossum report at bugs.python.org
Sun Jun 21 18:00:47 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

That sounds like the right thing to do. You should be able to recognize pure Python __setattr__ implementations by the presence of slot_tp_setattro in the tp_setattro slot. (Likewise for __delattr__.)

It's been really long since I looked at this -- do we still only support single inheritance at the C level? Because otherwise there would be another backdoor.

There's also tp_setattr (no 'o') but I think that's basically unused, and we ignored that in 2003 so we should be able to ignore it now. :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39960>
_______________________________________


More information about the Python-bugs-list mailing list