Skip to content

Commit e055edc

Browse files
chore: update templated files (#358)
Source-Link: googleapis/synthtool@a37f74c Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7054d62 commit e055edc

22 files changed

+329
-276
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070
17-
# created: 2024-04-12T11:35:58.922854369Z
16+
digest: sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32
17+
# created: 2024-07-03T17:43:00.77142528Z

.github/auto-label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/docker/docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.kokoro/populate-secrets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC.
2+
# Copyright 2024 Google LLC.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/publish-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/requirements.txt

Lines changed: 266 additions & 243 deletions
Large diffs are not rendered by default.

.kokoro/test-samples-against-head.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples-impl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/test-samples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.kokoro/trampoline_v2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

.trampolinerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

noxfile.py

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -169,14 +169,28 @@ def install_unittest_dependencies(session, *constraints):
169169
session.install("-e", ".", *constraints)
170170

171171

172-
def default(session):
172+
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
173+
@nox.parametrize(
174+
"protobuf_implementation",
175+
["python", "upb", "cpp"],
176+
)
177+
def unit(session, protobuf_implementation):
173178
# Install all test dependencies, then install this package in-place.
174179

180+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"):
181+
session.skip("cpp implementation is not supported in python 3.11+")
182+
175183
constraints_path = str(
176184
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
177185
)
178186
install_unittest_dependencies(session, "-c", constraints_path)
179187

188+
# TODO(https://github.com/googleapis/synthtool/issues/1976):
189+
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
190+
# The 'cpp' implementation requires Protobuf<4.
191+
if protobuf_implementation == "cpp":
192+
session.install("protobuf<4")
193+
180194
# Run py.test against the unit tests.
181195
session.run(
182196
"py.test",
@@ -190,15 +204,12 @@ def default(session):
190204
"--cov-fail-under=0",
191205
os.path.join("tests", "unit"),
192206
*session.posargs,
207+
env={
208+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
209+
},
193210
)
194211

195212

196-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
197-
def unit(session):
198-
"""Run the unit test suite."""
199-
default(session)
200-
201-
202213
def install_systemtest_dependencies(session, *constraints):
203214
# Use pre-release gRPC for system tests.
204215
# Exclude version 1.52.0rc1 which has a known issue.
@@ -367,9 +378,16 @@ def docfx(session):
367378

368379

369380
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
370-
def prerelease_deps(session):
381+
@nox.parametrize(
382+
"protobuf_implementation",
383+
["python", "upb", "cpp"],
384+
)
385+
def prerelease_deps(session, protobuf_implementation):
371386
"""Run all tests with prerelease versions of dependencies installed."""
372387

388+
if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12"):
389+
session.skip("cpp implementation is not supported in python 3.11+")
390+
373391
# Install all dependencies
374392
session.install("-e", ".[all, tests, tracing]")
375393
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
@@ -404,9 +422,9 @@ def prerelease_deps(session):
404422
"protobuf",
405423
# dependency of grpc
406424
"six",
425+
"grpc-google-iam-v1",
407426
"googleapis-common-protos",
408-
# Exclude version 1.52.0rc1 which has a known issue. See https://github.com/grpc/grpc/issues/32163
409-
"grpcio!=1.52.0rc1",
427+
"grpcio",
410428
"grpcio-status",
411429
"google-api-core",
412430
"google-auth",
@@ -432,7 +450,13 @@ def prerelease_deps(session):
432450
session.run("python", "-c", "import grpc; print(grpc.__version__)")
433451
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")
434452

435-
session.run("py.test", "tests/unit")
453+
session.run(
454+
"py.test",
455+
"tests/unit",
456+
env={
457+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
458+
},
459+
)
436460

437461
system_test_path = os.path.join("tests", "system.py")
438462
system_test_folder_path = os.path.join("tests", "system")
@@ -445,6 +469,9 @@ def prerelease_deps(session):
445469
f"--junitxml=system_{session.python}_sponge_log.xml",
446470
system_test_path,
447471
*session.posargs,
472+
env={
473+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
474+
},
448475
)
449476
if os.path.exists(system_test_folder_path):
450477
session.run(
@@ -453,4 +480,7 @@ def prerelease_deps(session):
453480
f"--junitxml=system_{session.python}_sponge_log.xml",
454481
system_test_folder_path,
455482
*session.posargs,
483+
env={
484+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
485+
},
456486
)

scripts/decrypt-secrets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright 2023 Google LLC All rights reserved.
3+
# Copyright 2024 Google LLC All rights reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

scripts/readme-gen/readme_gen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright 2023 Google LLC
3+
# Copyright 2024 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)