8000 [3.13] gh-127253: Note that Stable ABI is about ABI stability (GH-127… · python/cpython@3479a71 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3479a71

Browse files
[3.13] gh-127253: Note that Stable ABI is about ABI stability (GH-127254) (GH-127557)
(cherry picked from commit 35d37d6) Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent e546876 commit 3479a71

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Doc/c-api/stable.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Limited C API
6666

6767
Python 3.2 introduced the *Limited API*, a subset of Python's C API.
6868
Extensions that only use the Limited API can be
69-
compiled once and work with multiple versions of Python.
69+
compiled once and be loaded on multiple versions of Python.
7070
Contents of the Limited API are :ref:`listed below <limited-api-list>`.
7171

7272
.. c:macro:: Py_LIMITED_API
@@ -76,7 +76,7 @@ Contents of the Limited API are :ref:`listed below <limited-api-list>`.
7676

7777
Define ``Py_LIMITED_API`` to the value of :c:macro:`PY_VERSION_HEX`
7878
corresponding to the lowest Python version your extension supports.
79-
The extension will work without recompilation with all Python 3 releases
79+
The extension will be ABI-compatible with all Python 3 releases
8080
from the specified one onward, and can use Limited API introduced up to that
8181
version.
8282

@@ -94,7 +94,15 @@ Stable ABI
9494
----------
9595

9696
To enable this, Python provides a *Stable ABI*: a set of symbols that will
97-
remain compatible a 7A9E cross Python 3.x versions.
97+
remain ABI-compatible across Python 3.x versions.
98+
99+
.. note::
100+
101+
The Stable ABI prevents ABI issues, like linker errors due to missing
102+
symbols or data corruption due to changes in structure layouts or function
103+
signatures.
104+
However, other changes in Python can change the *behavior* of extensions.
105+
See Python's Backwards Compatibility Policy (:pep:`387`) for details.
98106

99107
The Stable ABI contains symbols exposed in the :ref:`Limited API
100108
<limited-c-api>`, but also other ones – for example, functions necessary to

0 commit comments

Comments
 (0)
0