From 9f07147c23ac51fe5aeeeff282b187c692a98353 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Tue, 6 Oct 2026 19:26:11 -0700 Subject: [PATCH 1/2] feat: declare 3.15 support --- .github/sync-repo-settings.yaml | 1 + .kokoro/samples/python3.15/common.cfg | 34 ++++++++++++++++++++ .kokoro/samples/python3.15/continuous.cfg | 6 ++++ .kokoro/samples/python3.15/periodic-head.cfg | 11 +++++++ .kokoro/samples/python3.15/periodic.cfg | 6 ++++ .kokoro/samples/python3.15/presubmit.cfg | 6 ++++ CONTRIBUTING.rst | 6 ++-- README.md | 2 +- noxfile.py | 3 +- owlbot.py | 1 + samples/compute/noxfile.py | 2 +- setup.py | 1 + testing/constraints-3.15.txt | 0 13 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 .kokoro/samples/python3.15/common.cfg create mode 100644 .kokoro/samples/python3.15/continuous.cfg create mode 100644 .kokoro/samples/python3.15/periodic-head.cfg create mode 100644 .kokoro/samples/python3.15/periodic.cfg create mode 100644 .kokoro/samples/python3.15/presubmit.cfg create mode 100644 testing/constraints-3.15.txt diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 087d4a55617..b56e86c642f 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,6 +16,7 @@ branchProtectionRules: - 'Samples - Python 3.12' - 'Samples - Python 3.13' - 'Samples - Python 3.14' + - 'Samples - Python 3.15' permissionRules: - team: actools-python permission: admin diff --git a/.kokoro/samples/python3.15/common.cfg b/.kokoro/samples/python3.15/common.cfg new file mode 100644 index 00000000000..d967869c54d --- /dev/null +++ b/.kokoro/samples/python3.15/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.15" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-python-client/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-python" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-api-python-client/.kokoro/trampoline.sh" diff --git a/.kokoro/samples/python3.15/continuous.cfg b/.kokoro/samples/python3.15/continuous.cfg new file mode 100644 index 00000000000..a1c8d9759c8 --- /dev/null +++ b/.kokoro/samples/python3.15/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.15/periodic-head.cfg b/.kokoro/samples/python3.15/periodic-head.cfg new file mode 100644 index 00000000000..fff273b4711 --- /dev/null +++ b/.kokoro/samples/python3.15/periodic-head.cfg @@ -0,0 +1,11 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-python-client/.kokoro/test-samples-against-head.sh" +} diff --git a/.kokoro/samples/python3.15/periodic.cfg b/.kokoro/samples/python3.15/periodic.cfg new file mode 100644 index 00000000000..71cd1e597e3 --- /dev/null +++ b/.kokoro/samples/python3.15/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} diff --git a/.kokoro/samples/python3.15/presubmit.cfg b/.kokoro/samples/python3.15/presubmit.cfg new file mode 100644 index 00000000000..a1c8d9759c8 --- /dev/null +++ b/.kokoro/samples/python3.15/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 2f800676eb6..16f5e1efc01 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.10, 3.11, 3.12, 3.13, and 3.14 on both UNIX and Windows. + 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -72,7 +72,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.14 -- -k + $ nox -s unit-3.15 -- -k .. note:: @@ -227,6 +227,7 @@ We support: - `Python 3.12`_ - `Python 3.13`_ - `Python 3.14`_ +- `Python 3.15`_ .. _Python 3.10: https://docs.python.org/3.10/ @@ -234,6 +235,7 @@ We support: .. _Python 3.12: https://docs.python.org/3.12/ .. _Python 3.13: https://docs.python.org/3.13/ .. _Python 3.14: https://docs.python.org/3.14/ +.. _Python 3.15: https://docs.python.org/3.15/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/README.md b/README.md index b2ac480a401..c7e0c988f5b 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ virtualenv ## Supported Python Versions -Python 3.10, 3.11, 3.12, 3.13, and 3.14 are fully supported and tested. This library may work on later versions of 3, but we do not currently run tests against those versions. +Python 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15 are fully supported and tested. This library may work on later versions of 3, but we do not currently run tests against those versions. ## Unsupported Python Versions diff --git a/noxfile.py b/noxfile.py index fbde0222441..402201e973f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -53,6 +53,7 @@ "unit-3.12", "unit-3.13", "unit-3.14", + "unit-3.15", "lint", "format", "scripts", @@ -96,7 +97,7 @@ def format(session): ) -@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"]) +@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]) @nox.parametrize( "oauth2client", [ diff --git a/owlbot.py b/owlbot.py index 323bed9fb38..2b6537bfe07 100644 --- a/owlbot.py +++ b/owlbot.py @@ -30,6 +30,7 @@ "3.12", "3.13", "3.14", + "3.15", ], ) diff --git a/samples/compute/noxfile.py b/samples/compute/noxfile.py index 1be564b3c43..438eda67ff7 100644 --- a/samples/compute/noxfile.py +++ b/samples/compute/noxfile.py @@ -86,7 +86,7 @@ def get_pytest_env_vars() -> Dict[str, str]: return ret -ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] diff --git a/setup.py b/setup.py index c680bd43ef7..1a259c8d2b5 100644 --- a/setup.py +++ b/setup.py @@ -81,6 +81,7 @@ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", diff --git a/testing/constraints-3.15.txt b/testing/constraints-3.15.txt new file mode 100644 index 00000000000..e69de29bb2d From 526d6b02f86d6ce3530130d8d2f51b259350ddb9 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Wed, 7 Oct 2026 12:29:52 -0700 Subject: [PATCH 2/2] remove hard-coded version references from CONTRIBUTING.md --- CONTRIBUTING.rst | 51 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 45 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 16f5e1efc01..256e5e18dad 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,4 +1,3 @@ -.. Generated by synthtool. DO NOT EDIT! ############ Contributing ############ @@ -21,8 +20,8 @@ In order to add a feature: - The feature must be documented in both the API and narrative documentation. -- The feature must work fully on the following CPython versions: - 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15 on both UNIX and Windows. +- The feature must work fully on all supported CPython versions on + both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -72,7 +71,7 @@ We use `nox `__ to instrument our tests. - To run a single unit test:: - $ nox -s unit-3.15 -- -k + $ nox -s unit- -- -k .. note:: @@ -143,13 +142,7 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.10 -- -k - - - .. note:: - - System tests are only configured to run under Python 3.10. - For expediency, we do not run them in older versions of Python 3. + $ nox -s system- -- -k This alone will not run the tests. You'll need to change some local auth settings and change some configuration in your project to @@ -195,11 +188,11 @@ configure them just like the System Tests. # Run all tests in a folder $ cd samples/snippets - $ nox -s py-3.10 + $ nox -s py- # Run a single sample test $ cd samples/snippets - $ nox -s py-3.10 -- -k + $ nox -s py- -- -k ******************************************** Note About ``README`` as it pertains to PyPI @@ -219,42 +212,10 @@ may cause problems creating links or rendering the description. Supported Python Versions ************************* -We support: - - -- `Python 3.10`_ -- `Python 3.11`_ -- `Python 3.12`_ -- `Python 3.13`_ -- `Python 3.14`_ -- `Python 3.15`_ - - -.. _Python 3.10: https://docs.python.org/3.10/ -.. _Python 3.11: https://docs.python.org/3.11/ -.. _Python 3.12: https://docs.python.org/3.12/ -.. _Python 3.13: https://docs.python.org/3.13/ -.. _Python 3.14: https://docs.python.org/3.14/ -.. _Python 3.15: https://docs.python.org/3.15/ - - Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/google-api-python-client/blob/main/noxfile.py - -We also explicitly decided to support Python 3 beginning with version 3.10. -Reasons for this include: - -- Encouraging use of newest versions of Python 3 -- Taking the lead of `prominent`_ open-source `projects`_ -- `Unicode literal support`_ which allows for a cleaner codebase that - works in both Python 2 and Python 3 - -.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django -.. _projects: http://flask.pocoo.org/docs/0.10/python3/ -.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ - ********** Versioning **********