-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support pyo3-0.23.2 #119
Comments
#112 seems related i'd suggest pyo3 likely moves faster than polars because pyo3 has a bigger community; therefore it could be good if the pyo3 CI would automatically bump the version Unfortunately, bumping the version leads to compile errors because pyo3-polars::types::PyDataType (around line 357) implements ToPyObject (deprecated) instead of IntoPyObject, which has a different main method name and signature which returns a Result instead of being infallible Therefore, we need somebody with deep understanding of the pyo3 changes and pyo3-polars internals to refactor the I hit a blocker here:
TLDR: besides needing to return Result<Self::Output, Self::Error> instead of straight up returning a "PyAny" -- we need to return a Py and the Py generic is actually something we're ditching earlier in the stack or panicking All these functions are using this: fn getattr<N>(&self, attr_name: N) -> PyResult<Bound<'py, PyAny>>
where
N: IntoPyObject<'py, Target = PyString>,
{
fn inner<'py>(
any: &Bound<'py, PyAny>,
attr_name: Borrowed<'_, '_, PyString>,
) -> PyResult<Bound<'py, PyAny>> {
unsafe {
ffi::PyObject_GetAttr(any.as_ptr(), attr_name.as_ptr())
.assume_owned_or_err(any.py())
}
}
inner(
self,
attr_name
.into_pyobject(self.py())
.map_err(Into::into)?
.as_borrowed(),
)
} ah, after some clutch help from llama 3.3 (thanks zuck!), i discovered the Target isn't really used, and I wasn't able to update the Output to match what we had, until I changed "Target" to match the inside of the Bound in Output
and we can replace a bunch of "unwrap" with "?", but it seems likely we can get this to compile now |
Any plan on supporting the latest stable version of
pyo3-0.23.2
?The text was updated successfully, but these errors were encountered: