Skip to content

Build stable-ABI wheels for Python 3.12+ - #41

Merged
marco-mariotti merged 1 commit into
masterfrom
codex/abi3-wheels
Aug 13, 2026
Merged

marco-mariotti merged 1 commit into
masterfrom
codex/abi3-wheels

Conversation

@marco-mariotti

Copy link
Copy Markdown
Member

Summary

  • upgrade PyO3 and numpy-rust to 0.29
  • enable PyO3's abi3-py312 stable ABI
  • build one wheel per supported platform/architecture instead of one per Python minor version
  • test the Linux x86_64 ABI3 wheel on Python 3.12, 3.13, and 3.14 before the publish job can run
  • document the stable-ABI Python floor

Context

This revisits the stable-ABI proposal from #24 against the current repository.
The package now requires Python 3.12, the core algorithms live in
ruranges-core, macOS wheels are built natively, and package versions are
already synchronized explicitly. Accordingly, this uses abi3-py312, retains
the current versioning scheme, and updates the current release workflow rather
than applying #24 verbatim.

This PR intentionally does not close #24 automatically; its discussion can be
wrapped up separately.

Impact

The release set falls from eight wheels to four for the current two Python
versions and four platform/architecture combinations. The same four wheels
also cover Python 3.14 and future compatible CPython releases without adding a
new build per Python minor version.

Local matched-build testing found no meaningful performance or memory cost:

  • 288 successful process benchmarks across all eight established operations,
    hg38 inputs from 1M through 100M, four implementations, and three repetitions
  • ABI3/native geometric-mean runtime change: +0.11%
  • ABI3/native geometric-mean peak-RSS change: -0.03%
  • zero output-row parity mismatches
  • median timing coefficient of variation: 0.73%, larger than the measured ABI difference

Validation

  • built ruranges-0.2.7-cp312-abi3-macosx_11_0_arm64.whl locally with maturin 1.14.1 and Rust 1.96.0
  • imported and exercised the built ABI3 extension through PyRanges1 1.4.3
  • ran the full local benchmark matrix described above
  • parsed the updated workflow as YAML and checked the patch with git diff --check

@marco-mariotti
marco-mariotti marked this pull request as ready for review August 13, 2026 20:42
@marco-mariotti
marco-mariotti merged commit 58ab5da into master Aug 13, 2026
16 checks passed
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