On 04. 06. 21 10:25, Serhiy Storchaka wrote:
03.06.21 20:10, Guido van Rossum пише:
This is not a complete thought yet, but it occurred to me that while we have deprecated APIs (which will eventually go away), and provisional APIs (which must mature a little before they're declared stable), and stable APIs (which everyone can rely on), it might be good to also have something like *unstable* APIs, which will continually change without ever going away or stabilizing. Examples would be the ast module (since the AST structure changes every time the grammar changes) and anything to do with code objects and bytecode (since we sometimes think of better ways to execute Python).
So maybe the docs should grow a standard way of saying "this is an unstable API"?
There is already a way to specify the stable ABI (see Doc/tools/extensions/c_annotations.py). But unfortunately this feature is not is not used in the documentation. It needs just an amount of work to do this, and nobody did this.
It is used, and I started the work :) See e.g. https://docs.python.org/3.10/c-api/sequence.html#c.PySequence_Concat
After marking all stable ABI we can extend this feature to support halftones: provisional API, unstable API for Cython, etc.
I don't think that's necessary for the C API; the three-tier structure we have now (see https://devguide.python.org/c-api/ ) is, IMO, sufficient. I don't think it can be easily adapted for the Python API, though.