Commit 3ca7aef
Upgrade PyO3 from 0.26 to 0.27
Summary:
X-link: https://github.com/mslsrc/prod_inference/pull/5794
X-link: meta-pytorch/monarch#4543
Upgrade PyO3 to 0.27 and fix upgrade-time API breakages:
- FromPyObject trait shape changed:
- FromPyObject<'py> / extract_bound(&Bound<'py, PyAny>)
- becomes FromPyObject<'a, 'py> with type Error and extract(Borrowed<'a, 'py, PyAny>)
- extract() error typing is stricter:
- extraction no longer always type-infers as PyErr cleanly in nested PyResult contexts.
- Stack adds explicit closure return types and .map_err(Into::into) where needed.
- Downcast APIs are replaced/deprecated:
- downcast, downcast_bound, downcast_into, downcast_unchecked, DowncastError become cast, cast_bound, cast_into, cast_unchecked, CastError
- PyCapsule pointer access changed:
- old code used reference() or raw pointer() plus manual checks.
- stack moves callsites toward pointer_checked(Some(c"...")), is_valid_checked, and CStr capsule names.
Also aligns required crates with pins and overlays:
- bumps pyo3, pyo3-async-runtimes, pyo3-build-config, pythonize, and numpy to 0.27.
- updates pyo3-python-tracing-subscriber to a compatible rev.
- pins/patches Arrow crates to the git rev with arrow-pyarrow PyO3 0.27 support
- adds a pyo3-build-config 0.27 overlay/fixup so the vendored crate works with our disabled-buildscript/cross-compile setup.
Reviewed By: dtolnay, yinghai
Differential Revision: D109086625
fbshipit-source-id: a2d1f29792ad00833244f8bcccfa885b899132eb1 parent 7d33a27 commit 3ca7aef
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
3 | 18 | | |
4 | 19 | | |
5 | 20 | | |
| |||
0 commit comments