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

Raise minimum python version to 3.9 #12910

Merged
merged 7 commits into from
Sep 11, 2024

Conversation

mtreinish
Copy link
Member

Summary

Qiskit 1.2.0 was the final minor version release of qiskit with Python 3.8 support. As Python 3.8 is going EoL before the next Qiskit minor release 1.3.0 we can drop support for running with 3.8 on the main branch now. This commit makes that change and updates everything using python 3.8 currently to use our new minimum instead.

Details and comments

@mtreinish mtreinish added the Changelog: API Change Include in the "Changed" section of the changelog label Aug 6, 2024
@mtreinish mtreinish added this to the 1.3.0 milestone Aug 6, 2024
@mtreinish mtreinish requested a review from a team as a code owner August 6, 2024 14:55
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core
  • @kevinhartman
  • @mtreinish

Qiskit 1.2.0 was the final minor version release of qiskit with Python
3.8 support. As Python 3.8 is going EoL before the next Qiskit minor
release 1.3.0 we can drop support for running with 3.8 on the main
branch now. This commit makes that change and updates everything using
python 3.8 currently to use our new minimum instead.
@coveralls
Copy link

coveralls commented Aug 6, 2024

Pull Request Test Coverage Report for Build 10801601513

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 272 unchanged lines in 20 files lost coverage.
  • Overall coverage decreased (-0.3%) to 88.862%

Files with Coverage Reduction New Missed Lines %
qiskit/quantum_info/operators/mixins/multiply.py 1 93.75%
qiskit/quantum_info/operators/mixins/group.py 1 92.59%
qiskit/quantum_info/operators/channel/quantum_channel.py 1 72.14%
qiskit/quantum_info/operators/mixins/adjoint.py 1 90.0%
qiskit/quantum_info/operators/mixins/linear.py 1 88.0%
crates/circuit/src/dag_node.rs 2 77.35%
qiskit/visualization/circuit/_utils.py 2 94.25%
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 88.26%
crates/qasm2/src/lex.rs 2 92.48%
qiskit/circuit/classicalfunction/types.py 3 0.0%
Totals Coverage Status
Change from base Build 10800641479: -0.3%
Covered Lines: 73092
Relevant Lines: 82253

💛 - Coveralls

Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

This all looks good to me.

I'm thinking that the CI tests might have to do with numpy deprecating np.product after the release of Numpy 1.25, this an old release but it also happens to be the point at which Numpy stopped supported Python 3.8. I don't know how deep this issue goes but hopefully this helps shine a light.

@raynelfss raynelfss self-assigned this Aug 6, 2024
@mtreinish
Copy link
Member Author

Thanks, yeah it's catching a real issue we'll need to fix by updating the test setup. Since the qpy backwards compatibility tests are installing historical releases of qiskit that predate numpy 1.25 those earlier releases are not compatible with the newer numpy releases. We'll have to update: https://github.com/Qiskit/qiskit/blob/main/test/qpy_compat/process_version.sh#L48-L50 to set a back version for compatibility.

Now that we're running Python 3.9 as the base version we are
encountering compatibility issues with some of our dependencies because
3.9 supports newer versions of things like numpy than older Qiskit
releases were compatible with. The only way to work around this is to
pin the versions when installing historical versions. To start this sets
a single constraints version since we can get away with using the same
version for everything. In the future though it is possible that we'll
need separate files for different historical releases.
@mtreinish
Copy link
Member Author

This should be good to go now (assuming I updated the correct reference images).

raynelfss
raynelfss previously approved these changes Sep 10, 2024
Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

Thank you for this, glad to see it works well now. Just wondering whether we should remove support for 3.8 in asv too. I think we only need to change this line:

"pythons": ["3.8", "3.9", "3.10", "3.11", "3.12"],

Other than that, it LGTM!

Comment on lines +21 to 23
# Normally we test min and max version but we can't run python
# 3.9 on arm64 until actions/setup-python#808 is resolved
python-version: ["3.10", "3.12"]
Copy link
Contributor

Choose a reason for hiding this comment

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

This issue appears to be closed now actions/setup-python#808, are we planning on making any updates?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can fix this in a follow-up. There isn't a super big motivation to change it as using 3.10 works fine, but if we could get 3.9 running instead of 3.10 that would at least make everything consistent. But I think we can also look at doing it as part of #12807 too

@mtreinish
Copy link
Member Author

Just wondering whether we should remove support for 3.8 in asv too.

Yes I think we should, I updated this in: 9d19eae

Copy link
Contributor

@raynelfss raynelfss left a comment

Choose a reason for hiding this comment

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

LGTM Thank you for the quick updates 🚀

@raynelfss raynelfss added this pull request to the merge queue Sep 10, 2024
Merged via the queue into Qiskit:main with commit dd145b5 Sep 11, 2024
15 checks passed
@mtreinish mtreinish deleted the py39-now-and-forever branch September 11, 2024 00:54
mtreinish added a commit to mtreinish/qiskit-core that referenced this pull request Sep 11, 2024
In the recently merged Qiskit#12910 the minimum Python version was raised to
3.9. As part of this the cibuildwheel config was updated to skip 38
uilds since they wont work anymore. However that PR missed that there
was an additional skip config in for the 32 bit builds in the job
definition. This commit adds the missing skip so the 32bit wheel builds
will work as well.
github-merge-queue bot pushed a commit that referenced this pull request Sep 11, 2024
* Prepare 1.3.0b1 release

This commit changes the version strings from 1.3.0 to 1.3.0b1 in
preparation for tagging the 1.3.0b1 pre-release. After we publish the
1.3.0b1 tag we should switch the version number back to 1.3.0 to
continue developing the 1.3.0 release series as we approach the actual
release.

* Also skip 3.8 builds on 32 bit platforms

In the recently merged #12910 the minimum Python version was raised to
3.9. As part of this the cibuildwheel config was updated to skip 38
uilds since they wont work anymore. However that PR missed that there
was an additional skip config in for the 32 bit builds in the job
definition. This commit adds the missing skip so the 32bit wheel builds
will work as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants