66C API Stability
77***************
88
9- Python's C API is covered by the Backwards Compatibility Policy, :pep: `387 `.
9+ Unless documented otherwise, Python's C API is covered by the Backwards
10+ Compatibility Policy, :pep: `387 `.
1011Most changes to it are source-compatible (typically by only adding new API).
1112Changing existing API or removing API is only done after a deprecation period
1213or to fix serious issues.
@@ -17,13 +18,25 @@ way; see :ref:`stable-abi-platform` below).
1718So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa,
1819but will need to be compiled separately for 3.9.x and 3.10.x.
1920
21+ There are two tiers of API with different stability exepectations:
22+
23+ - *Unstable API *, ``PyUnstable `` prefix, may change in minor versions
24+ without a deprecation period.
25+ - *Limited API *, enabled by defining :c:macro: `Py_LIMITED_API `,
26+ is compatible across several minor releases.
27+
28+ These are discussed in more detail below.
29+
2030Names prefixed by an underscore, such as ``_Py_InternalState ``,
2131are private API that can change without notice even in patch releases.
32+ If you need to use this API, consider reaching out to
33+ `
CPython developers <
mailto:[email protected] >`_ to discusss adding
34+ external API for your use case.
2235
23- .. _unstable-c-api ::
36+ .. _unstable-c-api :
2437
2538Unstable C API
26- =================
39+ ==============
2740
2841.. index :: single: PyUnstable
2942
0 commit comments