Skip to content

Commit

Permalink
clarify limited API support a bit (#106)
Browse files Browse the repository at this point in the history
* clarify limited API support a bit

* [pre-commit.ci lite] apply automatic fixes

* respond to ralf's suggestions

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
ngoldbaum and pre-commit-ci-lite[bot] authored Nov 4, 2024
1 parent a261ac0 commit 4da6476
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/porting.md
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,11 @@ build.
### Limited API support

The free-threaded build does not support the limited CPython C API. If you
currently use the limited API you will not be able to use it while shipping
binaries for the free-threaded build. This also means that code inside
`#ifdef Py_GIL_DISABLED` checks can use C API constructs outside the limited API if you
would like to do that, although these uses will need to be removed once the
free-threaded build gains support for compiling with the limited API.
currently use the limited API to build wheels that do not depend on a specific
Python version, you will not be able to use it while shipping binaries for the
free-threaded build. In practice, the limited API is a subset of the full C API,
so your extension will build, you just cannot set `Py_LIMITED_API` at build
time. This also means that code inside `#ifdef Py_GIL_DISABLED` checks can use C
API constructs outside the limited API if you would like to do that, although
these uses will need to be removed once the free-threaded build gains support
for compiling with the limited API.

0 comments on commit 4da6476

Please sign in to comment.