-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update to pyo3 0.12.0 #152
Conversation
Compiles but tests are not working. |
Thanks! |
In PyO3/pyo3#1115 the internal_utils module was removed from pyo3. There is a note in the review that rust-numpy will need to migrate to using with_gil() instead. This commit makes this change to enable running with pyo3 0.12.0.
This commit finishes the migration of error.rs to use the new exception API in 0.12.0. Most of the work was done on this, just a few little pieces that needed to be updated to conform to the new api.
@g-bauer I opened up https://github.com/g-bauer/rust-numpy/pull/1 that should finish the migration here. There were just a couple of other things that needed to be updated for 0.12.0 compat. |
Great! Thanks @mtreinish |
@g-bauer cool, thanks for merging my PR. I think this is ready for review now, you probably can update the title and move this out of draft. |
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.
@g-bauer
@mtreinish
Thank you very much for this.
I'll release the new version after fixing #151 and merging #155
src/array.rs
Outdated
@@ -75,6 +75,7 @@ use crate::types::Element; | |||
/// array![[8., 15.], [12., 23.]] | |||
/// ); | |||
/// ``` | |||
#[derive(Debug)] |
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.
This adds PhatromData,PhantomData)
to its debug print, which I don't like.
So could you please use pyobject_native_type_fmt!(PyArray<T, D>, T, D);
instead?
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.
Done.
With bugfixes coming to pyo3 0.12, maybe we can change the version in Cargo.toml to |
I think just |
pyo3 0.12 has released. Any plan to merge this? |
I tried using the current pyo3 master branch but ran into problems.
This is the current error which I guess stems from the changes to
PyDowncastError
.