Skip to content

Conversation

@bschoenmaeckers
Copy link
Member

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
Member 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
Member 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
Contributor

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 :)

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

@bschoenmaeckers
Copy link
Member Author

Closing in fever of #435

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.

3 participants