Skip to content

Commit 0131a33

Browse files
chore: [Many APIs] Update gapic-generator-python to 1.24.0 (#13771)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 747419463 Source-Link: googleapis/googleapis@340579b Source-Link: googleapis/googleapis-gen@e8997ec Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2VpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6ImU4OTk3ZWM1MTM2ZWNiNmVkOWE5NjlhNGMyZjEzYjNhYjZhMTdjMTIifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhbGVudC8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhc2tzLy5Pd2xCb3QueWFtbCIsImgiOiJlODk5N2VjNTEzNmVjYjZlZDlhOTY5YTRjMmYxM2IzYWI2YTE3YzEyIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRlbGNvYXV0b21hdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRleHR0b3NwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkL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wiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpc2lvbmFpLy5Pd2xCb3QueWFtbCIsImgiOiJlODk5N2VjNTEzNmVjYjZlZDlhOTY5YTRjMmYxM2IzYWI2YTE3YzEyIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtLW1pZ3JhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZwYy1hY2Nlc3MvLk93bEJvdC55YW1sIiwiaCI6ImU4OTk3ZWM1MTM2ZWNiNmVkOWE5NjlhNGMyZjEzYjNhYjZhMTdjMTIifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdlYnJpc2svLk93bEJvdC55YW1sIiwiaCI6ImU4OTk3ZWM1MTM2ZWNiNmVkOWE5NjlhNGMyZjEzYjNhYjZhMTdjMTIifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdlYnNlY3VyaXR5c2Nhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiZTg5OTdlYzUxMzZlY2I2ZWQ5YTk2OWE0YzJmMTNiM2FiNmExN2MxMiJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 048a633 commit 0131a33

File tree

183 files changed

+1988
-1274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+1988
-1274
lines changed

packages/google-cloud-storageinsights/.flake8

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
1919
ignore = E203, E231, E266, E501, W503
2020
exclude =
21-
# Exclude generated code.
22-
**/proto/**
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
2323
**/gapic/**
2424
**/services/**
2525
**/types/**
26+
# Exclude Protobuf gencode
2627
*_pb2.py
2728

2829
# Standard linting exemptions.
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
include README.rst LICENSE
19-
recursive-include google *.json *.proto py.typed
17+
recursive-include google *.py *.pyi *.json *.proto py.typed
2018
recursive-include tests *
2119
global-exclude *.py[co]
2220
global-exclude __pycache__
23-
24-
# Exclude scripts for samples readmegen
25-
prune scripts/readme-gen

packages/google-cloud-storageinsights/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Code-Based Examples
162162
163163
import logging
164164
165-
from google.cloud.translate_v3 import translate
165+
from google.cloud import library_v1
166166
167167
base_logger = logging.getLogger("google")
168168
base_logger.addHandler(logging.StreamHandler())
@@ -174,7 +174,7 @@ Code-Based Examples
174174
175175
import logging
176176
177-
from google.cloud.translate_v3 import translate
177+
from google.cloud import library_v1
178178
179179
base_logger = logging.getLogger("google.cloud.library_v1")
180180
base_logger.addHandler(logging.StreamHandler())

packages/google-cloud-storageinsights/google/cloud/storageinsights_v1/services/storage_insights/transports/grpc.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ def intercept_unary_unary(self, continuation, client_call_details, request):
7272
f"Sending request for {client_call_details.method}",
7373
extra={
7474
"serviceName": "google.cloud.storageinsights.v1.StorageInsights",
75-
"rpcName": client_call_details.method,
75+
"rpcName": str(client_call_details.method),
7676
"request": grpc_request,
7777
"metadata": grpc_request["metadata"],
7878
},
7979
)
80-
8180
response = continuation(client_call_details, request)
8281
if logging_enabled: # pragma: NO COVER
8382
response_metadata = response.trailing_metadata()

packages/google-cloud-storageinsights/noxfile.py

Lines changed: 71 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
18-
19-
from __future__ import absolute_import
20-
15+
#
2116
import os
2217
import pathlib
2318
import re
@@ -32,10 +27,7 @@
3227

3328
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
3429

35-
36-
DEFAULT_PYTHON_VERSION = "3.10"
37-
38-
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
30+
ALL_PYTHON = [
3931
"3.7",
4032
"3.8",
4133
"3.9",
@@ -44,6 +36,14 @@
4436
"3.12",
4537
"3.13",
4638
]
39+
40+
DEFAULT_PYTHON_VERSION = ALL_PYTHON[-1]
41+
42+
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
43+
44+
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
45+
PACKAGE_NAME = "google-cloud-storageinsights"
46+
4747
UNIT_TEST_STANDARD_DEPENDENCIES = [
4848
"mock",
4949
"asyncmock",
@@ -69,9 +69,6 @@
6969
SYSTEM_TEST_EXTRAS: List[str] = []
7070
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}
7171

72-
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
73-
74-
# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
7572
nox.options.sessions = [
7673
"unit",
7774
"system",
@@ -86,6 +83,54 @@
8683
nox.options.error_on_missing_interpreters = True
8784

8885

86+
@nox.session(python=ALL_PYTHON)
87+
def mypy(session):
88+
"""Run the type checker."""
89+
session.install(
90+
"mypy",
91+
"types-requests",
92+
"types-protobuf",
93+
)
94+
session.install(".")
95+
session.run(
96+
"mypy",
97+
"-p",
98+
"google",
99+
)
100+
101+
102+
@nox.session
103+
def update_lower_bounds(session):
104+
"""Update lower bounds in constraints.txt to match setup.py"""
105+
session.install("google-cloud-testutils")
106+
session.install(".")
107+
108+
session.run(
109+
"lower-bound-checker",
110+
"update",
111+
"--package-name",
112+
PACKAGE_NAME,
113+
"--constraints-file",
114+
str(LOWER_BOUND_CONSTRAINTS_FILE),
115+
)
116+
117+
118+
@nox.session
119+
def check_lower_bounds(session):
120+
"""Check lower bounds in setup.py are reflected in constraints file"""
121+
session.install("google-cloud-testutils")
122+
session.install(".")
123+
124+
session.run(
125+
"lower-bound-checker",
126+
"check",
127+
"--package-name",
128+
PACKAGE_NAME,
129+
"--constraints-file",
130+
str(LOWER_BOUND_CONSTRAINTS_FILE),
131+
)
132+
133+
89134
@nox.session(python=DEFAULT_PYTHON_VERSION)
90135
def lint(session):
91136
"""Run linters.
@@ -136,7 +181,7 @@ def format(session):
136181
@nox.session(python=DEFAULT_PYTHON_VERSION)
137182
def lint_setup_py(session):
138183
"""Verify that setup.py is valid (including RST check)."""
139-
session.install("docutils", "pygments")
184+
session.install("setuptools", "docutils", "pygments")
140185
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")
141186

142187

@@ -168,7 +213,7 @@ def install_unittest_dependencies(session, *constraints):
168213
session.install("-e", ".", *constraints)
169214

170215

171-
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
216+
@nox.session(python=ALL_PYTHON)
172217
@nox.parametrize(
173218
"protobuf_implementation",
174219
["python", "upb", "cpp"],
@@ -210,10 +255,7 @@ def unit(session, protobuf_implementation):
210255

211256

212257
def install_systemtest_dependencies(session, *constraints):
213-
# Use pre-release gRPC for system tests.
214-
# Exclude version 1.52.0rc1 which has a known issue.
215-
# See https://github.com/grpc/grpc/issues/32163
216-
session.install("--pre", "grpcio!=1.52.0rc1")
258+
session.install("--pre", "grpcio")
217259

218260
session.install(*SYSTEM_TEST_STANDARD_DEPENDENCIES, *constraints)
219261

@@ -295,7 +337,7 @@ def cover(session):
295337
session.run("coverage", "erase")
296338

297339

298-
@nox.session(python=DEFAULT_PYTHON_VERSION)
340+
@nox.session(python="3.10")
299341
def docs(session):
300342
"""Build the docs for this library."""
301343

@@ -330,7 +372,7 @@ def docs(session):
330372
)
331373

332374

333-
@nox.session(python=DEFAULT_PYTHON_VERSION)
375+
@nox.session(python="3.10")
334376
def docfx(session):
335377
"""Build the docfx yaml files for this library."""
336378

@@ -376,7 +418,7 @@ def docfx(session):
376418
)
377419

378420

379-
@nox.session(python="3.13")
421+
@nox.session(python=DEFAULT_PYTHON_VERSION)
380422
@nox.parametrize(
381423
"protobuf_implementation",
382424
["python", "upb", "cpp"],
@@ -411,9 +453,7 @@ def prerelease_deps(session, protobuf_implementation):
411453
# version, the first version we test with in the unit tests sessions has a
412454
# constraints file containing all dependencies and extras.
413455
with open(
414-
CURRENT_DIRECTORY
415-
/ "testing"
416-
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
456+
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt",
417457
encoding="utf-8",
418458
) as constraints_file:
419459
constraints_text = constraints_file.read()
@@ -477,7 +517,7 @@ def prerelease_deps(session, protobuf_implementation):
477517
)
478518

479519

480-
@nox.session(python="3.13")
520+
@nox.session(python=DEFAULT_PYTHON_VERSION)
481521
@nox.parametrize(
482522
"protobuf_implementation",
483523
["python", "upb"],
@@ -506,9 +546,7 @@ def core_deps_from_source(session, protobuf_implementation):
506546
# version, the first version we test with in the unit tests sessions has a
507547
# constraints file containing all dependencies and extras.
508548
with open(
509-
CURRENT_DIRECTORY
510-
/ "testing"
511-
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
549+
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt",
512550
encoding="utf-8",
513551
) as constraints_file:
514552
constraints_text = constraints_file.read()
@@ -532,10 +570,10 @@ def core_deps_from_source(session, protobuf_implementation):
532570
# Note: If a dependency is added to the `core_dependencies_from_source` list,
533571
# the `prerel_deps` list in the `prerelease_deps` nox session should also be updated.
534572
core_dependencies_from_source = [
535-
f"{CURRENT_DIRECTORY}/../googleapis-common-protos",
573+
"googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos",
536574
"google-api-core @ git+https://github.com/googleapis/python-api-core.git",
537575
"google-auth @ git+https://github.com/googleapis/google-auth-library-python.git",
538-
f"{CURRENT_DIRECTORY}/../grpc-google-iam-v1",
576+
"grpc-google-iam-v1 @ git+https://github.com/googleapis/google-cloud-python#egg=grpc-google-iam-v1&subdirectory=packages/grpc-google-iam-v1",
539577
"proto-plus @ git+https://github.com/googleapis/proto-plus-python.git",
540578
]
541579

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# -*- coding: utf-8 -*-
2-
# This constraints file is required for unit tests.
1+
# We use the constraints file for the latest Python version
2+
# (currently this file) to check that the latest
3+
# major versions of dependencies are supported in setup.py.
34
# List all library dependencies and extras in this file.
4-
google-api-core
5-
proto-plus
6-
protobuf
5+
# Require the latest major version be installed for each dependency.
6+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
7+
# Then this file should have google-cloud-foo>=1
8+
google-api-core>=2
9+
google-auth>=2
10+
proto-plus>=1
11+
protobuf>=6

packages/google-cloud-support/.flake8

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# -*- coding: utf-8 -*-
2-
#
3-
# Copyright 2024 Google LLC
2+
# Copyright 2025 Google LLC
43
#
54
# Licensed under the Apache License, Version 2.0 (the "License");
65
# you may not use this file except in compliance with the License.
76
# You may obtain a copy of the License at
87
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
8+
# http://www.apache.org/licenses/LICENSE-2.0
109
#
1110
# Unless required by applicable law or agreed to in writing, software
1211
# distributed under the License is distributed on an "AS IS" BASIS,
1312
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1413
# See the License for the specific language governing permissions and
1514
# limitations under the License.
16-
17-
# Generated by synthtool. DO NOT EDIT!
15+
#
1816
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
1919
ignore = E203, E231, E266, E501, W503
2020
exclude =
21-
# Exclude generated code.
22-
**/proto/**
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
2323
**/gapic/**
2424
**/services/**
2525
**/types/**
26+
# Exclude Protobuf gencode
2627
*_pb2.py
2728

2829
# Standard linting exemptions.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy