Skip to content

Commit

Permalink
chore: [Many APIs] Update gapic-generator-python to v1.19.1 (#13155)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 684571179

Source-Link:
googleapis/googleapis@fbdc238

Source-Link:
googleapis/googleapis-gen@3a2cdcf
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxhbmd1YWdlLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWxpZmUtc2NpZW5jZXMvLk93bEJvdC55YW1sIiwiaCI6IjNhMmNkY2ZiODBjMmQwZjVlYzBjYzY2M2MyYmFiMGE5NDg2MjI5ZDAifQ==
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWQtaWRlbnRpdGllcy8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRrYWZrYS8uT3dsQm90LnlhbWwiLCJoIjoiM2EyY2RjZmI4MGMyZDBmNWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lZGlhLXRyYW5zbGF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIyOWQwIn0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lbWNhY2hlLy5Pd2xCb3QueWFtbCIsImgiOiIzYTJjZGNmYjgwYzJkMGY1ZWMwY2M2NjNjMmJhYjBhOTQ4NjIy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NWVjMGNjNjYzYzJiYWIwYTk0ODYyMjlkMCJ9

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Oct 13, 2024
1 parent a34064a commit 6e83b29
Show file tree
Hide file tree
Showing 289 changed files with 167,605 additions and 128,118 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

transport inheritance structure
_______________________________

`LanguageServiceTransport` is the ABC for all transports.
- public child `LanguageServiceGrpcTransport` for sync gRPC transport (defined in `grpc.py`).
- public child `LanguageServiceGrpcAsyncIOTransport` for async gRPC transport (defined in `grpc_asyncio.py`).
- private child `_BaseLanguageServiceRestTransport` for base REST transport with inner classes `_BaseMETHOD` (defined in `rest_base.py`).
- public child `LanguageServiceRestTransport` for sync REST transport with inner classes `METHOD` derived from the parent's corresponding `_BaseMETHOD` classes (defined in `rest.py`).
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import inspect
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
import warnings

Expand Down Expand Up @@ -227,6 +228,9 @@ def __init__(
)

# Wrap messages. This must be done after self._grpc_channel exists
self._wrap_with_kind = (
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
)
self._prep_wrapped_messages(client_info)

@property
Expand Down Expand Up @@ -456,7 +460,7 @@ def annotate_text(
def _prep_wrapped_messages(self, client_info):
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
self._wrapped_methods = {
self.analyze_sentiment: gapic_v1.method_async.wrap_method(
self.analyze_sentiment: self._wrap_method(
self.analyze_sentiment,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -471,7 +475,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=600.0,
client_info=client_info,
),
self.analyze_entities: gapic_v1.method_async.wrap_method(
self.analyze_entities: self._wrap_method(
self.analyze_entities,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -486,7 +490,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=600.0,
client_info=client_info,
),
self.analyze_entity_sentiment: gapic_v1.method_async.wrap_method(
self.analyze_entity_sentiment: self._wrap_method(
self.analyze_entity_sentiment,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -501,7 +505,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=600.0,
client_info=client_info,
),
self.analyze_syntax: gapic_v1.method_async.wrap_method(
self.analyze_syntax: self._wrap_method(
self.analyze_syntax,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -516,7 +520,7 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=600.0,
client_info=client_info,
),
self.classify_text: gapic_v1.method_async.wrap_method(
self.classify_text: self._wrap_method(
self.classify_text,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -531,12 +535,12 @@ def _prep_wrapped_messages(self, client_info):
default_timeout=600.0,
client_info=client_info,
),
self.moderate_text: gapic_v1.method_async.wrap_method(
self.moderate_text: self._wrap_method(
self.moderate_text,
default_timeout=None,
client_info=client_info,
),
self.annotate_text: gapic_v1.method_async.wrap_method(
self.annotate_text: self._wrap_method(
self.annotate_text,
default_retry=retries.AsyncRetry(
initial=0.1,
Expand All @@ -553,8 +557,17 @@ def _prep_wrapped_messages(self, client_info):
),
}

def _wrap_method(self, func, *args, **kwargs):
if self._wrap_with_kind: # pragma: NO COVER
kwargs["kind"] = self.kind
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)

def close(self):
return self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc_asyncio"


__all__ = ("LanguageServiceGrpcAsyncIOTransport",)
Loading

0 comments on commit 6e83b29

Please sign in to comment.