Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
119d155
chore: add support for python 3.14
ohmayr Oct 10, 2025
face4f7
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
4955cb9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
727ae5d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
e15caae
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
9ee84f1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
5ff43ff
Edited client library files for 3.14 support
gkevinzheng Oct 20, 2025
f230636
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
e157972
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
c23eeee
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
89d3996
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
848d7a1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
5f346a6
Noxfile changes
gkevinzheng Oct 20, 2025
dff44bb
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
f6c6fae
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
2c44a75
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
02016f1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
fcd47fa
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 20, 2025
d5cf0e5
Updated owlbot version
gkevinzheng Oct 21, 2025
0438b64
Updated default python version in noxfile
gkevinzheng Oct 21, 2025
958da36
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 21, 2025
bf38343
Fixed system test version in owlbot.py
gkevinzheng Oct 21, 2025
e96df9f
Fixed noxfile version + samples test sink cleanup
gkevinzheng Oct 21, 2025
903c532
Disabled protobuf cpp testing for 3.14
gkevinzheng Oct 21, 2025
a3b49f4
Fixed linting errors
gkevinzheng Oct 21, 2025
cc41714
Use bucket.delete_blobs instead of deleting blobs individually
gkevinzheng Oct 22, 2025
4f618b2
Force delete buckets
gkevinzheng Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
60 changes: 60 additions & 0 deletions .kokoro/samples/python3.14/common.cfg
Original file line number Diff line number Diff line change
@@ -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"
}

###################################################

6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
11 changes: 11 additions & 0 deletions .kokoro/samples/python3.14/periodic-head.cfg
Original file line number Diff line number Diff line change
@@ -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"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
10 changes: 6 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To run a single unit test::

$ nox -s unit-3.13 -- -k <name of test>
$ nox -s unit-3.14 -- -k <name of test>


.. note::
Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.12 -- -k <name of test>
$ nox -s system-3.19 -- -k <name of test>


.. 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
Expand Down Expand Up @@ -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/
Expand All @@ -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`_.
Expand Down
20 changes: 13 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -42,6 +42,7 @@
"3.11",
"3.12",
"3.13",
"3.14",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand All @@ -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"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
Expand All @@ -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",
Expand Down Expand Up @@ -145,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")


Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -385,7 +391,7 @@ def docfx(session):
)


@nox.session(python="3.13")
@nox.session(python="3.14")
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
Expand Down
3 changes: 2 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.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,
)
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions samples/snippets/export_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
obj.delete()
def _delete_object(obj, **kwargs):
obj.delete(**kwargs)


# Runs once for entire test suite
Expand Down Expand Up @@ -79,7 +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_object(bucket)
_delete_object(bucket, force=True)


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion samples/snippets/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down
16 changes: 16 additions & 0 deletions testing/constraints-3.14.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down