Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 43ba9cd

Browse files
committed
feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
1 parent 1cc7e7f commit 43ba9cd

35 files changed

Lines changed: 162 additions & 72 deletions

.librarian/state.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
1+
image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
22
libraries:
33
- id: google-cloud-pubsub
44
version: 2.35.0

.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"api_id": "pubsub.googleapis.com",
1212
"requires_billing": true,
1313
"default_version": "v1",
14-
"codeowner_team": "@googleapis/cloud-sdk-python-team @googleapis/pubsub-team",
14+
"codeowner_team": "@googleapis/api-pubsub",
1515
"api_shortname": "pubsub",
1616
"library_type": "GAPIC_COMBO",
1717
"api_description": "is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a topic and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications."

google/pubsub_v1/services/publisher/async_client.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747

4848
from google.iam.v1 import iam_policy_pb2 # type: ignore
4949
from google.iam.v1 import policy_pb2 # type: ignore
50-
from google.protobuf import duration_pb2 # type: ignore
51-
from google.protobuf import field_mask_pb2 # type: ignore
5250
from google.pubsub_v1.services.publisher import pagers
5351
from google.pubsub_v1.types import pubsub
5452
from google.pubsub_v1.types import TimeoutType
53+
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
54+
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
5555
from .transports.base import PublisherTransport, DEFAULT_CLIENT_INFO
5656
from .transports.grpc_asyncio import PublisherGrpcAsyncIOTransport
5757
from .client import PublisherClient
@@ -122,7 +122,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
122122
Returns:
123123
PublisherAsyncClient: The constructed client.
124124
"""
125-
return PublisherClient.from_service_account_info.__func__(PublisherAsyncClient, info, *args, **kwargs) # type: ignore
125+
sa_info_func = (
126+
PublisherClient.from_service_account_info.__func__ # type: ignore
127+
)
128+
return sa_info_func(PublisherAsyncClient, info, *args, **kwargs)
126129

127130
@classmethod
128131
def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -138,7 +141,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
138141
Returns:
139142
PublisherAsyncClient: The constructed client.
140143
"""
141-
return PublisherClient.from_service_account_file.__func__(PublisherAsyncClient, filename, *args, **kwargs) # type: ignore
144+
sa_file_func = (
145+
PublisherClient.from_service_account_file.__func__ # type: ignore
146+
)
147+
return sa_file_func(PublisherAsyncClient, filename, *args, **kwargs)
142148

143149
from_service_account_json = from_service_account_file
144150

google/pubsub_v1/services/publisher/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565

6666
from google.iam.v1 import iam_policy_pb2 # type: ignore
6767
from google.iam.v1 import policy_pb2 # type: ignore
68-
from google.protobuf import duration_pb2 # type: ignore
69-
from google.protobuf import field_mask_pb2 # type: ignore
7068
from google.pubsub_v1.services.publisher import pagers
7169
from google.pubsub_v1.types import pubsub
7270
from google.pubsub_v1.types import TimeoutType
71+
import google.protobuf.duration_pb2 as duration_pb2 # type: ignore
72+
import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore
7373

7474
import grpc
7575
from .transports.base import PublisherTransport, DEFAULT_CLIENT_INFO

google/pubsub_v1/services/publisher/transports/base.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
from google.iam.v1 import iam_policy_pb2 # type: ignore
3131
from google.iam.v1 import policy_pb2 # type: ignore
32-
from google.protobuf import empty_pb2 # type: ignore
3332
from google.pubsub_v1.types import pubsub
33+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
3434

