From 44db80569c08a9ed136aec5bf41a9d72323808ee Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 10 Aug 2026 20:00:39 +0000 Subject: [PATCH 1/5] chore(generator): run prerelease_deps and core_deps_from_source on DEFAULT_PYTHON_VERSION --- packages/gapic-generator/gapic/templates/noxfile.py.j2 | 4 ++-- .../tests/integration/goldens/asset/noxfile.py | 4 ++-- .../tests/integration/goldens/credentials/noxfile.py | 4 ++-- .../tests/integration/goldens/eventarc/noxfile.py | 4 ++-- .../tests/integration/goldens/logging/noxfile.py | 4 ++-- .../tests/integration/goldens/logging_internal/noxfile.py | 4 ++-- .../tests/integration/goldens/redis/noxfile.py | 4 ++-- .../tests/integration/goldens/redis_selective/noxfile.py | 4 ++-- .../integration/goldens/storagebatchoperations/noxfile.py | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 8db595319396..93f7313c19ca 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -457,7 +457,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -572,7 +572,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 09d28712c73c..1094ac0f97cb 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 65e26efe21d3..087722a1e6c0 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 42b2349e2cc1..23ac067bdef0 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 09e4b345592a..9f862041977f 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 09e4b345592a..9f862041977f 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index 9b3356dd1272..a28f14fbec56 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index 9b3356dd1272..a28f14fbec56 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index db370dd3dd0f..3308db78f076 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], @@ -564,7 +564,7 @@ def prerelease_deps(session, protobuf_implementation): ) -@nox.session(python=PREVIEW_PYTHON_VERSION) +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], From 92f9a43233cce02aae0b75c0b765e62835f558cf Mon Sep 17 00:00:00 2001 From: ohmayr Date: Mon, 10 Aug 2026 20:07:49 +0000 Subject: [PATCH 2/5] update workflow --- .github/workflows/gapic-generator-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gapic-generator-tests.yml b/.github/workflows/gapic-generator-tests.yml index 17fb7c64f7fe..90b53dcf9c5e 100644 --- a/.github/workflows/gapic-generator-tests.yml +++ b/.github/workflows/gapic-generator-tests.yml @@ -154,10 +154,10 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - - name: Set up Python ${{ needs.python_config.outputs.prerelease_python }} + - name: Set up Python ${{ needs.python_config.outputs.latest_stable_python }} uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: - python-version: ${{ needs.python_config.outputs.prerelease_python }} + python-version: ${{ needs.python_config.outputs.latest_stable_python }} allow-prereleases: true # Caches compiled wheels locally to prevent building heavy libraries # such as grpcio, which we build from scratch on every run for Python 3.15+. From 99e40eeeae7516491758650dc1b4944d036dd699 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 11 Aug 2026 18:36:05 +0000 Subject: [PATCH 3/5] revert prerelease --- packages/gapic-generator/gapic/templates/noxfile.py.j2 | 2 +- .../gapic-generator/tests/integration/goldens/asset/noxfile.py | 2 +- .../tests/integration/goldens/credentials/noxfile.py | 2 +- .../tests/integration/goldens/eventarc/noxfile.py | 2 +- .../tests/integration/goldens/logging/noxfile.py | 2 +- .../tests/integration/goldens/logging_internal/noxfile.py | 2 +- .../gapic-generator/tests/integration/goldens/redis/noxfile.py | 2 +- .../tests/integration/goldens/redis_selective/noxfile.py | 2 +- .../tests/integration/goldens/storagebatchoperations/noxfile.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/gapic-generator/gapic/templates/noxfile.py.j2 b/packages/gapic-generator/gapic/templates/noxfile.py.j2 index 93f7313c19ca..d4176bdf4222 100644 --- a/packages/gapic-generator/gapic/templates/noxfile.py.j2 +++ b/packages/gapic-generator/gapic/templates/noxfile.py.j2 @@ -457,7 +457,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py index 1094ac0f97cb..0098c6989836 100755 --- a/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/asset/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py index 087722a1e6c0..0744db4ab69b 100755 --- a/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py index 23ac067bdef0..f163aac8e963 100755 --- a/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py index 9f862041977f..1510142f6d7d 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py index 9f862041977f..1510142f6d7d 100755 --- a/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py index a28f14fbec56..8b1386af4435 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py index a28f14fbec56..8b1386af4435 100755 --- a/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], diff --git a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py index 3308db78f076..75fded704a26 100755 --- a/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py +++ b/packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py @@ -449,7 +449,7 @@ def docfx(session): ) -@nox.session(python=DEFAULT_PYTHON_VERSION) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb"], From e6c652f5ba3fa462e22c2de664bb266354de5ee9 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 11 Aug 2026 18:39:54 +0000 Subject: [PATCH 4/5] revert workflow --- .github/workflows/gapic-generator-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gapic-generator-tests.yml b/.github/workflows/gapic-generator-tests.yml index 90b53dcf9c5e..17fb7c64f7fe 100644 --- a/.github/workflows/gapic-generator-tests.yml +++ b/.github/workflows/gapic-generator-tests.yml @@ -154,10 +154,10 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - - name: Set up Python ${{ needs.python_config.outputs.latest_stable_python }} + - name: Set up Python ${{ needs.python_config.outputs.prerelease_python }} uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 with: - python-version: ${{ needs.python_config.outputs.latest_stable_python }} + python-version: ${{ needs.python_config.outputs.prerelease_python }} allow-prereleases: true # Caches compiled wheels locally to prevent building heavy libraries # such as grpcio, which we build from scratch on every run for Python 3.15+. From 9cc9e8c0ee0e0a84e47ed18c16fb06ce085de370 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Tue, 11 Aug 2026 21:02:52 +0000 Subject: [PATCH 5/5] update workflow --- .github/workflows/gapic-generator-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gapic-generator-tests.yml b/.github/workflows/gapic-generator-tests.yml index 17fb7c64f7fe..6379fa492d41 100644 --- a/.github/workflows/gapic-generator-tests.yml +++ b/.github/workflows/gapic-generator-tests.yml @@ -133,7 +133,7 @@ jobs: pip install nox cd packages/gapic-generator for pkg in credentials eventarc logging redis; do - nox -f tests/integration/goldens/$pkg/noxfile.py -s format lint unit-${LATEST_STABLE_PYTHON} + nox -f tests/integration/goldens/$pkg/noxfile.py -s format lint unit-${LATEST_STABLE_PYTHON} core_deps_from_source done # Run pylint (errors-only) over the goldens so generator regressions # like undefined names or import-time breakage that ruff/flake8 do @@ -171,7 +171,7 @@ jobs: pip install nox cd packages/gapic-generator for pkg in credentials eventarc logging redis; do - nox -f tests/integration/goldens/$pkg/noxfile.py -s core_deps_from_source prerelease_deps + nox -f tests/integration/goldens/$pkg/noxfile.py -s prerelease_deps done fragment-snippet: