-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bump pyo3 to 0.26.0 #8286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump pyo3 to 0.26.0 #8286
Conversation
| /// Returns `array + array` of an int64 array. | ||
| #[pyfunction] | ||
| fn double(array: &Bound<PyAny>, py: Python) -> PyResult<PyObject> { | ||
| fn double(array: &Bound<PyAny>, py: Python) -> PyResult<Py<PyAny>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may make sense to change the return type of the to_pyarrow functions to Bound<PyAny> instead of Py<PyAny>? Then you wouldn't need to carry around a py: Python token in any of these functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 5218810 what you had in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Looks great!
# Which issue does this PR close? - related to #8286 # Rationale for this change Ci is failing on main after this PR is merged - #8286 <img width="1464" height="714" alt="Screenshot 2025-09-23 at 2 22 46 PM" src="https://github.com/user-attachments/assets/83725d32-baac-48a7-b6e8-3620ae3cde98" /> Here is an example failure: https://github.com/apache/arrow-rs/actions/runs/17952764906/job/51056301800 ``` error: useless conversion to the same type: `pyo3::Bound<'_, pyo3::PyAny>` --> arrow-pyarrow/src/lib.rs:181:12 | 181 | Ok(dtype.into()) | ^^^^^^^^^^^^ help: consider removing `.into()`: `dtype` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `-D clippy::useless-conversion` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]` error: useless conversion to the same type: `pyo3::Bound<'_, pyo3::PyAny>` --> arrow-pyarrow/src/lib.rs:217:12 | 217 | Ok(dtype.into()) | ^^^^^^^^^^^^ help: consider removing `.into()`: `dtype` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion error: useless conversion to the same type: `pyo3::Bound<'_, pyo3::PyAny>` --> arrow-pyarrow/src/lib.rs:253:12 | 253 | Ok(schema.into()) | ^^^^^^^^^^^^^ help: consider removing `.into()`: `schema` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion error: could not compile `arrow-pyarrow` (lib) due to 3 previous errors warning: build failed, waiting for other jobs to finish... ``` I think it is a logical conflict # What changes are included in this PR? Fix clippy # Are these changes tested? We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? # Are there any user-facing changes? If there are user-facing changes then we may require documentation to be updated before approving the PR. If there are any breaking changes to public APIs, please call them out.
Which issue does this PR close?
Rationale for this change
Bumping to the latest pyo3.
What changes are included in this PR?
Handle breaking changes.
Are these changes tested?
CI.
Are there any user-facing changes?
Yes.