Skip to content

Update pyo3 to 0.27#147

Open
alewycky-tenstorrent wants to merge 5 commits intotenstorrent:mainfrom
alewycky-tenstorrent:pyo3-0.27
Open

Update pyo3 to 0.27#147
alewycky-tenstorrent wants to merge 5 commits intotenstorrent:mainfrom
alewycky-tenstorrent:pyo3-0.27

Conversation

@alewycky-tenstorrent
Copy link

@alewycky-tenstorrent alewycky-tenstorrent commented Feb 12, 2026

Update pyo3 to 0.27, the latest that still supports Rust 1.75. This still supports CPython 3.7, but PyPy 3.9 and 3.10 are no longer supported.

Initial support for Bound<'_, T>.
Default arguments must be explicitly declared using #[pyo3(signature)].
@alewycky-tenstorrent
Copy link
Author

This doesn't need to be multiple commits. Some of the commits even undo earlier commits because names changed twice (new->new_bound->new). It was just easier to make fewer changes at once and also took advantage of deprecation hints that were removed by 0.27.

Intermediate pyo3 versions that didn't get a separate commit didn't require any code changes.

IntoPyObject trait replaces IntoPy and ToPyObject.
- PyObject -> Py<PyAny>
- Python::with_gil -> Python::attach
PyAnyMethods::downcast -> Bound::cast
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.

1 participant