Skip to content

feat: add support for Python 3.15 - #99

Open
Jeremiah-England wants to merge 1 commit into
predict-idlab:mainfrom
Jeremiah-England:python-3.15
Open

Jeremiah-England wants to merge 1 commit into
predict-idlab:mainfrom
Jeremiah-England:python-3.15

Conversation

@Jeremiah-England

@Jeremiah-England Jeremiah-England commented Oct 29, 2026 •

Copy link
Copy Markdown

Generated and tested by Opus 5.5

Adds Python 3.15 support (same idea as #89 for 3.14).

  • Bump pyo3 and numpy (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.
  • Add 3.15 to the CI test matrix, the wheel build interpreters, and the classifiers.

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-rust passes.

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 (bump requires-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.15 to the CI test matrix, the wheel build --interpreter list, and the classifiers. I didn't add free-threaded (3.15t) builds.

Testing

All local, on Linux x86_64:

Check Result
cargo build --release (nightly 1.101.0, 2026-10-28) ✅
maturin develop --release + pytest --benchmark-skip on Python 3.15.2 ✅ 284 passed, 678 skipped (all benchmarks)
Same on Python 3.8 ✅ 284 passed, 678 skipped (all benchmarks)
cargo fmt --all -- --check ✅
cargo clippy with the flags from make lint-rust ✅

Not tested locally: macOS, Windows, and the other wheel targets (aarch64, musl, etc.). The Test job covers macOS and Windows on 3.15. The Build job (the actual wheels) only runs on main, 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

  • PyO3 0.29 doesn't build on some older nightlies. PyO3 0.29 switches from its cfg_select! polyfill to the std macro when it sees rustc ≥ 1.95. A 1.95 nightly from before the macro was stabilized (I had nightly-2026-02-05) therefore fails with error[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's rust-toolchain file. CI runs rustup update nightly, so it isn't affected.
  • Existing clippy warning, unrelated to this PR. Current nightly clippy warns about an unnecessary transmute in downsample_rs/src/lttb.rs:9 (suggests f64::to_bits(v).cast_signed()). It's a warning in the downsample_rs path dependency, so -D warnings doesn't fail the lint, and it shows up identically on main. I left it alone to keep this PR focused.

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-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (05334d5) to head (5494af7).
⚠️ Report is 10 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jeremiah-England

Copy link
Copy Markdown
Author

From Opus 5.5 in Claude Code

The one failing check, Benchmarks (CodSpeed), isn't caused by this PR.

That workflow installs pytest and pytest-codspeed without version pins, so this run picked up pytest 9.2.0, released 2026-10-27. pytest-codspeed 5.0.3 (the latest) uses a pytest internal that 9.2 removed, and it crashes before any benchmark runs:

AttributeError: 'FixtureManager' object has no attribute '_arg2fixturedefs'. Did you mean: '_arg2node2fixturedefs'?

This is tracked upstream in CodSpeedHQ/pytest-codspeed#146 ("Support pytest 9.2"). The workflow last passed on main in June, before pytest 9.2 existed, so any PR opened now will hit the same error. It should clear up once pytest-codspeed ships a fix. Until then, pinning pytest<9.2 in codspeed.yml works around it; I can open a separate PR for that if you'd like.

All the other checks pass, including the new 3.15 test jobs on Linux, macOS and Windows.

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.

2 participants