Skip to content

Commit 3eb4a32

Browse files
authored
chore: regenerate google-cloud-productregistry (#17920)
`google-cloud-productregistry` was recently added in #17783 but was missing from `librarian.yaml`. As a result, the library was out of date. This PR adds an entry to `librarian.yaml` and updates `google-cloud-productregistry` using librarian `0.30.0`.
1 parent a53487a commit 3eb4a32

9 files changed

Lines changed: 44 additions & 15 deletions

File tree

librarian.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,12 @@ libraries:
17121712
- path: google/cloud/privilegedaccessmanager/v1
17131713
python:
17141714
default_version: v1
1715+
- name: google-cloud-productregistry
1716+
version: 0.1.0
1717+
apis:
1718+
- path: google/cloud/productregistry/v1
1719+
python:
1720+
default_version: v1
17151721
- name: google-cloud-pubsub
17161722
version: 2.39.0
17171723
apis:

packages/google-cloud-productregistry/google/cloud/productregistry_v1/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@
2323

2424
from importlib import metadata
2525

26+
# PEP 0810: Explicit Lazy Imports
27+
# Python 3.15+ natively intercepts and defers these imports.
28+
# Developers can disable this behavior and force eager imports.
29+
# For more information, see:
30+
# https://docs.python.org/3.15/library/sys.html#sys.set_lazy_imports_filter
31+
# Older Python versions safely ignore this variable.
32+
__lazy_modules__ = {
33+
"google.cloud.productregistry_v1.services.cloud_product_registry_read_service",
34+
"google.cloud.productregistry_v1.types.cloud_product_registry_read_service",
35+
"google.cloud.productregistry_v1.types.lifecycle_state",
36+
"google.cloud.productregistry_v1.types.logical_product",
37+
"google.cloud.productregistry_v1.types.logical_product_variant",
38+
"google.cloud.productregistry_v1.types.product_suite",
39+
}
40+
41+
2642
from .services.cloud_product_registry_read_service import (
2743
CloudProductRegistryReadServiceAsyncClient,
2844
CloudProductRegistryReadServiceClient,

packages/google-cloud-productregistry/google/cloud/productregistry_v1/services/cloud_product_registry_read_service/async_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,9 +1138,7 @@ async def __aexit__(self, exc_type, exc, tb):
11381138
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
11391139
gapic_version=package_version.__version__
11401140
)
1141-
1142-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1143-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
1141+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
11441142

11451143

11461144
__all__ = ("CloudProductRegistryReadServiceAsyncClient",)

packages/google-cloud-productregistry/google/cloud/productregistry_v1/services/cloud_product_registry_read_service/client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,6 @@ def __exit__(self, type, value, traceback):
15821582
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
15831583
gapic_version=package_version.__version__
15841584
)
1585-
1586-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
1587-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
1585+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
15881586

15891587
__all__ = ("CloudProductRegistryReadServiceClient",)

packages/google-cloud-productregistry/google/cloud/productregistry_v1/services/cloud_product_registry_read_service/transports/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
3737
gapic_version=package_version.__version__
3838
)
39-
40-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
41-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
39+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
4240

4341

4442
class CloudProductRegistryReadServiceTransport(abc.ABC):

packages/google-cloud-productregistry/google/cloud/productregistry_v1/services/cloud_product_registry_read_service/transports/rest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858
rest_version=f"requests@{requests_version}",
5959
)
6060

61-
if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER
62-
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
61+
DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__
6362

6463

6564
class CloudProductRegistryReadServiceRestInterceptor:

packages/google-cloud-productregistry/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
release_status = "Development Status :: 5 - Production/Stable"
4545

4646
dependencies = [
47-
"google-api-core[grpc] >= 2.24.2, <3.0.0",
47+
"google-api-core[grpc] >= 2.25.0, <3.0.0",
4848
# Exclude incompatible versions of `google-auth`
4949
# See https://github.com/googleapis/google-cloud-python/issues/12364
5050
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",

packages/google-cloud-productregistry/testing/constraints-3.10.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# pinning their versions to their lower bounds.
55
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
66
# then this file should have google-cloud-foo==1.14.0
7-
google-api-core==2.24.2
7+
google-api-core==2.25.0
88
google-auth==2.14.1
99
grpcio==1.59.0
1010
proto-plus==1.26.1

packages/google-cloud-productregistry/tests/unit/gapic/productregistry_v1/test_cloud_product_registry_read_service.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,14 @@ def test_cloud_product_registry_read_service_client_get_mtls_endpoint_and_cert_s
10781078
config_filename = "mock_certificate_config.json"
10791079
config_file_content = json.dumps(config_data)
10801080
m = mock.mock_open(read_data=config_file_content)
1081-
with mock.patch("builtins.open", m):
1081+
with (
1082+
mock.patch("builtins.open", m),
1083+
mock.patch(
1084+
"os.path.exists",
1085+
side_effect=lambda path: os.path.basename(path)
1086+
== config_filename,
1087+
),
1088+
):
10821089
with mock.patch.dict(
10831090
os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename}
10841091
):
@@ -1125,7 +1132,14 @@ def test_cloud_product_registry_read_service_client_get_mtls_endpoint_and_cert_s
11251132
config_filename = "mock_certificate_config.json"
11261133
config_file_content = json.dumps(config_data)
11271134
m = mock.mock_open(read_data=config_file_content)
1128-
with mock.patch("builtins.open", m):
1135+
with (
1136+
mock.patch("builtins.open", m),
1137+
mock.patch(
1138+
"os.path.exists",
1139+
side_effect=lambda path: os.path.basename(path)
1140+
== config_filename,
1141+
),
1142+
):
11291143
with mock.patch.dict(
11301144
os.environ, {"GOOGLE_API_CERTIFICATE_CONFIG": config_filename}
11311145
):

0 commit comments

Comments
 (0)