diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index e5e3c22d19..9db56f8b0c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -17,8 +17,14 @@ env: SHOWCASE_VERSION: 0.35.0 PROTOC_VERSION: 3.20.2 OLDEST_PYTHON: 3.7 - LATEST_STABLE_PYTHON: 3.13 - PRE_RELEASE_PYTHON: 3.14 + LATEST_STABLE_PYTHON: 3.14 + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): + # Switch this to Python 3.15 alpha1 pre-release + # https://peps.python.org/pep-0790/ + PREVIEW_PYTHON_VERSION: 3.14 + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): + # Add Python 3.15 alpha1 pre-release + # https://peps.python.org/pep-0790/ ALL_PYTHON: "['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']" permissions: @@ -431,10 +437,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - name: Set up Python ${{ env.PRE_RELEASE_PYTHON }} + - name: Set up Python ${{ env.PREVIEW_PYTHON_VERSION }} uses: actions/setup-python@v6 with: - python-version: "${{ env.PRE_RELEASE_PYTHON }}" + python-version: "${{ env.PREVIEW_PYTHON_VERSION }}" cache: 'pip' allow-prereleases: true - name: Install nox. diff --git a/gapic/ads-templates/noxfile.py.j2 b/gapic/ads-templates/noxfile.py.j2 index 9a2836cb8f..48646feb5e 100644 --- a/gapic/ads-templates/noxfile.py.j2 +++ b/gapic/ads-templates/noxfile.py.j2 @@ -7,6 +7,9 @@ import os import nox # type: ignore +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Add tests for Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ ALL_PYTHON = [ "3.7", "3.8", @@ -15,6 +18,7 @@ ALL_PYTHON = [ "3.11", "3.12", "3.13", + "3.14", ] @nox.session(python=ALL_PYTHON) diff --git a/gapic/ads-templates/setup.py.j2 b/gapic/ads-templates/setup.py.j2 index b041173f85..97ed76176d 100644 --- a/gapic/ads-templates/setup.py.j2 +++ b/gapic/ads-templates/setup.py.j2 @@ -73,6 +73,7 @@ setuptools.setup( "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/gapic/templates/noxfile.py.j2 b/gapic/templates/noxfile.py.j2 index e4c356cbf6..976fa2ccad 100644 --- a/gapic/templates/noxfile.py.j2 +++ b/gapic/templates/noxfile.py.j2 @@ -32,8 +32,12 @@ ALL_PYTHON = [ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -429,7 +433,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/gapic/templates/setup.py.j2 b/gapic/templates/setup.py.j2 index 2f265dd994..c9dd854b97 100644 --- a/gapic/templates/setup.py.j2 +++ b/gapic/templates/setup.py.j2 @@ -94,6 +94,7 @@ setuptools.setup( "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/noxfile.py b/noxfile.py index 99dab8a441..bfc4fff8b4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,7 +47,7 @@ "3.14", ) -NEWEST_PYTHON = ALL_PYTHON[-2] +NEWEST_PYTHON = ALL_PYTHON[-1] @nox.session(python=ALL_PYTHON) diff --git a/setup.py b/setup.py index bc48d16750..703c8b367f 100644 --- a/setup.py +++ b/setup.py @@ -77,6 +77,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/tests/integration/goldens/asset/noxfile.py b/tests/integration/goldens/asset/noxfile.py index b61714a579..842750346c 100755 --- a/tests/integration/goldens/asset/noxfile.py +++ b/tests/integration/goldens/asset/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/asset/setup.py b/tests/integration/goldens/asset/setup.py index 5d506dc2d9..101ea9331d 100755 --- a/tests/integration/goldens/asset/setup.py +++ b/tests/integration/goldens/asset/setup.py @@ -88,6 +88,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/credentials/noxfile.py b/tests/integration/goldens/credentials/noxfile.py index 9dbefde7b9..e5f8864a33 100755 --- a/tests/integration/goldens/credentials/noxfile.py +++ b/tests/integration/goldens/credentials/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/credentials/setup.py b/tests/integration/goldens/credentials/setup.py index 6ffe75b3ba..a4c5041746 100755 --- a/tests/integration/goldens/credentials/setup.py +++ b/tests/integration/goldens/credentials/setup.py @@ -85,6 +85,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/eventarc/noxfile.py b/tests/integration/goldens/eventarc/noxfile.py index 8a915a5d09..9af468e682 100755 --- a/tests/integration/goldens/eventarc/noxfile.py +++ b/tests/integration/goldens/eventarc/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/eventarc/setup.py b/tests/integration/goldens/eventarc/setup.py index 4cba69da02..bd40117afd 100755 --- a/tests/integration/goldens/eventarc/setup.py +++ b/tests/integration/goldens/eventarc/setup.py @@ -86,6 +86,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/logging/noxfile.py b/tests/integration/goldens/logging/noxfile.py index d397b029d2..0aa3b63010 100755 --- a/tests/integration/goldens/logging/noxfile.py +++ b/tests/integration/goldens/logging/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/logging/setup.py b/tests/integration/goldens/logging/setup.py index 23a3a12a2b..a654413004 100755 --- a/tests/integration/goldens/logging/setup.py +++ b/tests/integration/goldens/logging/setup.py @@ -85,6 +85,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/logging_internal/noxfile.py b/tests/integration/goldens/logging_internal/noxfile.py index d397b029d2..0aa3b63010 100755 --- a/tests/integration/goldens/logging_internal/noxfile.py +++ b/tests/integration/goldens/logging_internal/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/logging_internal/setup.py b/tests/integration/goldens/logging_internal/setup.py index 23a3a12a2b..a654413004 100755 --- a/tests/integration/goldens/logging_internal/setup.py +++ b/tests/integration/goldens/logging_internal/setup.py @@ -85,6 +85,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/redis/noxfile.py b/tests/integration/goldens/redis/noxfile.py index d798ed9a37..d52df038ca 100755 --- a/tests/integration/goldens/redis/noxfile.py +++ b/tests/integration/goldens/redis/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/redis/setup.py b/tests/integration/goldens/redis/setup.py index 54fece2f91..7abe41328b 100755 --- a/tests/integration/goldens/redis/setup.py +++ b/tests/integration/goldens/redis/setup.py @@ -89,6 +89,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/tests/integration/goldens/redis_selective/noxfile.py b/tests/integration/goldens/redis_selective/noxfile.py index d798ed9a37..d52df038ca 100755 --- a/tests/integration/goldens/redis_selective/noxfile.py +++ b/tests/integration/goldens/redis_selective/noxfile.py @@ -39,8 +39,12 @@ "3.14", ] -DEFAULT_PYTHON_VERSION = ALL_PYTHON[-2] -PRE_RELEASE_PYTHON = ALL_PYTHON[-1] +DEFAULT_PYTHON_VERSION = "3.14" + +# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450): +# Switch this to Python 3.15 alpha1 +# https://peps.python.org/pep-0790/ +PREVIEW_PYTHON_VERSION = "3.14" CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() @@ -423,7 +427,7 @@ def docfx(session): ) -@nox.session(python=PRE_RELEASE_PYTHON) +@nox.session(python=PREVIEW_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/tests/integration/goldens/redis_selective/setup.py b/tests/integration/goldens/redis_selective/setup.py index 54fece2f91..7abe41328b 100755 --- a/tests/integration/goldens/redis_selective/setup.py +++ b/tests/integration/goldens/redis_selective/setup.py @@ -89,6 +89,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ],