Repository navigation
feat: add support for Python 3.15 - #99
Jeremiah-England wants to merge 1 commit into
Conversation
Bump pyo3 and rust-numpy to 0.29, which support Python 3.15 while keeping Python 3.8 (0.30 drops 3.8). Add 3.15 to the CI test matrix, wheel build interpreters, and classifiers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #99 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 4 4
Lines 371 371
=====================================
Misses 371 371 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The one failing check, Benchmarks (CodSpeed), isn't caused by this PR. That workflow installs This is tracked upstream in CodSpeedHQ/pytest-codspeed#146 ("Support pytest 9.2"). The workflow last passed on All the other checks pass, including the new 3.15 test jobs on Linux, macOS and Windows. |
Adds Python 3.15 support (same idea as #89 for 3.14).
pyo3andnumpy(rust-numpy) from 0.28 to 0.29, which support Python 3.15. I stopped at 0.29 rather than 0.30 because 0.30 drops Python 3.8. Happy to go straight to 0.30 and drop 3.8 if you'd prefer.No Rust source changes were needed. Tested locally on Linux x86_64 with nightly Rust: the test suite passes on Python 3.15.2 and 3.8, and
make lint-rustpasses.Notes on this PR
Decisions
PyO3 / rust-numpy 0.29 instead of 0.30. PyO3 0.28 doesn't support Python 3.15. Both 0.29 and 0.30 do: 0.29.0 added 3.15 support (beta at the time), and 0.30.0 lists "Support Python 3.15.0 final". However, both PyO3 0.30 and rust-numpy 0.30 also drop Python 3.8, and this package still declares
requires-python = ">=3.8"and builds 3.8 wheels. Stopping at 0.29 keeps 3.8 working, so this PR doesn't force a support-policy change. If you'd rather go straight to 0.30 and drop 3.8, I'm happy to update the PR to do that (bumprequires-python, remove 3.8 from the CI matrix and classifiers).No Rust source changes. The 0.28 → 0.29 bump compiled cleanly against the existing
src/lib.rs.Scope kept minimal. The only changes are the version bumps plus adding
3.15to the CI test matrix, the wheel build--interpreterlist, and the classifiers. I didn't add free-threaded (3.15t) builds.Testing
All local, on Linux x86_64:
cargo build --release(nightly 1.101.0, 2026-10-28)maturin develop --release+pytest --benchmark-skipon Python 3.15.2cargo fmt --all -- --checkcargo clippywith the flags frommake lint-rustNot tested locally: macOS, Windows, and the other wheel targets (aarch64, musl, etc.). The
Testjob covers macOS and Windows on 3.15. TheBuildjob (the actual wheels) only runs onmain, tags, or PRs labelled Full Build, so would you mind adding that label? Then the 3.15 wheels get exercised before merging. The workflow change is the same two lines #89 changed for 3.14, which shipped wheels on all 12 platforms.Things I ran into
cfg_select!polyfill to the std macro when it sees rustc ≥ 1.95. A 1.95 nightly from before the macro was stabilized (I hadnightly-2026-02-05) therefore fails witherror[E0658]: use of unstable library feature 'cfg_select'. A current nightly works. This only matters to someone building the sdist with a stale nightly pinned through the repo'srust-toolchainfile. CI runsrustup update nightly, so it isn't affected.unnecessary transmuteindownsample_rs/src/lttb.rs:9(suggestsf64::to_bits(v).cast_signed()). It's a warning in thedownsample_rspath dependency, so-D warningsdoesn't fail the lint, and it shows up identically onmain. I left it alone to keep this PR focused.