Skip to content

Add Python 3.12 support #774

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

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

woodsp-ibm
Copy link
Member

@woodsp-ibm woodsp-ibm commented Feb 21, 2024

Summary

See #759 I will not mark this to close that since this still CI needs to use 3.12.0 specifically as the breaking change to testtools, referred there has not yet been addressed. So rather than have it close it and then open another specifically around just using 3.12 when we are able, I just put a task list in there so this does one of the entries. The other will need a release of testtools first. Fixed in 3.12.2 which reverted the breaking change

Closes #759

I marked this stable backport in order to facilitate a release that supports 3.12.

See also qiskit-community/qiskit-nature#1338 if you want to see a similar change to CI to add 3.12
Update: qiskit-community/qiskit-nature#1341 unpins back to just 3.12

Details and comments

If/when merged will require branch rules updating - due the changes in jobs being run now versus what was done before e.g. macos-latest 3.11 is no more as we now do macos-latest 3.12. Which jobs are Required to run/pass is configured via the Branch Rules so until that is updated there will be a mismatch. Once it is updated these will be the new rules and any existing PRs would need updating so the new rules kick in for them too.

@woodsp-ibm woodsp-ibm added stable backport potential The bug might be minimal and/or import enough to be port to stable type: ci 🔧 Related to Continuous Integration workflows labels Feb 21, 2024
@woodsp-ibm
Copy link
Member Author

Note mainly for new maintainers, While for Ubuntu it's tested against all the Python versions supported, for Mac and Windows its done just against the min and max versions. Only the unit tests need to use the exact 3.12.0 version (testtools issue only affects unittests) - the tutorials we again do min and max versions and there its simply 3.12 since it does not need to be down to the exact bug fix version.

@coveralls
Copy link

coveralls commented Feb 21, 2024

Pull Request Test Coverage Report for Build 8007089427

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 92.567%

Totals Coverage Status
Change from base Build 7967245746: 0.0%
Covered Lines: 1868
Relevant Lines: 2018

💛 - Coveralls

adekusar-drl
adekusar-drl previously approved these changes Feb 22, 2024
Copy link
Collaborator

@adekusar-drl adekusar-drl 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

@woodsp-ibm
Copy link
Member Author

@adekusar-drl, @t-imamichi did a PR for Opt last night where he used just 3.12 and it passed. That surprised me as the testtools issue, while fixed by @mtreinish testtools has not yet released. In looking it seems that the breaking change that was causing the failure in 3.12.1 has been reverted python/cpython#114470 in 3.12.2 which is the latest and what Opt ran on last night. I will check with algs, where I know it failed before, and drop it to 3.12. If that all passes I will do that here before this is merged so we don't have to bother with updating it later (and I can update Nature too which was already done)

@woodsp-ibm woodsp-ibm added the on hold 🛑 Can not fix yet label Feb 22, 2024
@woodsp-ibm
Copy link
Member Author

woodsp-ibm commented Feb 22, 2024

I marked it OnHold while I investigate as per above comment.
...
I updated Qiskit Algorithms and it all passes ok now again on 3.12. So I changed things over to plain 3.12 here.

@woodsp-ibm woodsp-ibm merged commit 6cabae9 into qiskit-community:main Feb 22, 2024
@woodsp-ibm woodsp-ibm deleted the py_3.12 branch February 22, 2024 17:18
mergify bot pushed a commit that referenced this pull request Feb 22, 2024
* Add Python 3.12 support

* Remove Python 3.12.0 specific usage

(cherry picked from commit 6cabae9)
mergify bot added a commit that referenced this pull request Feb 22, 2024
* Add Python 3.12 support

* Remove Python 3.12.0 specific usage

(cherry picked from commit 6cabae9)

Co-authored-by: Steve Wood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable backport potential The bug might be minimal and/or import enough to be port to stable type: ci 🔧 Related to Continuous Integration workflows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Python 3.12 support
3 participants