Message396829
In inherit_slots() in Objects/typeobject.c, Py_TPFLAGS_HAVE_VECTORCALL inheritance depends on if the base type is a heap type or not. This aligns with PEP 590[1]:
Heap types never inherit the vectorcall protocol because that
would not be safe (heap types can be changed dynamically).
AFAICS, inherit_slots() should now use Py_TPFLAGS_IMMUTABLETYPE to decide if Py_TPFLAGS_HAVE_VECTORCALL can be inherited, and the PEP should be updated.
- [1] https://www.python.org/dev/peps/pep-0590/#subclassing |
|
Date |
User |
Action |
Args |
2021-07-01 21:40:21 | erlendaasland | set | recipients:
+ erlendaasland, gvanrossum, vstinner, christian.heimes, Mark.Shannon, serhiy.storchaka, Guido.van.Rossum, corona10, pablogsal, miss-islington, shihai1991, shreyanavigyan |
2021-07-01 21:40:21 | erlendaasland | set | messageid: <1625175621.25.0.852301604904.issue43908@roundup.psfhosted.org> |
2021-07-01 21:40:21 | erlendaasland | link | issue43908 messages |
2021-07-01 21:40:21 | erlendaasland | create | |
|