-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bump minimum python version to 3.9 #6167
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
We should drop support for both 3.7 and 3.8 and bump up the minimum version to 3.9. Fixing #6018 would further add support for 3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main comment is to also drop support for Python 3.8. You'll also need to update asv.conf.json
to Python 3.9.
.github/workflows/ci.yml
Outdated
@@ -31,7 +31,7 @@ jobs: | |||
- uses: actions/checkout@v3 | |||
- uses: actions/setup-python@v4 | |||
with: | |||
python-version: '3.7' | |||
python-version: '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to 3.9, here and elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 3.9 everywhere, as well as dropping some of the conditional checks for 3.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should make a follow-up ticket/issue to thoroughly search the code to ensure the cleanup form 3.7 and 3.8 is complete.
pyproject.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[tool.black] | |||
line-length = 100 | |||
target_version = ['py37', 'py38', 'py39'] | |||
target_version = ['py38', 'py39'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add py310
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add
py310
here?
Yes, and py311 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added both of these, and updated the black formatter because the old version didn't support 311
Please also check all instances of Cirq/cirq-google/cirq_google/engine/test_utils.py Lines 22 to 24 in 6565fc5
Another thing to check are all Cirq/cirq-core/requirements.txt Lines 3 to 4 in 6565fc5
|
Yup, made these changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, however there are few more things relevant only for abandoned Pythons. Please consider updating your PR with
git pull https://github.com/pavoljuhas/Cirq.git pr6167-amend-1
skushnir123/Cirq@drop-37...pavoljuhas:pr6167-amend-1
There are also Dockerfile-s that use old python and will need update, but that is perhaps better left for another PR - unless they block the tests here, #6175.
Thanks for adding on those changes! I just added those to my PR. Let me know if there is anything else to remove/change. |
I don't think the Dockerfile's are failing any tests here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Samuel and Pavol! I've removed Python 3.7 and 3.8 from required CI checks and the PR is ready to be merged now!
* dropped 3.7 support * Update setup.py * Removed 3.8 as well * changing some more 3.8's to 3.9's * reformat * Update pyproject.toml * Update setup.py * changing notebook python versions * Update setup.py * testing * Update packaging_test.sh * Update packaging_test.sh * Update packaging_test.sh * adding 311 * updating formatter * Bump Python version for CI actions to 3.9 * Remove code specific to Python <= 3.8 only * Drop redundant python_version checks from requirement files * Fix required Python version in the installation doc * Clean redundant assertion * Skip coverage for code run in subprocess * Suggest a more recent cirq for old pythons --------- Co-authored-by: Pavol Juhas <juhas@google.com>
Drops support for Python 3.7. and 3.8 For context, see issue: #6159