Commit 6d68146
authored
chore(versions): update Python version support to 3.10+ in gapic-generator (#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 🦕1 parent 2bfa5d6 commit 6d68146
76 files changed
Lines changed: 219 additions & 563 deletions
File tree
- .generator
- .github/workflows
- ci
- packages/gapic-generator
- docs/getting-started
- gapic
- ads-templates
- %namespace/%name
- %version
- tests/unit/gapic/%name_%version/%sub
- schema
- templates
- %namespace/%name_%version/%sub
- testing
- tests/unit/gapic/%name_%version/%sub
- utils
- tests/integration/goldens
- asset
- google/cloud/asset_v1
- testing
- tests/unit/gapic/asset_v1
- credentials
- google/iam/credentials_v1
- testing
- tests/unit/gapic/credentials_v1
- eventarc
- google/cloud/eventarc_v1
- testing
- tests/unit/gapic/eventarc_v1
- logging_internal
- google/cloud/logging_v2
- testing
- tests/unit/gapic/logging_v2
- logging
- google/cloud/logging_v2
- testing
- tests/unit/gapic/logging_v2
- redis_selective
- google/cloud/redis_v1
- testing
- tests/unit/gapic/redis_v1
- redis
- google/cloud/redis_v1
- testing
- tests/unit/gapic/redis_v1
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
| 357 | + | |
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
| 744 | + | |
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 73 | | |
82 | 74 | | |
83 | 75 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments