[Python-Dev] Are undocumented functions part of the stable ABI?
As you may guess from the silence, it may be hard to get a definitive
answer to this question -- PEP 384's author has stopped actively
participating in the Python community and I'm not sure if any core
developers currently consider themselves to be the "guardians of the ABI".
That said, from a quick skim of PEP 384 it seems to be quite strict in its
position that anything not explicitly included by the PEP should be
considered not part of the ABI, which makes me think that only a few
PyCFunction related items are considered part of the ABI (searching for
PyCFunction only finds three hits). OTOH it states that if Py_LIMITED_API
is defined, all definitions that are not part of the ABI will be hidden. So
from that (plus the source code) you should be able to tell which
PyCFunction_* functions are part of the ABI -- again it does not appear the
documentation status of a function matters for this rule.
On the third hand, PEP 384 references a file "python3.def" (
https://www.python.org/dev/peps/pep-0384/#id5) and that file contains
several PyCFunction_* names. Maybe this is the hard rule you're looking
for? Again, being documented is not a requirement.
Another observation would be that (AFAICT) PEP 384 strictly forbids
signature changes, but is mostly silent on semantics.
On Wed, Apr 4, 2018 at 10:34 PM, Jeroen Demeyer <J.Demeyer at ugent.be> wrote:
> On 2018-04-04 17:56, Guido van Rossum wrote:
>> It would be helpful if you explained the context of your request.
> The context is PEP 575. I guess my question is mostly about
> PyCFunction_Check(). I will not be able to keep it 100% backwards
> compatible simply because the goal of that PEP is precisely changing the
> classes of some objects.
> Now the question is: am I allowed to change the implementation of
> PyCFunction_Check()? If it's considered part of the stable ABI, then the
> answer is immediately "no".
> By the way, does anybody happen to know why the PyCFunction_* functions
> are undocumented? Is it just an oversight in the docs or is it intentional?
> But regardless of the context, I think that the question "Are undocumented
> functions part of the stable ABI?" should be answered in PEP 384.
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...