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 and numpy to 0.20.0 #1005

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Update pyo3 and numpy to 0.20.0 #1005

merged 2 commits into from
Oct 16, 2023

Conversation

mtreinish
Copy link
Member

This commit updates PyO3 to the latest release 0.20.0 [1] and also moves rust-numpy to 0.20.0 [2] as well. The major change for rustworkx is official support for Python 3.12.0 final. We were previously using the 3.12 pre-release support in PyO3 to publish rustworkx for 3.12, but moving to the latest PyO3 officially supports the stable releases of 3.12. The are some small changes needed to adapt to API changes in PyO3, mostly around updates to the PyDict.get_item() api.

[1] https://github.com/PyO3/pyo3/releases/tag/v0.20.0
[2] https://github.com/PyO3/rust-numpy/releases/tag/v0.20.0

This commit updates PyO3 to the latest release 0.20.0 [1] and also moves
rust-numpy to 0.20.0 [2] as well. The major change for rustworkx is
official support for Python 3.12.0 final. We were previously using the
3.12 pre-release support in PyO3 to publish rustworkx for 3.12, but
moving to the latest PyO3 officially supports the stable releases of
3.12. The are some small changes needed to adapt to API changes in PyO3,
mostly around updates to the `PyDict.get_item()` api.

[1] https://github.com/PyO3/pyo3/releases/tag/v0.20.0
[2] https://github.com/PyO3/rust-numpy/releases/tag/v0.20.0
Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

LGTM, it's not surprising the functions that use Python's APIs the most are the ones that change from release to release. Most of our Rust code remains intact fortunately.

Also, on the topic of NumPy, I think we should consider numpy/numpy#24300. We probably should add restrictions to only depend on NumPy 1.0 until we confirm NumPy 2.0 works

@@ -29,7 +29,7 @@ fixedbitset = "0.4.2"
hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] }
indexmap = { version = ">=1.9, <3", features = ["rayon"] }
num-traits = "0.2"
numpy = "0.19.0"
numpy = "0.20.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not this file but copy Qiskit/qiskit#10893 for us esssentially

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that sounds good. We definitely should do this for the 0.14.0 release.

@coveralls
Copy link

coveralls commented Oct 15, 2023

Pull Request Test Coverage Report for Build 6526320718

  • 23 of 23 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 96.502%

Totals Coverage Status
Change from base Build 6525472725: 0.002%
Covered Lines: 15478
Relevant Lines: 16039

💛 - Coveralls

@mtreinish mtreinish merged commit 2a6f718 into Qiskit:main Oct 16, 2023
25 checks passed
@mtreinish mtreinish deleted the pyo3-20 branch October 16, 2023 17:11
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