Skip to content

Add support for Python 3.12 #1359

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 10 commits into from
Jan 19, 2024
Merged

Conversation

coruscating
Copy link
Collaborator

@coruscating coruscating commented Jan 18, 2024

Summary

Now that Aer supports Python 3.12 starting with 0.13.2 (Qiskit/qiskit-aer#2022), we should be able to support it as well. The only code change needed was to update the deprecated usage of datetime.datetime.utcnow() to datetime.datetime.now(datetime.UTC). I added a python version checker to handle this since datetime.UTC was only introduced in 3.11.

@coruscating coruscating marked this pull request as ready for review January 18, 2024 02:45
@wshanks
Copy link
Collaborator

wshanks commented Jan 18, 2024

There is a little overlap with #1351 where I also addressed the datetime warning.

@coruscating
Copy link
Collaborator Author

@wshanks Ahh right, my bad, your fix is simpler so I've switched to yours.

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

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

I updated cron-staging.yml as well, but otherwise this looks good!

@wshanks wshanks enabled auto-merge January 19, 2024 18:43
@wshanks wshanks added this to the Release 0.6 milestone Jan 19, 2024
@wshanks wshanks disabled auto-merge January 19, 2024 20:22
@wshanks
Copy link
Collaborator

wshanks commented Jan 19, 2024

@coruscating We have confused GitHub here. The merge queue is blocked waiting for the 3.11 tests but this PR replaces them with 3.12 tests so they will never run. Maybe you can override and merge this with your admin privileges? I hope this doesn't foul up the other pre-existing PRs with 3.11 runs.

@coruscating coruscating added this pull request to the merge queue Jan 19, 2024
Merged via the queue into qiskit-community:main with commit 0ee4889 Jan 19, 2024
@coruscating coruscating deleted the python3.12 branch January 20, 2024 11:11
@coruscating
Copy link
Collaborator Author

@wshanks Thanks for catching the cron job config! This PR merged fine after I changed the branch protection rules to look for passing 3.12 tests instead of 3.11, and existing open PRs just have to merge the changes from main and rerun their CI.

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.

2 participants