Skip to content

Commit 2024224

Browse files
authored
chore: generate grafeas (#17307)
Towards #17305 See follow up issue #17311
1 parent 9f2ed92 commit 2024224

5 files changed

Lines changed: 234 additions & 240 deletions

File tree

.librarian/generator-input/client-post-processing/unique-grafeas-client.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,20 @@ replacements:
110110
[\s\S]*?\("grpc\.max_receive_message_length", -1\),
111111
\s+\],
112112
\s+\)\n\n
113-
after: ""
113+
after: |
114+
@pytest.fixture(autouse=True)
115+
def set_event_loop():
116+
try:
117+
asyncio.get_running_loop()
118+
yield
119+
except RuntimeError:
120+
loop = asyncio.new_event_loop()
121+
asyncio.set_event_loop(loop)
122+
try:
123+
yield
124+
finally:
125+
loop.close()
126+
asyncio.set_event_loop(None)
114127
count: 1
115128
- paths: [
116129
packages/grafeas/grafeas/grafeas_v1/services/grafeas/transports/base.py,

packages/grafeas/noxfile.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747

4848
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
4949

50-
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
50+
if (CURRENT_DIRECTORY / "testing").exists():
51+
LOWER_BOUND_CONSTRAINTS_FILE = (
52+
CURRENT_DIRECTORY / "testing" / f"constraints-{ALL_PYTHON[0]}.txt"
53+
)
54+
else:
55+
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
5156
PACKAGE_NAME = "grafeas"
5257

5358
UNIT_TEST_STANDARD_DEPENDENCIES = [
@@ -467,14 +472,6 @@ def prerelease_deps(session, protobuf_implementation):
467472
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
468473
session.install(*unit_deps_all)
469474

470-
# Install dependencies for the system test environment
471-
system_deps_all = (
472-
SYSTEM_TEST_STANDARD_DEPENDENCIES
473-
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
474-
+ SYSTEM_TEST_EXTRAS
475-
)
476-
session.install(*system_deps_all)
477-
478475
# Because we test minimum dependency versions on the minimum Python
479476
# version, the first version we test with in the unit tests sessions has a
480477
# constraints file containing all dependencies and extras.
@@ -586,14 +583,6 @@ def core_deps_from_source(session, protobuf_implementation):
586583
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
587584
session.install(*unit_deps_all)
588585

589-
# Install dependencies for the system test environment
590-
system_deps_all = (
591-
SYSTEM_TEST_STANDARD_DEPENDENCIES
592-
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
593-
+ SYSTEM_TEST_EXTRAS
594-
)
595-
session.install(*system_deps_all)
596-
597586
# Because we test minimum dependency versions on the minimum Python
598587
# version, the first version we test with in the unit tests sessions has a
599588
# constraints file containing all dependencies and extras.

packages/grafeas/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# Exclude incompatible versions of `google-auth`
4444
# See https://github.com/googleapis/google-cloud-python/issues/12364
4545
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
46-
"grpcio >= 1.44.0, < 2.0.0",
46+
"grpcio >= 1.59.0, < 2.0.0",
4747
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
4848
"proto-plus >= 1.22.3, <2.0.0",
4949
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",

packages/grafeas/testing/constraints-3.10.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
# then this file should have google-cloud-foo==1.14.0
77
google-api-core==2.17.1
88
google-auth==2.14.1
9-
grpcio==1.44.0
9+
grpcio==1.59.0
1010
proto-plus==1.22.3
1111
protobuf==4.25.8

0 commit comments

Comments
 (0)