From 119d155bea86d0cef7784796c1ab49819bae1479 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Fri, 10 Oct 2025 23:03:33 +0000 Subject: [PATCH 01/30] chore: add support for python 3.14 --- .kokoro/samples/python3.14/common.cfg | 60 ++++++++++++++++++++ .kokoro/samples/python3.14/continuous.cfg | 6 ++ .kokoro/samples/python3.14/periodic-head.cfg | 11 ++++ .kokoro/samples/python3.14/periodic.cfg | 6 ++ .kokoro/samples/python3.14/presubmit.cfg | 6 ++ CONTRIBUTING.rst | 6 +- noxfile.py | 5 +- samples/snippets/noxfile.py | 2 +- 8 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 .kokoro/samples/python3.14/common.cfg create mode 100644 .kokoro/samples/python3.14/continuous.cfg create mode 100644 .kokoro/samples/python3.14/periodic-head.cfg create mode 100644 .kokoro/samples/python3.14/periodic.cfg create mode 100644 .kokoro/samples/python3.14/presubmit.cfg diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg new file mode 100644 index 000000000..0fa3f1bad --- /dev/null +++ b/.kokoro/samples/python3.14/common.cfg @@ -0,0 +1,60 @@ +# 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.14" +} + +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-314" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-logging/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-logging/.kokoro/trampoline_v2.sh" + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + diff --git a/.kokoro/samples/python3.14/continuous.cfg b/.kokoro/samples/python3.14/continuous.cfg new file mode 100644 index 000000000..a1c8d9759 --- /dev/null +++ b/.kokoro/samples/python3.14/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.14/periodic-head.cfg b/.kokoro/samples/python3.14/periodic-head.cfg new file mode 100644 index 000000000..7e2973e3b --- /dev/null +++ b/.kokoro/samples/python3.14/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/python-logging/.kokoro/test-samples-against-head.sh" +} diff --git a/.kokoro/samples/python3.14/periodic.cfg b/.kokoro/samples/python3.14/periodic.cfg new file mode 100644 index 000000000..71cd1e597 --- /dev/null +++ b/.kokoro/samples/python3.14/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.14/presubmit.cfg b/.kokoro/samples/python3.14/presubmit.cfg new file mode 100644 index 000000000..a1c8d9759 --- /dev/null +++ b/.kokoro/samples/python3.14/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 7bbacd5ca..7e8bdccf3 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.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 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.13 -- -k + $ nox -s unit-3.14 -- -k .. note:: @@ -228,6 +228,7 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ @@ -236,6 +237,7 @@ We support: .. _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/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/noxfile.py b/noxfile.py index b75e78ac3..92c204114 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,6 +42,7 @@ "3.11", "3.12", "3.13", + "3.14" ] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -185,7 +186,7 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -385,7 +386,7 @@ def docfx(session): ) -@nox.session(python="3.13") +@nox.session(python="3.14") @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index c9a3d1ecb..c326375be 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] From face4f7aefa68b59b513d003b05ae762d30ed2f0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 10 Oct 2025 23:07:08 +0000 Subject: [PATCH 02/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ CONTRIBUTING.rst | 6 ++---- noxfile.py | 5 ++--- samples/snippets/noxfile.py | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 0fa3f1bad..f9fa50849 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -58,3 +58,23 @@ env_vars: { ################################################### + + +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 7e8bdccf3..7bbacd5ca 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.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. + 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 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.13 -- -k .. note:: @@ -228,7 +228,6 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ -- `Python 3.14`_ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ @@ -237,7 +236,6 @@ We support: .. _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/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/noxfile.py b/noxfile.py index 92c204114..b75e78ac3 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,7 +42,6 @@ "3.11", "3.12", "3.13", - "3.14" ] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -186,7 +185,7 @@ def install_unittest_dependencies(session, *constraints): def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"): + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -386,7 +385,7 @@ def docfx(session): ) -@nox.session(python="3.14") +@nox.session(python="3.13") @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index c326375be..c9a3d1ecb 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] From 4955cb9438c549d74908055ca181518c51e672e6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 10 Oct 2025 23:09:33 +0000 Subject: [PATCH 03/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index f9fa50849..4fbf351a7 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -60,6 +60,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 727ae5deba3edcf7bbd01e7e44fd79f17a620013 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 10 Oct 2025 23:11:53 +0000 Subject: [PATCH 04/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 4fbf351a7..3329dbfdf 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -80,6 +80,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From e15caaef0a7a71a9edd434d5eafcb8fc3400a93c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 10 Oct 2025 23:14:01 +0000 Subject: [PATCH 05/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 3329dbfdf..22b9769dc 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -100,6 +100,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 9ee84f1747c91e21e84e8bda1c478a0b80b271b0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 10 Oct 2025 23:16:20 +0000 Subject: [PATCH 06/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 22b9769dc..7c3dd54a8 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -120,6 +120,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 5ff43ffc90841844f74cfb09b5e66081756003bd Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Mon, 20 Oct 2025 16:11:53 +0000 Subject: [PATCH 07/30] Edited client library files for 3.14 support --- noxfile.py | 16 +++++++++++----- owlbot.py | 3 ++- pytest.ini | 2 ++ setup.py | 2 ++ testing/constraints-3.14.txt | 16 ++++++++++++++++ 5 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 testing/constraints-3.14.txt diff --git a/noxfile.py b/noxfile.py index b75e78ac3..6b4fa0f6b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.8" +DEFAULT_PYTHON_VERSION = "3.13" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ "3.7", @@ -42,6 +42,7 @@ "3.11", "3.12", "3.13", + "3.14", ] UNIT_TEST_STANDARD_DEPENDENCIES = [ "mock", @@ -60,7 +61,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.14"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -81,7 +82,12 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() nox.options.sessions = [ - "unit", + "unit-3.9", + "unit-3.10", + "unit-3.11", + "unit-3.12", + "unit-3.13", + "unit-3.14", "system", "cover", "lint", @@ -184,8 +190,8 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + py_version = tuple([int(v) for v in session.python.split(".")]) + if protobuf_implementation == "cpp" and py_version >= (3, 11): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( diff --git a/owlbot.py b/owlbot.py index 2be8464c2..e3777d243 100644 --- a/owlbot.py +++ b/owlbot.py @@ -95,7 +95,8 @@ def place_before(path, text, *before_text, escape=None): "google-cloud-testutils", "opentelemetry-sdk" ], - system_test_python_versions=["3.12"], + system_test_python_versions=["3.19"], + unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], unit_test_external_dependencies=["flask", "webob", "django"], samples=True, ) diff --git a/pytest.ini b/pytest.ini index 2d8ce14b8..c4f5329e6 100644 --- a/pytest.ini +++ b/pytest.ini @@ -27,3 +27,5 @@ filterwarnings = ignore:.*Please use message_factory.GetMessageClass\(\) instead. SymbolDatabase.GetPrototype\(\) will be removed soon.:UserWarning # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/2046 is fixed ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning + # Remove once credential file support is removed + ignore:.*The \`credentials_file\` argument is deprecated.*:DeprecationWarning \ No newline at end of file diff --git a/setup.py b/setup.py index c80db0467..0bd8d6a83 100644 --- a/setup.py +++ b/setup.py @@ -85,6 +85,8 @@ "Programming Language :: Python :: 3.10", "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/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 000000000..981d37ac6 --- /dev/null +++ b/testing/constraints-3.14.txt @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +google-auth +proto-plus +protobuf +google-cloud-core +google-cloud-appengine-logging +google-cloud-audit-log +grpc-google-iam-v1 +opentelemetry-api + +# optional dependencies +django +flask From f230636e873d24717dacb8ffc40a4cc277c0b971 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:14:44 +0000 Subject: [PATCH 08/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ CONTRIBUTING.rst | 10 ++++++---- noxfile.py | 17 ++++++----------- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 7c3dd54a8..5f3859f8a 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -140,6 +140,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 7bbacd5ca..e029e8824 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.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 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.13 -- -k + $ nox -s unit-3.14 -- -k .. note:: @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.12 -- -k + $ nox -s system-3.19 -- -k .. note:: - System tests are only configured to run under Python 3.12. + System tests are only configured to run under Python 3.19. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local @@ -228,6 +228,7 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ .. _Python 3.7: https://docs.python.org/3.7/ .. _Python 3.8: https://docs.python.org/3.8/ @@ -236,6 +237,7 @@ We support: .. _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/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/noxfile.py b/noxfile.py index 6b4fa0f6b..d4d7c586b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = "3.8" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ "3.7", @@ -61,7 +61,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.14"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.19"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -82,12 +82,7 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() nox.options.sessions = [ - "unit-3.9", - "unit-3.10", - "unit-3.11", - "unit-3.12", - "unit-3.13", - "unit-3.14", + "unit", "system", "cover", "lint", @@ -190,8 +185,8 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): + + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( @@ -391,7 +386,7 @@ def docfx(session): ) -@nox.session(python="3.13") +@nox.session(python="3.14") @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], From e1579728d3861c8f93e827d25c53f2e12f5fb5e8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:17:05 +0000 Subject: [PATCH 09/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 5f3859f8a..89eed094d 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -160,6 +160,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From c23eeeebdca7349aced7af5b85adabff03e9447a Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:20:02 +0000 Subject: [PATCH 10/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 89eed094d..b7050b906 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -180,6 +180,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 89d3996546416ee60c3eefa28fa61e49c07f35a3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:22:15 +0000 Subject: [PATCH 11/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index b7050b906..8d716db90 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -200,6 +200,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 848d7a17cafacfa0704792a65a5c2bcb5d96fb98 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:24:08 +0000 Subject: [PATCH 12/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 8d716db90..b90fe19b2 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -220,6 +220,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 5f346a6d65818f7ac39ee7a28e4687352d8b53f2 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Mon, 20 Oct 2025 16:51:11 +0000 Subject: [PATCH 13/30] Noxfile changes --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index d4d7c586b..94508b37f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -185,8 +185,8 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + py_version = tuple([int(v) for v in session.python.split(".")]) + if protobuf_implementation == "cpp" and py_version >= (3, 11): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( From dff44bb208dcecaa9d85d6642cf8f5f3612b2bcf Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:53:22 +0000 Subject: [PATCH 14/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ noxfile.py | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index b90fe19b2..7b5ee2e07 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -240,6 +240,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py diff --git a/noxfile.py b/noxfile.py index 94508b37f..d4d7c586b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -185,8 +185,8 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - py_version = tuple([int(v) for v in session.python.split(".")]) - if protobuf_implementation == "cpp" and py_version >= (3, 11): + + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( From f6c6fae7b29cf354eb60c9c56b9c9e7cf73b0ac0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:55:51 +0000 Subject: [PATCH 15/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 7b5ee2e07..f4e6990d2 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -260,6 +260,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 2c44a75e064904b981edde557c2697ca5a04f470 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 16:58:22 +0000 Subject: [PATCH 16/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index f4e6990d2..cbd06d996 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -280,6 +280,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From 02016f13d1790b4917e3fe3f15150d48fe7e1e8d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 17:00:10 +0000 Subject: [PATCH 17/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index cbd06d996..3c12267bb 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -300,6 +300,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From fcd47fa3e406de507a3a1f5f58e957e2a29c4762 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 20 Oct 2025 17:02:35 +0000 Subject: [PATCH 18/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 3c12267bb..821612450 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -320,6 +320,26 @@ env_vars: { +############################################# +# this section merged from .kokoro/common_env_vars.cfg using owlbot.py + +env_vars: { + key: "PRODUCT_AREA_LABEL" + value: "observability" +} +env_vars: { + key: "PRODUCT_LABEL" + value: "logging" +} +env_vars: { + key: "LANGUAGE_LABEL" + value: "python" +} + +################################################### + + + ############################################# # this section merged from .kokoro/common_env_vars.cfg using owlbot.py From d5cf0e5774ce4f00e40e8e394d7b54a06770d7d8 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 14:01:33 +0000 Subject: [PATCH 19/30] Updated owlbot version --- .github/.OwlBot.lock.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6f1eaeb91..0de95e19a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:ecf409a43d8b157fb83c403de4d83e3da7d88e423044410c0e2434bf776221d1 + digest: sha256:543e209e7c1c1ffe720eb4db1a3f045a75099304fb19aa11a47dc717b8aae2a9 # created: 2025-04-10T16:21:41.67162455Z From 0438b64f44347b8b6d4d7f84d9027cad23864b7c Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 14:22:04 +0000 Subject: [PATCH 20/30] Updated default python version in noxfile --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index d4d7c586b..2d014cddc 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.8" +DEFAULT_PYTHON_VERSION = "3.13" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ "3.7", From 958da36533aef87319ba4ce9a8bd1f47c761bb17 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 21 Oct 2025 14:24:45 +0000 Subject: [PATCH 21/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .kokoro/samples/python3.14/common.cfg | 300 -------------------------- samples/snippets/noxfile.py | 2 +- 2 files changed, 1 insertion(+), 301 deletions(-) diff --git a/.kokoro/samples/python3.14/common.cfg b/.kokoro/samples/python3.14/common.cfg index 821612450..0fa3f1bad 100644 --- a/.kokoro/samples/python3.14/common.cfg +++ b/.kokoro/samples/python3.14/common.cfg @@ -58,303 +58,3 @@ env_vars: { ################################################### - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - - - -############################################# -# this section merged from .kokoro/common_env_vars.cfg using owlbot.py - -env_vars: { - key: "PRODUCT_AREA_LABEL" - value: "observability" -} -env_vars: { - key: "PRODUCT_LABEL" - value: "logging" -} -env_vars: { - key: "LANGUAGE_LABEL" - value: "python" -} - -################################################### - diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index c9a3d1ecb..c326375be 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] From bf38343e3cdea9f55c12ad322fe8d3e4dd4615ac Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 14:26:41 +0000 Subject: [PATCH 22/30] Fixed system test version in owlbot.py --- owlbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owlbot.py b/owlbot.py index e3777d243..4f8752e30 100644 --- a/owlbot.py +++ b/owlbot.py @@ -95,7 +95,7 @@ def place_before(path, text, *before_text, escape=None): "google-cloud-testutils", "opentelemetry-sdk" ], - system_test_python_versions=["3.19"], + system_test_python_versions=["3.9"], unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], unit_test_external_dependencies=["flask", "webob", "django"], samples=True, From e96df9ffe220479172d8e1dfdfcd7fd5a3b5c4ae Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 17:16:04 +0000 Subject: [PATCH 23/30] Fixed noxfile version + samples test sink cleanup --- .github/sync-repo-settings.yaml | 2 ++ noxfile.py | 9 +++++++-- pytest.ini | 2 +- samples/snippets/export_test.py | 3 +++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 439a0bcb7..f38e0685c 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,3 +16,5 @@ branchProtectionRules: - 'Samples - Python 3.10' - 'Samples - Python 3.11' - 'Samples - Python 3.12' + - 'Samples - Python 3.13' + - 'Samples - Python 3.14' diff --git a/noxfile.py b/noxfile.py index 2d014cddc..b8c2a01d6 100644 --- a/noxfile.py +++ b/noxfile.py @@ -61,7 +61,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.19"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9"] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest", @@ -82,7 +82,12 @@ CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() nox.options.sessions = [ - "unit", + "unit-3.9", + "unit-3.10", + "unit-3.11", + "unit-3.12", + "unit-3.13", + "unit-3.14", "system", "cover", "lint", diff --git a/pytest.ini b/pytest.ini index c4f5329e6..960d6cba1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -28,4 +28,4 @@ filterwarnings = # Remove warning once https://github.com/googleapis/gapic-generator-python/issues/2046 is fixed ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning # Remove once credential file support is removed - ignore:.*The \`credentials_file\` argument is deprecated.*:DeprecationWarning \ No newline at end of file + ignore:.*The \`credentials_file\` argument is deprecated.*:DeprecationWarning diff --git a/samples/snippets/export_test.py b/samples/snippets/export_test.py index 845359e09..ef9dc460d 100644 --- a/samples/snippets/export_test.py +++ b/samples/snippets/export_test.py @@ -79,6 +79,9 @@ def cleanup_old_sinks(): # Bucket timestamp is int(time.time() * 1000) bucket_timestamp = int(match.group(1)) if TIMESTAMP - bucket_timestamp // 1000 > CLEANUP_THRESHOLD: + # Delete all blobs in the bucket before deleting the bucket. + for blob in bucket.list_blobs(): + _delete_object(blob) _delete_object(bucket) From 903c5323753f531b6ea5e42f487bf1d3e23d9bf3 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 18:47:33 +0000 Subject: [PATCH 24/30] Disabled protobuf cpp testing for 3.14 --- noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index b8c2a01d6..f43e2a61f 100644 --- a/noxfile.py +++ b/noxfile.py @@ -190,8 +190,8 @@ def install_unittest_dependencies(session, *constraints): ) def unit(session, protobuf_implementation): # Install all test dependencies, then install this package in-place. - - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + py_version = tuple([int(v) for v in session.python.split(".")]) + if protobuf_implementation == "cpp" and py_version >= (3, 11): session.skip("cpp implementation is not supported in python 3.11+") constraints_path = str( From a3b49f4a29c43ebbec399d7584dfcfd597beb9e2 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 21 Oct 2025 20:24:42 +0000 Subject: [PATCH 25/30] Fixed linting errors --- noxfile.py | 2 +- tests/system/test_system.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index f43e2a61f..ed5e4778b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -151,7 +151,7 @@ def format(session): @nox.session(python=DEFAULT_PYTHON_VERSION) def lint_setup_py(session): """Verify that setup.py is valid (including RST check).""" - session.install("docutils", "pygments") + session.install("setuptools", "docutils", "pygments") session.run("python", "setup.py", "check", "--restructuredtext", "--strict") diff --git a/tests/system/test_system.py b/tests/system/test_system.py index 487ecde62..fb80e3825 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -1058,7 +1058,7 @@ def retryable(): # http and gapic results should be consistent self.assertEqual(gapic_list[0].insert_id, http_list[0].insert_id) # returned logs should be in descending order - self.assertEqual(gapic_list[0].payload, f"test {log_count-1}") + self.assertEqual(gapic_list[0].payload, f"test {log_count - 1}") RetryErrors( (ServiceUnavailable, InternalServerError, AssertionError), From cc41714b153dedc628291145b38ee2b186390d40 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Wed, 22 Oct 2025 16:10:39 +0000 Subject: [PATCH 26/30] Use bucket.delete_blobs instead of deleting blobs individually --- samples/snippets/export_test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/snippets/export_test.py b/samples/snippets/export_test.py index ef9dc460d..d90761049 100644 --- a/samples/snippets/export_test.py +++ b/samples/snippets/export_test.py @@ -50,7 +50,7 @@ def _create_sink_name(): @backoff.on_exception(backoff.expo, Exception, max_time=60, raise_on_giveup=False) -def _delete_object(obj): +def _delete_object(obj, force=False): obj.delete() @@ -80,8 +80,7 @@ def cleanup_old_sinks(): bucket_timestamp = int(match.group(1)) if TIMESTAMP - bucket_timestamp // 1000 > CLEANUP_THRESHOLD: # Delete all blobs in the bucket before deleting the bucket. - for blob in bucket.list_blobs(): - _delete_object(blob) + bucket.delete_blobs(bucket.list_blobs()) _delete_object(bucket) From 4f618b271b72795ad9f06c40195de8eb3cbfc156 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Wed, 29 Oct 2025 18:20:34 +0000 Subject: [PATCH 27/30] Force delete buckets --- samples/snippets/export_test.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/samples/snippets/export_test.py b/samples/snippets/export_test.py index d90761049..c9eb18efb 100644 --- a/samples/snippets/export_test.py +++ b/samples/snippets/export_test.py @@ -50,8 +50,8 @@ def _create_sink_name(): @backoff.on_exception(backoff.expo, Exception, max_time=60, raise_on_giveup=False) -def _delete_object(obj, force=False): - obj.delete() +def _delete_object(obj, **kwargs): + obj.delete(**kwargs) # Runs once for entire test suite @@ -79,9 +79,7 @@ def cleanup_old_sinks(): # Bucket timestamp is int(time.time() * 1000) bucket_timestamp = int(match.group(1)) if TIMESTAMP - bucket_timestamp // 1000 > CLEANUP_THRESHOLD: - # Delete all blobs in the bucket before deleting the bucket. - bucket.delete_blobs(bucket.list_blobs()) - _delete_object(bucket) + _delete_object(bucket, force=True) @pytest.fixture From 5c996f8cec37576f65ad7d8c02e5be1df85e349e Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 12 Nov 2025 18:30:08 +0000 Subject: [PATCH 28/30] set python 3.14 as the default version --- CONTRIBUTING.rst | 4 ++-- noxfile.py | 6 +++--- setup.py | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e029e8824..9b6c26a10 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system-3.19 -- -k + $ nox -s system-3.14 -- -k .. note:: - System tests are only configured to run under Python 3.19. + System tests are only configured to run under Python 3.14. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local diff --git a/noxfile.py b/noxfile.py index 4e75798cd..0d2f0eea7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,7 @@ ISORT_VERSION = "isort==5.11.0" LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"] -DEFAULT_PYTHON_VERSION = "3.13" +DEFAULT_PYTHON_VERSION = "3.14" UNIT_TEST_PYTHON_VERSIONS: List[str] = [ "3.9", @@ -389,7 +389,7 @@ def docfx(session): ) -@nox.session(python="3.14") +@nox.session(python=DEFAULT_PYTHON_VERSION) @nox.parametrize( "protobuf_implementation", ["python", "upb", "cpp"], @@ -397,7 +397,7 @@ def docfx(session): def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"): + if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies diff --git a/setup.py b/setup.py index 0bd8d6a83..deafd40b9 100644 --- a/setup.py +++ b/setup.py @@ -44,6 +44,8 @@ "google-cloud-audit-log >= 0.3.1, < 1.0.0", "google-cloud-core >= 2.0.0, <3.0.0", "grpc-google-iam-v1 >=0.12.4, <1.0.0", + "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "opentelemetry-api >= 1.9.0", "proto-plus >= 1.22.0, <2.0.0", "proto-plus >= 1.22.2, <2.0.0; python_version>='3.11'", From 3af9757cf06814809006ef09a9102b53dc1be6b9 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 12 Nov 2025 18:32:15 +0000 Subject: [PATCH 29/30] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20?= =?UTF-8?q?post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- noxfile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 0d2f0eea7..956784930 100644 --- a/noxfile.py +++ b/noxfile.py @@ -397,7 +397,12 @@ def docfx(session): def prerelease_deps(session, protobuf_implementation): """Run all tests with prerelease versions of dependencies installed.""" - if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13", "3.14"): + if protobuf_implementation == "cpp" and session.python in ( + "3.11", + "3.12", + "3.13", + "3.14", + ): session.skip("cpp implementation is not supported in python 3.11+") # Install all dependencies From e6e5d63ae3eb3c206b9d49d0379cbdba3fad5ba3 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 12 Nov 2025 18:32:48 +0000 Subject: [PATCH 30/30] set python 3.14 as the default version for system tests --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 956784930..93a4e3b31 100644 --- a/noxfile.py +++ b/noxfile.py @@ -59,7 +59,7 @@ UNIT_TEST_EXTRAS: List[str] = [] UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {} -SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9"] +SYSTEM_TEST_PYTHON_VERSIONS: List[str] = [DEFAULT_PYTHON_VERSION] SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [ "mock", "pytest",