3535
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
3636
client_library_version=package_version.__version__
@@ -89,8 +89,6 @@ def __init__(
8989
be used for service account credentials.
9090
"""
9191

92-
scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
93-
9492
# Save the scopes.
9593
self._scopes = scopes
9694
if not hasattr(self, "_ignore_credentials"):
@@ -105,11 +103,16 @@ def __init__(
105103

106104
if credentials_file is not None:
107105
credentials, _ = google.auth.load_credentials_from_file(
108-
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
106+
credentials_file,
107+
scopes=scopes,
108+
quota_project_id=quota_project_id,
109+
default_scopes=self.AUTH_SCOPES,
109110
)
110111
elif credentials is None and not self._ignore_credentials:
111112
credentials, _ = google.auth.default(
112-
**scopes_kwargs, quota_project_id=quota_project_id
113+
scopes=scopes,
114+
quota_project_id=quota_project_id,
115+
default_scopes=self.AUTH_SCOPES,
113116
)
114117
# Don't apply audience if the credentials file passed from user.
115118
if hasattr(credentials, "with_gdch_audience"):

google/pubsub_v1/services/publisher/transports/grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232

3333
from google.iam.v1 import iam_policy_pb2 # type: ignore
3434
from google.iam.v1 import policy_pb2 # type: ignore
35-
from google.protobuf import empty_pb2 # type: ignore
3635
from google.pubsub_v1.types import pubsub
36+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
3737
from .base import PublisherTransport, DEFAULT_CLIENT_INFO
3838

3939
try:

google/pubsub_v1/services/publisher/transports/grpc_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
from google.iam.v1 import iam_policy_pb2 # type: ignore
3737
from google.iam.v1 import policy_pb2 # type: ignore
38-
from google.protobuf import empty_pb2 # type: ignore
3938
from google.pubsub_v1.types import pubsub
39+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
4040
from .base import PublisherTransport, DEFAULT_CLIENT_INFO
4141
from .grpc import PublisherGrpcTransport
4242

google/pubsub_v1/services/publisher/transports/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
import warnings
3636

3737

38-
from google.protobuf import empty_pb2 # type: ignore
3938
from google.pubsub_v1.types import pubsub
39+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
4040

4141

4242
from .rest_base import _BasePublisherRestTransport
@@ -918,7 +918,7 @@ def __call__(
918918
)
919919
method = transcoded_request["method"]
920920
try:
921-
request_payload = json_format.MessageToJson(request)
921+
request_payload = type(request).to_json(request)
922922
except:
923923
request_payload = None
924924
http_request = {

google/pubsub_v1/services/publisher/transports/rest_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
2727

2828

29-
from google.protobuf import empty_pb2 # type: ignore
3029
from google.pubsub_v1.types import pubsub
30+
import google.protobuf.empty_pb2 as empty_pb2 # type: ignore
3131

3232

3333
class _BasePublisherRestTransport(PublisherTransport):

google/pubsub_v1/services/schema_service/async_client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747

4848
from google.iam.v1 import iam_policy_pb2 # type: ignore
4949
from google.iam.v1 import policy_pb2 # type: ignore
50-
from google.protobuf import timestamp_pb2 # type: ignore
5150
from google.pubsub_v1.services.schema_service import pagers
5251
from google.pubsub_v1.types import schema
5352
from google.pubsub_v1.types import schema as gp_schema
53+
import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore
5454
from .transports.base import SchemaServiceTransport, DEFAULT_CLIENT_INFO
5555
from .transports.grpc_asyncio import SchemaServiceGrpcAsyncIOTransport
5656
from .client import SchemaServiceClient
@@ -117,7 +117,10 @@ def from_service_account_info(cls, info: dict, *args, **kwargs):
117117
Returns:
118118
SchemaServiceAsyncClient: The constructed client.
119119
"""
120-
return SchemaServiceClient.from_service_account_info.__func__(SchemaServiceAsyncClient, info, *args, **kwargs) # type: ignore
120+
sa_info_func = (
121+
SchemaServiceClient.from_service_account_info.__func__ # type: ignore
122+
)
123+
return sa_info_func(SchemaServiceAsyncClient, info, *args, **kwargs)
121124

122125
@classmethod
123126
def from_service_account_file(cls, filename: str, *args, **kwargs):
@@ -133,7 +136,10 @@ def from_service_account_file(cls, filename: str, *args, **kwargs):
133136
Returns:
134137
SchemaServiceAsyncClient: The constructed client.
135138
"""
136-
return SchemaServiceClient.from_service_account_file.__func__(SchemaServiceAsyncClient, filename, *args, **kwargs) # type: ignore
139+
sa_file_func = (
140+
SchemaServiceClient.from_service_account_file.__func__ # type: ignore
141+
)
142+
return sa_file_func(SchemaServiceAsyncClient, filename, *args, **kwargs)
137143

138144
from_service_account_json = from_service_account_file
139145

0 commit comments

Comments
 (0)