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

Add Rust beta + Python beta to the test matrix #1220

Merged
merged 10 commits into from
Sep 18, 2024

Conversation

IvanIsCoding
Copy link
Collaborator

After #1064 we no longer depend on new PyO3 releases to support newer Python versions. Hence this is an attempt to use the latest versions of Rust and Python to catch issues early

@IvanIsCoding IvanIsCoding requested a review from mtreinish June 19, 2024 22:39
@IvanIsCoding IvanIsCoding marked this pull request as draft June 19, 2024 22:56
@IvanIsCoding
Copy link
Collaborator Author

I need to handle SciPy and possibly NumPy not being available. It seemed to easy to be true, but oh well

@jakelishman
Copy link
Member

Iirc, Numpy and SciPy started publishing test wheels for 3.12 for their releases after 3.12rc1 came out in early August 2023 (that's the point at which CPython guarantees ABI stability). 3.13rc1 is due on the 30th of July this year.

@IvanIsCoding
Copy link
Collaborator Author

Iirc, Numpy and SciPy started publishing test wheels for 3.12 for their releases after 3.12rc1 came out in early August 2023 (that's the point at which CPython guarantees ABI stability). 3.13rc1 is due on the 30th of July this year.

I will try to make a weekly build with an image that has the toolchain to compile NumPy. I don’t think we need to wait for NumPy pre-built wheels, ideally we’d be able to test 3.14 alpha the day it is available for GitHub actions

@jakelishman
Copy link
Member

That's fair, though if you want to go that way, it might be faster to pull the pre-built nightlies from the conda nightlies: https://anaconda.org/scientific-python-nightly-wheels/numpy (etc for scipy).

@jakelishman
Copy link
Member

ofc that means also dealing with numpy.next in addition to python.next and rust.next, but that might actually be a good thing, given your intent here?

@IvanIsCoding
Copy link
Collaborator Author

That's fair, though if you want to go that way, it might be faster to pull the pre-built nightlies from the conda nightlies: https://anaconda.org/scientific-python-nightly-wheels/numpy (etc for scipy).

That is a clever idea, I don’t mind using Conda as it is a non-blocking test. We no longer depend on SciPy so it’s just NumPy.

Overall my goal is to test how true our ABI compatibility is. We released 0.15 tested with 3.8-3.12 today but it might run with 3.13 or even with 3.14.

@jakelishman
Copy link
Member

I don't think you need to use conda as your package manager - there's a PyPI-compatible interface at https://pypi.anaconda.org/scientific-python-nightly-wheels/simple, so you can point pip at it with pip install -i <url> numpy scipy. I can't remember what the rules on repo fallback are, and there was some sort of supply-chain attack based on that premise within the last year, so it might have changed - if so, you might need to ensure your other dependencies are manually satisfied from regular PyPI first.

@IvanIsCoding IvanIsCoding marked this pull request as ready for review September 17, 2024 22:45
@IvanIsCoding
Copy link
Collaborator Author

IvanIsCoding commented Sep 17, 2024

I think this is working now, I had to remove Pillow from the 3.13-dev install because it is not released. But I am glad our code works with 3.13! Adopting the ABI was a good choice.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10912348902

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.816%

Totals Coverage Status
Change from base Build 10888128918: 0.0%
Covered Lines: 17999
Relevant Lines: 18785

💛 - Coveralls

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, lets give this a try. I'm a bit worried about the long term stability of using rust beta in CI. It should be fine, but having run nightly for a long time in the early project (out of necessity because pyo3 was only compatible with nightly) I know there are weird compile time issues that can come up. But lets give this a try and if we have stability issues we can revisit this. Getting ahead of the game to validate compatibility before the release will hopefully save us a mad rush after each next release.

@mtreinish mtreinish merged commit 5766d7c into Qiskit:main Sep 18, 2024
29 checks passed
@IvanIsCoding IvanIsCoding deleted the add-rust-and-python-beta branch September 18, 2024 21:55
@IvanIsCoding
Copy link
Collaborator Author

I will keep an eye on it but Rust beta should be more mature than nightly on Head. If it is not we will use stable for Python beta

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.

4 participants