[Python-Dev] Stable ABI or not for PyTypeObject? (original) (raw)

Jeroen Demeyer J.Demeyer at UGent.be
Mon May 6 09:55:03 EDT 2019


Hello,

I have a simple question for which there doesn't seem to be a good answer: is the layout of PyTypeObject considered to be part of the stable ABI?

Officially, the answer is certainly "no" (see PEP 384).

However, unofficially the answer might be "yes". At least, the last time that an incompatible change was made to PyTypeObject (adding tp_finalize in Python 3.4, PEP 442), care was taken not to break the ABI by using the Py_TPFLAGS_HAVE_FINALIZE flag.

There is some discussion about this on https://bugs.python.org/issue32388

The implementation of PEP 590 is going to make another ABI-breaking change. So should we add a new Py_TFLAGS_HAVE_... flag for that or not?

Jeroen.



More information about the Python-Dev mailing list