On 06. 12. 21 20:29, Guido van Rossum wrote:
Hi Petr,
In PEP 384 it is written that no functions starting with an underscore are part of the stable ABI:
PEP 384 -- Defining a Stable ABI | Python.org <https://www.python.org/dev/peps/pep-0384/#excluded-functions>
All functions starting with _Py are not available to applications
OTOH there's a data file in the repo, Misc/stabe_abi.txt, which lists many functions starting with _Py_, for example _PyObject_GC_Malloc. Then again, that function is not listed in Doc/data/stable_abi.dat. (I didn't check other functions, but maybe there are others.)
So is Misc/stable_abi.txt just out of date? Or how can the discrepancy be explained?
These are not part of the limited API, so extension authors can't use them in the C source. But they typically are (or have been) called by macros from the limited API. So, they are part of the stable ABI; they need to be exported. Misc/stable_abi.txt says "abi_only" for all of these. They don't show up in the user-facing docs.