Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 3476c0f

Browse files
fix: remove client recv msg limit fix: add enums to types/__init__.py (#62)
PiperOrigin-RevId: 347055288 Source-Author: Google APIs <[email protected]> Source-Date: Fri Dec 11 12:44:37 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: dd372aa22ded7a8ba6f0e03a80e06358a3fa0907 Source-Link: googleapis/googleapis@dd372aa Co-authored-by: Bu Sun Kim <[email protected]>
1 parent 2fafb45 commit 3476c0f

File tree

11 files changed

+57
-9
lines changed

11 files changed

+57
-9
lines changed

google/cloud/language_v1/services/language_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = LanguageServiceGrpcTransport
2929
_transport_registry["grpc_asyncio"] = LanguageServiceGrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"LanguageServiceTransport",
3433
"LanguageServiceGrpcTransport",

google/cloud/language_v1/services/language_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def __init__(
147147
ssl_credentials=ssl_credentials,
148148
scopes=scopes or self.AUTH_SCOPES,
149149
quota_project_id=quota_project_id,
150+
options=[
151+
("grpc.max_send_message_length", -1),
152+
("grpc.max_receive_message_length", -1),
153+
],
150154
)
151155
self._ssl_channel_credentials = ssl_credentials
152156
else:
@@ -165,6 +169,10 @@ def __init__(
165169
ssl_credentials=ssl_channel_credentials,
166170
scopes=scopes or self.AUTH_SCOPES,
167171
quota_project_id=quota_project_id,
172+
options=[
173+
("grpc.max_send_message_length", -1),
174+
("grpc.max_receive_message_length", -1),
175+
],
168176
)
169177

170178
self._stubs = {} # type: Dict[str, Callable]
@@ -191,7 +199,7 @@ def create_channel(
191199
) -> grpc.Channel:
192200
"""Create and return a gRPC channel object.
193201
Args:
194-
address (Optionsl[str]): The host for the channel to use.
202+
address (Optional[str]): The host for the channel to use.
195203
credentials (Optional[~.Credentials]): The
196204
authorization credentials to attach to requests. These
197205
credentials identify this application to the service. If

google/cloud/language_v1/services/language_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def __init__(
192192
ssl_credentials=ssl_credentials,
193193
scopes=scopes or self.AUTH_SCOPES,
194194
quota_project_id=quota_project_id,
195+
options=[
196+
("grpc.max_send_message_length", -1),
197+
("grpc.max_receive_message_length", -1),
198+
],
195199
)
196200
self._ssl_channel_credentials = ssl_credentials
197201
else:
@@ -210,6 +214,10 @@ def __init__(
210214
ssl_credentials=ssl_channel_credentials,
211215
scopes=scopes or self.AUTH_SCOPES,
212216
quota_project_id=quota_project_id,
217+
options=[
218+
("grpc.max_send_message_length", -1),
219+
("grpc.max_receive_message_length", -1),
220+
],
213221
)
214222

215223
# Run the base constructor.

google/cloud/language_v1/types/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
ClassifyTextResponse,
3939
AnnotateTextRequest,
4040
AnnotateTextResponse,
41+
EncodingType,
4142
)
4243

43-
4444
__all__ = (
4545
"Document",
4646
"Sentence",
@@ -64,4 +64,5 @@
6464
"ClassifyTextResponse",
6565
"AnnotateTextRequest",
6666
"AnnotateTextResponse",
67+
"EncodingType",
6768
)

google/cloud/language_v1beta2/services/language_service/transports/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
_transport_registry["grpc"] = LanguageServiceGrpcTransport
2929
_transport_registry["grpc_asyncio"] = LanguageServiceGrpcAsyncIOTransport
3030

31-
3231
__all__ = (
3332
"LanguageServiceTransport",
3433
"LanguageServiceGrpcTransport",

google/cloud/language_v1beta2/services/language_service/transports/grpc.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ def __init__(
147147
ssl_credentials=ssl_credentials,
148148
scopes=scopes or self.AUTH_SCOPES,
149149
quota_project_id=quota_project_id,
150+
options=[
151+
("grpc.max_send_message_length", -1),
152+
("grpc.max_receive_message_length", -1),
153+
],
150154
)
151155
self._ssl_channel_credentials = ssl_credentials
152156
else:
@@ -165,6 +169,10 @@ def __init__(
165169
ssl_credentials=ssl_channel_credentials,
166170
scopes=scopes or self.AUTH_SCOPES,
167171
quota_project_id=quota_project_id,
172+
options=[
173+
("grpc.max_send_message_length", -1),
174+
("grpc.max_receive_message_length", -1),
175+
],
168176
)
169177

170178
self._stubs = {} # type: Dict[str, Callable]
@@ -191,7 +199,7 @@ def create_channel(
191199
) -> grpc.Channel:
192200
"""Create and return a gRPC channel object.
193201
Args:
194-
address (Optionsl[str]): The host for the channel to use.
202+
address (Optional[str]): The host for the channel to use.
195203
credentials (Optional[~.Credentials]): The
196204
authorization credentials to attach to requests. These
197205
credentials identify this application to the service. If

google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ def __init__(
192192
ssl_credentials=ssl_credentials,
193193
scopes=scopes or self.AUTH_SCOPES,
194194
quota_project_id=quota_project_id,
195+
options=[
196+
("grpc.max_send_message_length", -1),
197+
("grpc.max_receive_message_length", -1),
198+
],
195199
)
196200
self._ssl_channel_credentials = ssl_credentials
197201
else:
@@ -210,6 +214,10 @@ def __init__(
210214
ssl_credentials=ssl_channel_credentials,
211215
scopes=scopes or self.AUTH_SCOPES,
212216
quota_project_id=quota_project_id,
217+
options=[
218+
("grpc.max_send_message_length", -1),
219+
("grpc.max_receive_message_length", -1),
220+
],
213221
)
214222

215223
# Run the base constructor.

google/cloud/language_v1beta2/types/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
ClassifyTextResponse,
3939
AnnotateTextRequest,
4040
AnnotateTextResponse,
41+
EncodingType,
4142
)
4243

