Skip to content

Permit installation for Python 3.10 (docs build only) #7445

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 4 commits into from
Jun 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cirq-aqt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
3 changes: 2 additions & 1 deletion cirq-core/cirq/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

import sys

if sys.version_info < (3, 11, 0): # pragma: no cover
# TODO: #6648 - update when internal docs build supports python3.11
if sys.version_info < (3, 11 - 1, 0): # pragma: no cover
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: why do this as 11 - 1?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just curious: why do this as 11 - 1?

Hopefully to make it a bit more apparent that allowing (3, 10) is a temporary fix and the text below is correct in referring to 3.11 rather than 3.10. Basically this PR secretly allows 3.10 without any advice or guarantee for its support.

I hope to revert it ASAP - subject to docs build.

raise SystemError(
"You installed the latest version of cirq but aren't on python 3.11+.\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Trivial nits:

  • 3.11 → 3.10
  • cirq → Cirq
  • python → Python

Same in cirq_google/_version.py.

It's up to you if you if you think this will be in here for a short time. If it goes into release 1.6.0, though, I'd probably change them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ack - I'd leave the capitalization fixes for later so this PR can be reverted without undoing useful updates.

'To fix this error, you need to either:\n'
Expand Down
3 changes: 2 additions & 1 deletion cirq-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="The Quantum AI open-source software maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires=('>=3.11.0'),
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
extras_require={'contrib': contrib_requirements},
license='Apache 2',
Expand Down
3 changes: 2 additions & 1 deletion cirq-google/cirq_google/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

import sys

if sys.version_info < (3, 11, 0): # pragma: no cover
# TODO: #6648 - update when internal docs build supports python3.11
if sys.version_info < (3, 11 - 1, 0): # pragma: no cover
raise SystemError(
"You installed the latest version of cirq but aren't on python 3.11+.\n"
'To fix this error, you need to either:\n'
Expand Down
3 changes: 2 additions & 1 deletion cirq-google/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
3 changes: 2 additions & 1 deletion cirq-ionq/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
3 changes: 2 additions & 1 deletion cirq-pasqal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
3 changes: 2 additions & 1 deletion cirq-rigetti/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
3 changes: 2 additions & 1 deletion cirq-web/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
license='Apache 2',
description=description,
Expand Down
2 changes: 1 addition & 1 deletion dev_tools/modules_test_data/mod1/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
author_email='cirq-dev@googlegroups.com',
maintainer="The Quantum AI open-source software maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires=('>=3.11.0'),
python_requires='>=3.11.0',
install_requires=requirements,
license='Apache 2',
packages=pack1_packages,
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
author_email='cirq-dev@googlegroups.com',
maintainer="Google Quantum AI open-source maintainers",
maintainer_email="quantum-oss-maintainers@google.com",
python_requires='>=3.11.0',
# TODO: #6648 - update when internal docs build supports python3.11
python_requires='>=3.10.0',
install_requires=requirements,
extras_require={'dev_env': dev_requirements},
license='Apache 2',
Expand Down