Skip to content

Support free-threaded CPython 3.14 - #1

Open
Kludex wants to merge 3 commits into
mainfrom
python-3.14t-support
Open

Support free-threaded CPython 3.14#1
Kludex wants to merge 3 commits into
mainfrom
python-3.14t-support

Conversation

@Kludex

@Kludex Kludex commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • add CI coverage for regular CPython 3.14 and free-threaded 3.14t on Linux and macOS
  • avoid private free-threaded CPython symbols by using public refcount and type-flag APIs on 3.14t
  • load the extension under CPython's compatibility GIL and document that behavior
  • package only the extension matching the wheel's active ABI

Root cause

The free-threaded refcount and type-check macros expanded to private CPython helpers, leaving unresolved symbols such as __Py_ThreadId and _Py_atomic_load_uint64_relaxed in the extension. The wildcard wheel artifact rule could also collect stale extensions built for other Python ABIs.

Validation

  • CPython 3.14: 274 passed, 1 expected 3.14t-only skip; 100% coverage
  • CPython 3.14t: 275 passed; 100% coverage
  • Ruff check and format check
  • mypy strict type check
  • strict documentation build
  • isolated build and import of cp314 and cp314t wheels; each wheel contains only its matching extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant