Skip to content

Ship stable-ABI (abi3-py311) wheels — one wheel per platform, every CPython ≥ 3.11 - #112

Merged
kurok merged 1 commit into
masterfrom
feature/abi3-wheels
Aug 3, 2026
Merged

Ship stable-ABI (abi3-py311) wheels — one wheel per platform, every CPython ≥ 3.11#112
kurok merged 1 commit into
masterfrom
feature/abi3-wheels

Conversation

@kurok

@kurok kurok commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements the abi3 half of #101: wheels now target the CPython stable ABI (cp311-abi3), so one wheel per platform covers every CPython ≥ 3.11 — including versions that don't exist yet. This permanently ends the "new Python, no wheel" failure mode behind #14 and #15.

Changes

  • Cargo.toml — enable pyo3/abi3-py311 (baseline matches requires-python >= 3.11).
  • publish.yml — drop --find-interpreter: each platform job builds a single abi3 wheel instead of one per interpreter. Platform matrix unchanged.
  • test.yml — build once, test everywhere: a new build-wheel job builds one manylinux abi3 wheel; the 3.11–3.14 test matrix installs that same wheel and runs the suite against it. The abi3 promise is verified, not assumed. Side effect: the test matrix no longer needs a Rust toolchain — four fewer Rust builds per PR.
  • Readme.md — supported-versions table + free-threaded note.
  • CHANGELOG.md — Unreleased entry.

Benchmark decision (the >5% rule from #101)

Min parse time, CPython 3.12, Apple Silicon (M-series), two runs per configuration, --benchmark-min-rounds=25:

Build run 1 run 2 speedup vs mail-parser
version-specific (master) 2.0939 ms 2.1197 ms 4.36x / 4.32x
abi3 (this PR) 1.8786 ms 1.8474 ms 4.92x / 5.01x

abi3 measured ~11% faster, consistently across runs. Decision: full abi3, no hybrid version-specific wheels. The check_benchmark.py floor (7.0x) is left unchanged: the CI benchmark job builds from source, which is now abi3 by default, and the measured direction is favorable.

Free-threaded CPython (deferred, with reasons)

The cp313t/cp314t half of #101 is deferred:

Verification

  • One locally built cp311-abi3-macosx_11_0_arm64 wheel installed on CPython 3.11, 3.12, and 3.14: 91/91 tests pass on each (3.13 is covered by the CI matrix).
  • actionlint and YAML parse clean on both workflows; cargo fmt --check clean.

Cross-refs #14 and #15 — those close when the fixed release actually reaches PyPI (blocked on the PEP 541 transfer, pypi/support#11044).

One cp311-abi3 wheel per platform now covers every CPython >= 3.11,
including future releases - ending the "new Python, no wheel" cycle
(#14, #15).

- Cargo.toml: enable pyo3/abi3-py311 (baseline matches requires-python)
- publish.yml: drop --find-interpreter; each platform job builds a
  single abi3 wheel
- test.yml: build the wheel once, install that same wheel on CPython
  3.11-3.14 and run the suite against it (abi3 promise verified, not
  assumed); the test matrix no longer needs a Rust toolchain
- Readme/CHANGELOG: supported-versions table, free-threaded note

Benchmark (min parse time, CPython 3.12, Apple Silicon, two runs each):
abi3 1.85-1.88 ms vs version-specific 2.09-2.12 ms - abi3 measured ~11%
faster, so no hybrid version-specific wheels are shipped.

Part of #101

Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
@kurok
kurok force-pushed the feature/abi3-wheels branch from 0330ea0 to 77d383a Compare July 30, 2026 10:53
@kurok
kurok merged commit 0f16e39 into master Aug 3, 2026
8 checks passed
@kurok
kurok deleted the feature/abi3-wheels branch August 3, 2026 10:05
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