Skip to content

chore(versions): update Python version support to 3.10+ in gapic-generator#16910

Merged
chalmerlowe merged 52 commits intomainfrom
feat/gapic-version-fixes
May 4, 2026
Merged

chore(versions): update Python version support to 3.10+ in gapic-generator#16910
chalmerlowe merged 52 commits intomainfrom
feat/gapic-version-fixes

Conversation

@chalmerlowe
Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe commented May 1, 2026

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 🦕

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

Comment thread ci/run_conditional_tests.sh Outdated
Comment thread ci/run_conditional_tests.sh Outdated
Comment thread packages/gapic-generator/docs/getting-started/_verifying.rst Outdated
@parthea parthea changed the title chore(versions): update Python version support to 3.8+ in gapic-generator chore(versions): update Python version support to 3.9+ in gapic-generator May 1, 2026
@parthea parthea marked this pull request as draft May 1, 2026 16:38
@parthea parthea changed the title chore(versions): update Python version support to 3.9+ in gapic-generator chore(versions): update Python version support to 3.10+ in gapic-generator May 1, 2026
@chalmerlowe chalmerlowe force-pushed the feat/gapic-version-fixes branch from a73f347 to 9a6dece Compare May 1, 2026 17:30
chalmerlowe added 19 commits May 4, 2026 08:37
@parthea parthea marked this pull request as ready for review May 4, 2026 15:36
@chalmerlowe chalmerlowe merged commit 6d68146 into main May 4, 2026
87 checks passed
@chalmerlowe chalmerlowe deleted the feat/gapic-version-fixes branch May 4, 2026 15:58
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
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