On 02. 02. 22 11:50, Stefan Behnel wrote:
Petr Viktorin schrieb am 02.02.22 um 10:22:
Moving off the internal (unstable) API would be great, but I don't
think Cython needs to move all the way to the limited API.
There are three "levels" in the C API:
- limited API, with long-term ABI compatibility guarantees
That's what "-DCYTHON_LIMITED_API -DPy_LIMITED_API=..." is supposed to
do, which currently fails for much if not most code.
- "normal" public API, covered by the backwards compatibility policy
(users need to recompile for every minor release, and watch for
deprecation warnings)
That's probably close to what "-DCYTHON_LIMITED_API" does by itself as
it stands. I can see that being a nice feature that just deserves a more
suitable name. (The name was chosen because it was meant to also
internally define "Py_LIMITED_API" at some point. Not sure if it will
ever do that.)
- internal API (underscore-prefixed names, `internal` headers, things
documented as private)
AFAIK, only the last one is causing trouble here.
Yeah, and that's the current default mode on CPython.
Beware that there are no guarantees on this API. It can change *at any
time*. Technically, it can even change in point releases (only ABI must
not change).
We probably won't change it in a point release, especially not in a way
that would break Cython, but it would still be great to move to the
public API instead.
Maybe we should advertise the two modes more. And make sure that both
work. There are certainly issues with the current state of the "limited
API" implementation, but that just needs work and testing.
I wonder if it can it be renamed? "Limited API" has a specific meaning
since PEP 384, and using it for the public API is adding to the general
confusion in this area :(
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/CNIPFAWQY5KGV662SAY3LFMXEARYXVT2/
Code of Conduct: http://python.org/psf/codeofconduct/