Skip to content
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 pyo3 to 0.22.0 #431

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

bschoenmaeckers
Copy link

This is the first iteration of the process to update to pyo3 0.22. The first step is to make the current code compile against the new version. In following MR we should feature gate the deprecated gil-refs api's used and implement every method against the Bound wrapper.

@bschoenmaeckers
Copy link
Author

I've moved all code using the gil-refs api behind the gil-refs feature so it compiles without it as well now. Please review

@bschoenmaeckers
Copy link
Author

bschoenmaeckers commented Jun 27, 2024

I'm not sure about the py-clone feature, should it be enabled or is there a better way?

@bschoenmaeckers bschoenmaeckers changed the title Update pyo3 to 0.22.0 with gil-refs & py-clone enabled Update pyo3 to 0.22.0 Jun 27, 2024
@JRRudy1
Copy link

JRRudy1 commented Jul 1, 2024

I am eager to upgrade to PyO3 0.22 but can't until numpy supports it, so let me know if there are any tasks I can take on to help move this forward! Thanks for getting it started :)

@@ -22,12 +22,15 @@ num-complex = ">= 0.2, < 0.5"
num-integer = "0.1"
num-traits = "0.2"
ndarray = ">= 0.13, < 0.16"
pyo3 = { version = "0.21.0", default-features = false, features = ["macros"] }
pyo3 = { version = "0.22.0", default-features = false, features = ["macros", "py-clone"] }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

py-clone should not be enabled unconditionally (perhaps behind a forwarding feature as with gil-refs) since it allows potentially panicking clones in any codebase that pulls in numpy as a dependency

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.

None yet

3 participants