chore(versions): update Python version support to 3.10+ in gapic-generator#16910
Merged
chalmerlowe merged 52 commits intomainfrom May 4, 2026
Merged
chore(versions): update Python version support to 3.10+ in gapic-generator#16910chalmerlowe merged 52 commits intomainfrom
chalmerlowe merged 52 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes support for Python 3.7 across the repository, updating documentation, CI scripts, and generator templates to reflect a minimum requirement of Python 3.8. Feedback was provided to ensure consistency between CI scripts by including Python 3.13 in the list of supported versions within the comments of ci/run_conditional_tests.sh.
This was referenced May 1, 2026
parthea
reviewed
May 1, 2026
…ioned __init__.py.j2
a73f347 to
9a6dece
Compare
…ioned constraints
parthea
approved these changes
May 4, 2026
parthea
approved these changes
May 4, 2026
chalmerlowe
added a commit
that referenced
this pull request
May 4, 2026
This PR updates `proto-plus` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `pyproject.toml` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.9. * Code: Refactored `repeated.py` to use the walrus operator (PEP 572). Documentation: Updated a traceback example in `docs/fields.rst` to reference Python 3.10. * Cleanup: Replaced a stale comment regarding Python 3.7 features in proto/enums.py with a tracked TODO referencing Issue #16911. > [!note] > Also includes a conditional in the `run_single_test.sh` file to manage the chicken OR the egg problem of managing failing tests when a `unit-3.9` nox session is not present. Because we are migrating handwritten libs one at a time, we are in a transition period were we must still test for 3.9 in libraries that still support it but cannot have a failing presubmit in libraries that don't support it. ### Blocking - [x] This PR is blocked by PR #16910
chalmerlowe
added a commit
that referenced
this pull request
May 5, 2026
This PR updates `django-google-spanner` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.7, 3.8, and 3.9. * Cleanup: Removed dead code in `noxfile.py` that was skipping Python 3.7. ### Blocking This PR is blocked by PR #16910
zhixiangli
pushed a commit
to zhixiangli/google-cloud-python
that referenced
this pull request
May 6, 2026
…rator (googleapis#16910) > [!note] > This PR has been updated to remove 3.7, 3.8, and 3.9 (with one exception discussed below). ### Overview This Pull Request updates the gapic-generator package and related CI configurations to reflect the deprecation of Python 3.7 through 3.9. It updates documentation, templates, and CI scripts to establish Python 3.10 as the new minimum supported version where applicable. ### Changes #### Documentation: * Updated installation and verification instructions in packages/gapic-generator/docs to reference Python 3.10 #### Templates: * Updated __init__.py.j2 templates in gapic/ads-templates to require Python 3.10+ (updating sys.version_info checks and error messages). * Removed outdated comments regarding Python 3.9 and below features (like module-level __getattr__) to avoid confusion, as the baseline runtime is now higher than the version noted in the comments. * Updated mypy.ini.j2 to target Python 3.10. * Cleaned up dead code (e.g. commented-out Jinja snippets) in the templates. #### CI Configurations: * Removed Python 3.9 and below from the unit test matrix in ci/run_single_test.sh. * Updated comments regarding supported Python versions in ci/run_conditional_tests.sh. ### Reasoning Python 3.9 and below have reached End-of-Life (EOL) and are no longer supported. These changes ensure that our generator and the libraries it produces align with current support policies and reduce maintenance burden by removing dead code paths. > [!note] > because the config that runs this PR checks is not updated yet, it still wants to run 3.9 so we have a temp change to skip that nox session. Once this PR merges future PRs will no longer attempt to run 3.9 and we will follow-up with a small PR to strip out that last 3.9 reference. Fixes internal issue: http://b/482126936 🦕
zhixiangli
pushed a commit
to zhixiangli/google-cloud-python
that referenced
this pull request
May 6, 2026
…eapis#16912) This PR updates `proto-plus` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `pyproject.toml` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.9. * Code: Refactored `repeated.py` to use the walrus operator (PEP 572). Documentation: Updated a traceback example in `docs/fields.rst` to reference Python 3.10. * Cleanup: Replaced a stale comment regarding Python 3.7 features in proto/enums.py with a tracked TODO referencing Issue googleapis#16911. > [!note] > Also includes a conditional in the `run_single_test.sh` file to manage the chicken OR the egg problem of managing failing tests when a `unit-3.9` nox session is not present. Because we are migrating handwritten libs one at a time, we are in a transition period were we must still test for 3.9 in libraries that still support it but cannot have a failing presubmit in libraries that don't support it. ### Blocking - [x] This PR is blocked by PR googleapis#16910
zhixiangli
pushed a commit
to zhixiangli/google-cloud-python
that referenced
this pull request
May 6, 2026
…is#16914) This PR updates `django-google-spanner` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.7, 3.8, and 3.9. * Cleanup: Removed dead code in `noxfile.py` that was skipping Python 3.7. ### Blocking This PR is blocked by PR googleapis#16910
parthea
pushed a commit
that referenced
this pull request
May 8, 2026
This PR updates `sqlalchemy-spanner` to establish Python 3.10 as the minimum supported version, dropping support for Python 3.9 and below. ### Changes * Configuration: Updated `setup.py` and `noxfile.py` to require Python 3.10+ and remove references to Python 3.7, 3.8, and 3.9. * Cleanup: Removed dead code in `noxfile.py` that was skipping Python 3.7. ### Blocking This PR is blocked by PR #16910
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR has been updated to remove 3.7, 3.8, and 3.9 (with one exception discussed below).
Overview
This Pull Request updates the gapic-generator package and related CI configurations to reflect the deprecation of Python 3.7 through 3.9. It updates documentation, templates, and CI scripts to establish Python 3.10 as the new minimum supported version where applicable.
Changes
Documentation:
Templates:
CI Configurations:
Reasoning
Python 3.9 and below have reached End-of-Life (EOL) and are no longer supported. These changes ensure that our generator and the libraries it produces align with current support policies and reduce maintenance burden by removing dead code paths.
Note
because the config that runs this PR checks is not updated yet, it still wants to run 3.9 so we have a temp change to skip that nox session. Once this PR merges future PRs will no longer attempt to run 3.9 and we will follow-up with a small PR to strip out that last 3.9 reference.
Fixes internal issue: http://b/482126936 🦕