43-
4444
__all__ = (
4545
"Document",
4646
"Sentence",
@@ -64,4 +64,5 @@
6464
"ClassifyTextResponse",
6565
"AnnotateTextRequest",
6666
"AnnotateTextResponse",
67+
"EncodingType",
6768
)

synth.metadata

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/python-language.git",
7-
"sha": "8c9fdeb8dbf5376dc2ac813e4e9b14a8886ebd51"
7+
"sha": "8dde55cdd0e956c333039c0b74e49a06dd6ad33b"
88
}
99
},
1010
{
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "14adde91e90011702483e943edf1044549252bd9",
15-
"internalRef": "344906237"
14+
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
15+
"internalRef": "347055288"
1616
}
1717
},
1818
{

tests/unit/gapic/language_v1/test_language_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,6 +1736,10 @@ def test_language_service_transport_channel_mtls_with_client_cert_source(
17361736
),
17371737
ssl_credentials=mock_ssl_cred,
17381738
quota_project_id=None,
1739+
options=[
1740+
("grpc.max_send_message_length", -1),
1741+
("grpc.max_receive_message_length", -1),
1742+
],
17391743
)
17401744
assert transport.grpc_channel == mock_grpc_channel
17411745
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -1780,6 +1784,10 @@ def test_language_service_transport_channel_mtls_with_adc(transport_class):
17801784
),
17811785
ssl_credentials=mock_ssl_cred,
17821786
quota_project_id=None,
1787+
options=[
1788+
("grpc.max_send_message_length", -1),
1789+
("grpc.max_receive_message_length", -1),
1790+
],
17831791
)
17841792
assert transport.grpc_channel == mock_grpc_channel
17851793

tests/unit/gapic/language_v1beta2/test_language_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,10 @@ def test_language_service_transport_channel_mtls_with_client_cert_source(
17381738
),
17391739
ssl_credentials=mock_ssl_cred,
17401740
quota_project_id=None,
1741+
options=[
1742+
("grpc.max_send_message_length", -1),
1743+
("grpc.max_receive_message_length", -1),
1744+
],
17411745
)
17421746
assert transport.grpc_channel == mock_grpc_channel
17431747
assert transport._ssl_channel_credentials == mock_ssl_cred
@@ -1782,6 +1786,10 @@ def test_language_service_transport_channel_mtls_with_adc(transport_class):
17821786
),
17831787
ssl_credentials=mock_ssl_cred,
17841788
quota_project_id=None,
1789+
options=[
1790+
("grpc.max_send_message_length", -1),
1791+
("grpc.max_receive_message_length", -1),
1792+
],
17851793
)
17861794
assert transport.grpc_channel == mock_grpc_channel
17871795

0 commit comments

Comments
 (0)