From 73ab8af94921d7e7475457dc31878b1236c3f0f8 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 27 Jun 2025 16:14:05 -0700 Subject: [PATCH 1/4] Permit installation for Python 3.10 Problem: Internal documentation build does not support python3.11 yet. Solution: Allow installation for Python 3.10 so that docs build can use latest development releases. Related to #6648 --- cirq-aqt/setup.py | 3 ++- cirq-google/setup.py | 3 ++- cirq-ionq/setup.py | 3 ++- cirq-pasqal/setup.py | 3 ++- cirq-rigetti/setup.py | 3 ++- cirq-web/setup.py | 3 ++- setup.py | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cirq-aqt/setup.py b/cirq-aqt/setup.py index b6571ec18cb..2ae2f12247f 100644 --- a/cirq-aqt/setup.py +++ b/cirq-aqt/setup.py @@ -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, diff --git a/cirq-google/setup.py b/cirq-google/setup.py index 420fe3fe227..5e4b0f666b2 100644 --- a/cirq-google/setup.py +++ b/cirq-google/setup.py @@ -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, diff --git a/cirq-ionq/setup.py b/cirq-ionq/setup.py index a02601b35ec..8fe3abcca1c 100644 --- a/cirq-ionq/setup.py +++ b/cirq-ionq/setup.py @@ -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, diff --git a/cirq-pasqal/setup.py b/cirq-pasqal/setup.py index 8e91686bacf..f786cc8ae31 100644 --- a/cirq-pasqal/setup.py +++ b/cirq-pasqal/setup.py @@ -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, diff --git a/cirq-rigetti/setup.py b/cirq-rigetti/setup.py index 28ee22eb93e..9013aa07dc6 100644 --- a/cirq-rigetti/setup.py +++ b/cirq-rigetti/setup.py @@ -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, diff --git a/cirq-web/setup.py b/cirq-web/setup.py index a9d21a41a7d..027ad54b530 100644 --- a/cirq-web/setup.py +++ b/cirq-web/setup.py @@ -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, diff --git a/setup.py b/setup.py index 38a724f5653..394d7250707 100644 --- a/setup.py +++ b/setup.py @@ -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', From 207684b8dd988a8a41377e227f0f7df1795f4497 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 27 Jun 2025 16:29:20 -0700 Subject: [PATCH 2/4] Change all python_requires values --- cirq-core/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cirq-core/setup.py b/cirq-core/setup.py index d34b1f4378f..8f7d207b055 100644 --- a/cirq-core/setup.py +++ b/cirq-core/setup.py @@ -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', From 3d13b1111f6bbfd7ecaa7ea9adae510fb8709f83 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 27 Jun 2025 16:29:42 -0700 Subject: [PATCH 3/4] And drop redundant parentheses in test --- dev_tools/modules_test_data/mod1/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev_tools/modules_test_data/mod1/setup.py b/dev_tools/modules_test_data/mod1/setup.py index 483f380e401..9b3a1e304f4 100644 --- a/dev_tools/modules_test_data/mod1/setup.py +++ b/dev_tools/modules_test_data/mod1/setup.py @@ -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, From 7b4cb9620ce4288919fa075ee0625e37ac4a3083 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Fri, 27 Jun 2025 16:40:17 -0700 Subject: [PATCH 4/4] Let loose the runtime check of Python version too --- cirq-core/cirq/_version.py | 3 ++- cirq-google/cirq_google/_version.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cirq-core/cirq/_version.py b/cirq-core/cirq/_version.py index 018951f14b0..cf1c180da0b 100644 --- a/cirq-core/cirq/_version.py +++ b/cirq-core/cirq/_version.py @@ -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' diff --git a/cirq-google/cirq_google/_version.py b/cirq-google/cirq_google/_version.py index 018951f14b0..cf1c180da0b 100644 --- a/cirq-google/cirq_google/_version.py +++ b/cirq-google/cirq_google/_version.py @@ -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'