Skip to content

Conversation

@kosiew
Copy link
Contributor

@kosiew kosiew commented Jan 28, 2026

Which issue does this PR close?


Rationale for this change

Python’s experimental free-threaded builds (currently 3.13t and 3.14t) use a different ABI than the standard GIL-enabled CPython builds. Because of that, we can’t rely on a single stable-ABI (abi3) wheel to cover these interpreters.

At the same time, we still want to keep the existing abi3-py310 configuration so we continue producing stable-ABI wheels for the “normal” (GIL-enabled) CPython versions.

This PR updates the release/build pipeline so we can ship:

  • stable-ABI wheels for standard CPython (via abi3-py310), and
  • version-specific wheels for free-threaded CPython (cp313t / cp314t).

What changes are included in this PR?

  • Expanded CI build matrix for macOS + Windows to build wheels for:

    • CPython 3.10–3.14 (standard builds)
    • CPython 3.13t + 3.14t (free-threaded builds)
  • Artifact naming improvements using a suffix (e.g. -freethreaded) to avoid collisions and make uploads easier to identify.

  • maturin invocation updated on macOS/Windows to explicitly target the active interpreter (--interpreter python).

  • Manylinux builds split into two groups:

    • standard CPython interpreters (3.10–3.14)
    • free-threaded interpreters (3.13t–3.14t)
      using maturin-action’s interpreter parameter.
  • Cargo / PyO3 config adjustment: removed the generic abi3 feature while keeping abi3-py310 enabled, aligning with the intended wheel strategy.

  • Release documentation updated to clarify that free-threaded CPython ignores abi3 and requires per-version wheels.


Are these changes tested?

  • CI was updated to build wheels across the expanded interpreter matrix on:

    • macOS (universal / aarch64 and x86_64 job)
    • Windows
    • manylinux x86_64 and aarch64

These builds act as the primary validation for this change (successful wheel builds + artifact upload for each target).


Are there any user-facing changes?

Yes — users will now see additional wheel files published for free-threaded Python:

  • cp313t and cp314t wheels (per-ABI/per-version)

Standard CPython users (3.10–3.14) continue to get stable-ABI (abi3) wheels as before.

No runtime API changes are introduced by this PR.


LLM-generated code disclosure

This PR includes code, comments generated with assistance from LLM. All LLM-generated content has been manually reviewed and tested.

Add macOS/Windows entries for free-threaded variants.
Include distinct artifact suffixes and use explicit maturin
interpreter settings. Add manylinux entries for the latest
Python versions with similar configurations.
Rely on explicit abi3-py310 flag for ABI3 compatibility in the
PyO3 dependency feature set while retaining extension-module
enabled. Document the rationale for free-threaded 3.13/3.14 wheels
alongside ABI3 wheel guidance in the release notes.
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.

Add support for free threaded python

1 participant