@@ -8,14 +8,14 @@ Migrating to Stable ABI for free threading (``abi3t``)
88
99Starting with the 3.15 release, CPython supports a variant of the Stable ABI
1010that supports :term: `free-threaded <free threading> ` Python:
11- Stable ABI for Free-Threaded Builds, or ``abi3t `` for short.
11+ the Stable ABI for Free-Threaded Builds, or ``abi3t `` for short.
1212This document describes how to adapt C API extensions to support free threading.
1313
1414Why do this
1515===========
1616
17- The typical reason to use Stable ABI is to reduce the number of artifacts that
18- you need to build and distribute for each version of your library.
17+ The typical reason to use the Stable ABI is to reduce the number of artifacts
18+ that you need to build and distribute for each version of your library.
1919
2020Without the Stable ABI, you must build a separate shared library, and typically
2121a *wheel * distribution, for each feature version of CPython you wish
@@ -87,16 +87,16 @@ builds; even the 3.15+ ones that this table "attributes" to ``abi3t``.)
8787Why *not * do this
8888-----------------
8989
90- There are two main downsides to Stable ABI.
90+ There are two main downsides to the Stable ABI.
9191
92- First, you extension may become slower, since Stable ABI prioritizes
92+ First, your extension may become slower, since the Stable ABI prioritizes
9393compatibility over performance.
9494The difference is usually not noticeable, and often can be mitigated by
9595using the same source to build both a Stable ABI build and a few
9696version-specific ones for "tier 1" CPython versions.
9797
9898Second, not all of the C API is available.
99- Extensions need to be ported to build for Stable ABI, which may be difficult
99+ Extensions need to be ported to build for the Stable ABI, which may be difficult
100100or, in rare cases, impossible.
101101
102102Specifically, ``abi3t `` requires APIs added in CPython 3.15.
@@ -127,15 +127,15 @@ Prerequisites
127127This guide assumes that you have an extension written directly in C (or C++),
128128which you want to port to ``abi3t ``.
129129
130- If your extenstion uses a code generator (like Cython) or language binding
130+ If your extension uses a code generator (like Cython) or language binding
131131(like PyO3), it's best to wait until that tool has support for ``abi3t ``.
132132If you maintain such a tool, you might be able to adapt the instructions
133133here for your tool.
134134
135135Non-free-threaded Stable ABI
136136----------------------------
137137
138- Your extension should support the Stable ABI (``abi3t ``).
138+ Your extension should support the non-free-threaded Stable ABI (``abi3 ``).
139139If not, either port it first, or follow this guide but be prepared to fix
140140issues it does not mention.
141141
@@ -183,7 +183,7 @@ following just after ``#include <Python.h>``::
183183 #error "abi3t define is not set!"
184184 #endif
185185
186- This should result in a different error than "``abt3t `` define is not set".
186+ This should result in a different error than "``abi3t `` define is not set".
187187
188188.. note ::
189189
@@ -705,7 +705,7 @@ Testing
705705Note that when you build an extension compatible with multiple versions of
706706CPython, you should always *test * it with each version it supports (for
707707example, 3.15, 3.16, and so on).
708- Stable ABI only guarantees *ABI * compatibility; there may also be behavior
708+ The Stable ABI only guarantees *ABI * compatibility; there may also be behavior
709709changes -- both intentional ones (covered by :pep: `387 `) and bugs.
710710
711711Be sure to run tests on both free-threaded and non-free-threaded builds
0 commit comments