[issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot()

Petr Viktorin report at bugs.python.org
Thu Nov 5 10:28:09 EST 2020


Petr Viktorin <encukou at gmail.com> added the comment:

My views on individual slots:

Not a function, shouldn't be used with PyType_Slot:
  * tp_dict - I'd add a PyType_GetDict if there is a need to get this
  * tp_mro - I'd add a PyType_GetMRO if there is a need to get this
(There are existing slots that aren't functions; I'd like to deprecate them in the long term.)

internal use only, do not expose:
  * tp_cache
  * tp_subclasses
  * tp_weaklist
  * tp_as_*

Not part of limited API, do not expose:
  * tp_vectorcall

Can be exposed if we deem all of the related API stable:
  * bf_getbuffer
  * bf_releasebuffer

----------

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


More information about the Python-bugs-list mailing list