Skip to content

Commit 2137f8b

Browse files
committed
tests: add Python 3.15 pre-release testing
1 parent 0258405 commit 2137f8b

10 files changed

Lines changed: 29 additions & 40 deletions

File tree

.github/workflows/gapic-generator-tests.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ env:
1818
SHOWCASE_VERSION: 0.35.0
1919
PROTOC_VERSION: 3.20.2
2020
LATEST_STABLE_PYTHON: 3.14
21-
ALL_PYTHON: "['3.10', '3.11', '3.12', '3.13', '3.14']"
21+
PREVIEW_PYTHON: 3.15
22+
ALL_PYTHON: "['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']"
23+
TRIMMED_PYTHON: "['3.10', '3.14', '3.15']"
2224

2325
jobs:
2426
check_changes:
@@ -47,6 +49,8 @@ jobs:
4749
outputs:
4850
all_python: ${{ env.ALL_PYTHON }}
4951
latest_stable_python: ${{ env.LATEST_STABLE_PYTHON }}
52+
preview_python: ${{ env.PREVIEW_PYTHON }}
53+
trimmed_python: $${{ env.TRIMMED_PYTHON }}
5054
steps:
5155
- run: echo "Initializing config for gapic-generator"
5256

@@ -65,6 +69,7 @@ jobs:
6569
uses: actions/setup-python@v6
6670
with:
6771
python-version: "${{ matrix.python }}"
72+
allow-prereleases: true
6873
- name: Install System Deps & Protoc
6974
run: |
7075
sudo apt-get update && sudo apt-get install -y curl pandoc unzip
@@ -132,10 +137,11 @@ jobs:
132137
runs-on: ubuntu-latest
133138
steps:
134139
- uses: actions/checkout@v6
135-
- name: Set up Python
140+
- name: Set up Python ${{ needs.python_config.outputs.preview_python }}
136141
uses: actions/setup-python@v6
137142
with:
138-
python-version: ${{ needs.python_config.outputs.latest_stable_python }}
143+
python-version: ${{ needs.python_config.outputs.preview_python }}
144+
allow-prereleases: true
139145
- name: Install System Deps
140146
run: sudo apt-get update && sudo apt-get install -y pandoc
141147
- name: Run Goldens (Prerelease)
@@ -150,14 +156,15 @@ jobs:
150156
needs: python_config
151157
strategy:
152158
matrix:
153-
python: ["3.10", "3.14"]
159+
python: ${{ fromJSON(needs.python_config.outputs.trimmed_python) }}
154160
runs-on: ubuntu-latest
155161
steps:
156162
- uses: actions/checkout@v6
157163
- name: Set up Python
158164
uses: actions/setup-python@v6
159165
with:
160166
python-version: ${{ matrix.python }}
167+
allow-prereleases: true
161168
# This fixes the Pandoc error
162169
- name: Install System Deps & Protoc
163170
run: |

packages/gapic-generator/gapic/templates/noxfile.py.j2

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ ALL_PYTHON = [
3030
"3.12",
3131
"3.13",
3232
"3.14",
33+
"3.15",
3334
]
3435

3536
DEFAULT_PYTHON_VERSION = "3.14"
3637

37-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
38-
# Switch this to Python 3.15 alpha1
39-
# https://peps.python.org/pep-0790/
40-
PREVIEW_PYTHON_VERSION = "3.14"
38+
PREVIEW_PYTHON_VERSION = "3.15"
4139

4240
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
4341

packages/gapic-generator/tests/integration/goldens/asset/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/logging/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/redis/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
"3.12",
3838
"3.13",
3939
"3.14",
40+
"3.15",
4041
]
4142

4243
DEFAULT_PYTHON_VERSION = "3.14"
4344

44-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
45-
# Switch this to Python 3.15 alpha1
46-
# https://peps.python.org/pep-0790/
47-
PREVIEW_PYTHON_VERSION = "3.14"
45+
PREVIEW_PYTHON_VERSION = "3.15"
4846

4947
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
5048

0 commit comments

Comments
 (0)