Skip to content

fix: ship abi3 wheels so Python 3.14 installs without compiling - #42

Merged
PricingFrontier merged 3 commits into
mainfrom
build/abi3-wheels
Nov 12, 2026
Merged

PricingFrontier merged 3 commits into
mainfrom
build/abi3-wheels

Conversation

@PricingFrontier

Copy link
Copy Markdown
Owner

Why

The release built one wheel per CPython version (3.10 to 3.13). On Python 3.14, pip and uv fell back to the sdist and compiled the Rust crate, which fails on any machine without a Rust toolchain. It was found when uv sync on Windows with Python 3.14 tried to build rustystats 0.10.0 from source.

What changes

  • One abi3 wheel per platform. The bindings build on CPython's stable ABI (abi3-py310), so each platform gets one cp310-abi3 wheel that installs on 3.10 and every later version. This is the same setup as t-boost.

  • PyO3 and rust-numpy 0.29. This clears RUSTSEC-2026-0177 (patched in pyo3 0.29.0). generate-import-lib is dropped because 0.29 deprecates it (pyo3-ffi now links Windows with raw-dylib). No Rust source changes were needed.

  • Release workflow:

    • The three build jobs drop --interpreter.
    • The file check expects exactly one cp310-abi3 wheel for each of the five platforms, and 6 files in all.
    • The Linux wheel is smoke-tested on 3.10 and 3.14.
    • A new smoke-native job installs the Windows x64 and macOS arm64 wheels on 3.14, and publish waits for it.
    • Every install uses --no-build. The runners have Rust, so without it a fallback compile would pass silently.
  • CI: adds Ubuntu 3.14 and moves Windows from 3.13 to 3.14. Ubuntu 3.10 stays as the floor.

  • Lock: upgrades the three locked packages that had no 3.14 wheel:

    Package Before After
    glum 3.1.2 3.4.1
    jpype1 1.6.0 1.7.1
    numpy 2.2.6 2.2.6 on 3.10, 2.3.5 on 3.11 and later

    It also adds tqdm, a new glum dependency. I locked with uv 0.10.12, because newer uv rewrites markers across the whole lock (the churn 5f135ca reverted). The lock passes uv lock --check on 0.10.12, 0.12.5 and 0.13.7.

  • glum oracle fixtures restamped in their own commit. Only the recorded oracle_version drifted. Lasso and elastic net regenerate identically, and ridge moves by at most 3e-14.

  • Docs: the installation page said Python 3.9+ and that Rust was required. It now says Python 3.10+ and that wheels need no Rust.

  • Version: 0.11.1, with a CHANGELOG.md entry.

Runtime dependencies are unchanged (numpy>=1.20,<2.4, polars>=2.0,<3).

Tested locally

  • Rust gates: cargo fmt --check, cargo clippy --workspace -- -D warnings, and cargo test --workspace in debug and release: 866 passed in each, with no warnings.

  • Wheel: maturin build --release gives rustystats-0.11.1-cp310-abi3-manylinux_2_35_x86_64.whl. It installs with --no-build on 3.10 and 3.14, scripts/package_smoke.py passes on both, and both load _rustystats.abi3.so.

  • Python suites:

    Python Passed Skipped
    3.14 (installed wheel) 2827 2
    3.13 (new lock) 2827 2
    3.10 (installed wheel) 2800 10

    On 3.14, filterwarnings = error caught nothing.

  • Oracle checks: every oracle drift and fixture check, plus the archive manifest and traceability checks, pass on 3.13.

  • Workflows: the new file check passes the expected set of files and rejects an extra per-version wheel, a missing platform and the wrong version. The Linux wheel smoke step runs locally against the built wheel.

  • Speed: the old and new builds ran alternately, four times each, in identical 3.13 environments with the same numpy, on benchmarks/bench_rustystats_only.py. The total moved +0.4%, and every case was within ±3.3% with mixed signs, so it's noise.

Not tested yet

The workflows on GitHub's runners: the manylinux and aarch64 builds, the Windows and macOS smoke jobs, and the Windows 3.14 test suite. Before merging, run Actions → Release → Run workflow on this branch with dry run ticked. It should produce five cp310-abi3 wheels and the sdist, and every smoke job should pass.

Notes

  • numpy cap (open): numpy<2.4 has no cp315 wheel, and the first numpy with one is 2.5.2. So on Python 3.15, rustystats installs from the wheel but numpy compiles. This PR only promises 3.10 to 3.14; raising the cap is a separate decision.
  • Dependabot: this replaces the stale dependabot/cargo/pyo3-0.29 and dependabot/cargo/numpy-0.29 branches, which can be closed.
  • After release: Haute pins rustystats>=0.10.0,<0.11, so it needs its own change to pick up 0.11.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FsfCCqGoCQPQncpUmsaX2o

PricingFrontier and others added 3 commits November 12, 2026 13:12
The release built one wheel per CPython version, 3.10 to 3.13, so on
3.14 pip and uv fell back to the sdist and compiled the Rust crate,
which fails on any machine without a Rust toolchain.

- Build the bindings on CPython's stable ABI (pyo3 `abi3-py310`): one
  cp310-abi3 wheel per platform installs on 3.10 and every later version.
- Move pyo3 and numpy to 0.29, which clears RUSTSEC-2026-0177, and drop
  `generate-import-lib`, which 0.29 deprecates. No source changes needed.
- Release: build without `--interpreter`, expect one abi3 wheel per
  platform and 6 files in all, and smoke-test the Linux wheel on 3.10
  and 3.14 and the Windows and macOS arm64 wheels on 3.14. Every install
  uses `--no-build`, so nothing may compile.
- CI: add Ubuntu 3.14 and move Windows to 3.14.
- Lock: upgrade glum, jpype1 and numpy, the locked packages with no 3.14
  wheel. Locked with uv 0.10.12, which keeps the diff to those packages.
- Docs: Python 3.10+, and wheels need no Rust.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsfCCqGoCQPQncpUmsaX2o
The lock moved glum from 3.1.2 to 3.4.1, the first version with Python
3.14 wheels, so the drift check failed on each fixture's recorded
oracle_version. The references themselves did not move: lasso and
elastic net regenerate identically, and ridge changes by at most 3e-14,
well inside the fixture tolerance. Regenerated with
`generate_glum_oracle_fixtures.py --accept`, as the archive manifest
prescribes for a glum version change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsfCCqGoCQPQncpUmsaX2o
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsfCCqGoCQPQncpUmsaX2o
@PricingFrontier
PricingFrontier merged commit ca088db into main Nov 12, 2026
19 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