deps: migrate pyo3 0.20 → 0.29#56
Open
iamalwaysuncomfortable wants to merge 1 commit into
Open
Conversation
Mechanical migration, no API or architecture changes: - module registration to Bound<'_, PyModule> - PyObject -> Py<PyAny>; into_py -> IntoPyObject/into_py_any - GIL-ref &'py PyDict/PyList helpers -> Bound returns - pyclasses extracted by value opt into from_py_object (the automatic Clone-based FromPyObject is becoming opt-in upstream) - abi3-py37 no longer exists: wheels are now cp38-abi3 and both packages declare requires-python >= 3.8 One deliberate behavior change: Vec<u8> returns (bytes(), to_bytes_raw_*) now map to Python bytes instead of list[int] (pyo3 0.23+ specialization) — the Pythonic analog of wasm's Uint8Array; facade callers already wrapped with bytes(...) so nothing downstream changes. Vec<bool>/Vec<Field> still map to lists. Verified: zero warnings, clippy clean both networks, main SDK 876 passed, sdk-abi 8 passed, shield-swap 79 passed on release builds.
Member
Author
|
Integration validation on the migrated build (all local, release extensions):
Skips identical to pre-migration runs (endpoint guards + invite-gated endpoints). Not run: shield-swap |
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
Migrates both Rust crates from pyo3 0.20.0 to 0.29.0. Mechanical migration — no architecture or Python-API changes: the dual-network cdylib design, class surface, and method signatures are unchanged.
Bound<'_, PyModule>(0.21 Bound API)PyObject→Py<PyAny>;into_py→IntoPyObject/into_py_any(0.23 conversion traits)&'py PyDict/PyListhelper returns →Bound#[pyclass(from_py_object)](upstream is making the automatic Clone-basedFromPyObjectopt-in; without this, methods taking owned pyclass args would break in a future pyo3)abi3-py37no longer exists → wheels are nowcp38-abi3; both packages declarerequires-python >= 3.8One deliberate behavior change
Vec<u8>returns (bytes()",to_bytes_raw_*) now produce Pythonbytesinstead oflist[int]— pyo3 0.23+ specializes byte vectors. This is the Pythonic analog of the wasm SDK'sUint8Array; facade callers already wrapped these inbytes(...)so nothing downstream changes.Vec/Vec` still map to lists. Tests updated accordingly.Verification
Supersedes dependabot's partial sdk-abi bump. Also enables future free-threaded (no-GIL) Python support, which pyo3 0.23+ provides.