chore(deps): bump pyo3 + numpy to 0.29 in /rust (RUSTSEC-2026-0176/0177)#548
Merged
Conversation
Bumps the Rust backend's pyo3 and numpy crates 0.28 -> 0.29 in lockstep (numpy 0.29 requires pyo3 ^0.29), resolving two RustSec advisories that affect pyo3 < 0.29: - RUSTSEC-2026-0176 (GHSA-36hh-v3qg-5jq4, High): out-of-bounds read in the PyList/PyTuple nth/nth_back iterators. - RUSTSEC-2026-0177 (GHSA-chgr-c6px-7xpp, Medium): missing Sync bound on PyCFunction::new_closure closures. Neither vulnerable path is reachable in this crate: the Rust source has no PyList/PyTuple iteration, no PyCFunction::new_closure, and builds no free-threaded wheels. This is a binding-layer-only change -- the math/RNG crates (ndarray 0.17, faer 0.24, rand 0.10, rand_xoshiro 0.8) are unchanged, and the Rust-backend bit-identity snapshot test confirms zero numerical drift. Supersedes Dependabot PRs #537 (pyo3) and #538 (numpy), which each bumped one crate alone and so could not resolve (the numpy/pyo3 version constraint couples them). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 25, 2026
PR Review ReportOverall Assessment✅ Looks good — no unmitigated P0 or P1 findings. Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the Rust backend's
pyo3andnumpycrates 0.28 → 0.29 in lockstep, resolving the two open Dependabot security alerts (both forpyo3 < 0.29, both fixed in 0.29.0 — the current latest stable):nth/nth_backofPyList/PyTupleiteratorsSyncbound onPyCFunction::new_closurenumpyis bumped alongsidepyo3becausenumpy0.29 requirespyo3^0.29 — they're version-coupled and must move together.Exposure
Neither vulnerable code path is reachable in this crate: the Rust source has no
PyList/PyTupleiteration (.nth/.nth_back), noPyCFunction::new_closure, and the wheel pipeline builds no free-threaded targets. This is dependency hygiene / alert cleanup.No numerical change
pyo3and the Rustnumpycrate are FFI/binding layers — they marshal bytes across the Python↔Rust boundary and do no floating-point arithmetic. All math (ndarray0.17,faer0.24, BLAS) and the bootstrap RNG (rand0.10,rand_xoshiro0.8) are unchanged (verified: math/RNG crates byte-identical in the regenerated lockfile; only thepyo3family +numpymoved). MSRV unaffected (pyo3 0.29 MSRV 1.83 ≤ the crate's 1.85 pin).Verification (local)
cargo build --release(default) and--features accelerate(matches the wheel build) ✅cargo test --release— 40 passed ✅maturin develop --release+DIFF_DIFF_BACKEND=rust pytest tests/test_rust_backend.py -m ''— 96 passed, includingtest_bootstrap_weights_bit_identity_snapshot(byte-for-byte zero-drift proof) and thedecimal=10linalg parity checks ✅Supersedes
Closes out Dependabot PRs #537 (pyo3) and #538 (numpy), which each bumped one crate in isolation and so couldn't resolve (the coupling makes either-alone unsatisfiable).
🤖 Generated with Claude Code