Update pyo3 to 0.29#1597
Closed
vaibhavatlan wants to merge 1 commit into
Closed
Conversation
Bump pyo3, pyo3-async-runtimes, and pythonize from 0.25 to 0.29 to pick up the fix for RUSTSEC-2026-0176 / GHSA-36hh-v3qg-5jq4, an out-of-bounds read in the PyList/PyTuple nth/nth_back iterators, first patched in pyo3 0.29.0. Adapt the bridge to the pyo3 0.26+ API: - Python::with_gil -> Python::attach - PyObject -> Py<PyAny> (alias removed) - implement Runtime::spawn_blocking for TokioRuntime - add the Send + 'static bound now required by future_into_py - opt the Clone pyclasses back into FromPyObject via from_py_object - TaskLocals::clone_ref -> clone
|
|
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.
What was changed
Bumped
pyo3,pyo3-async-runtimes, andpythonizefrom 0.25 to 0.29, andupdated the bridge for the pyo3 0.26+ API changes:
Python::with_gil→Python::attachPyObject→Py<PyAny>(the alias was removed)Runtime::spawn_blockingonTokioRuntimeSend + 'staticbound now required byfuture_into_pyClonepyclasses (MetricAttributesRef,CustomSlotSupplier)back into the
FromPyObjectderive via#[pyclass(from_py_object)]TaskLocals::clone_ref→cloneWhy?
pyo3
< 0.29.0is affected by RUSTSEC-2026-0176 / GHSA-36hh-v3qg-5jq4 (HIGH) —an out-of-bounds read in the
nth/nth_backiterators forPyList/PyTuple.The fix landed in pyo3 0.29.0 with no backport to the 0.25.x line, so the bridge
needs the version bump to clear the advisory. Matching
pyo3-async-runtimesandpythonize0.29 releases are already published.Checklist
Closes: n/a — addresses advisory RUSTSEC-2026-0176
How was this tested:
cargo clippy -- -D warnings(thebridge-lintCI task) andcargo fmt --checkboth pass cleanly on the migrated bridge.
Any docs updates needed? No.