Stefan Behnel <stefan...@behnel.de> added the comment:

I ran into this, too. I agree that the "hackcheck" loop on heap types is 
probably wrong.

https://github.com/python/cpython/blob/04fc4f2a46b2fd083639deb872c3a3037fdb47d6/Objects/typeobject.c#L5947-L5977

It was written at a time (Py2.3?) when (practically) only Python implemented 
types were heap types, not extension types. I think what it tried to do was to 
find the builtin base type of a Python type, and check that no-one played 
tricks on the C slot functions of that C implemented type. With extension types 
implemented as heap types, having a different slot function in there is a 
perfectly valid thing.

I'll call in a couple of people since I'm also not sure how to fix the 
"hackcheck".

I'll also leave Py3.7 in the list of affected Python versions since we still 
have a short week before its final non-secfix-release. :)

----------
nosy: +gvanrossum, petr.viktorin, scoder
type:  -> behavior
versions: +Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39960>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to