From b685f70b8056cc1a3c4d8a0947b86640c5b086c6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 10:26:06 -0500 Subject: [PATCH] fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: https://github.com/googleapis/googleapis/commit/fea43879f83a8d0dacc9353b3f75f8f46d37162f Source-Link: https://github.com/googleapis/googleapis-gen/commit/387b7344c7529ee44be84e613b19a820508c612b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gapic_version.py * add gapic_version.py Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- packages/google-cloud-memcache/.coveragerc | 5 -- .../google/cloud/memcache_v1/gapic_version.py | 16 +++++ .../services/cloud_memcache/async_client.py | 54 ++++++++--------- .../services/cloud_memcache/client.py | 42 ++++++-------- .../cloud_memcache/transports/base.py | 13 ++--- .../cloud/memcache_v1beta2/gapic_version.py | 16 +++++ .../services/cloud_memcache/async_client.py | 58 +++++++++---------- .../services/cloud_memcache/client.py | 44 +++++++------- .../cloud_memcache/transports/base.py | 13 ++--- .../release-please-config.json | 2 + ...d_cloud_memcache_apply_parameters_async.py | 2 +- ...ed_cloud_memcache_create_instance_async.py | 2 +- ...ed_cloud_memcache_delete_instance_async.py | 2 +- ...d_memcache_reschedule_maintenance_async.py | 2 +- ...ed_cloud_memcache_update_instance_async.py | 2 +- ..._cloud_memcache_update_parameters_async.py | 2 +- ...d_cloud_memcache_apply_parameters_async.py | 2 +- ...ud_memcache_apply_software_update_async.py | 2 +- ...ed_cloud_memcache_create_instance_async.py | 2 +- ...ed_cloud_memcache_delete_instance_async.py | 2 +- ...d_memcache_reschedule_maintenance_async.py | 2 +- ...ed_cloud_memcache_update_instance_async.py | 2 +- ..._cloud_memcache_update_parameters_async.py | 2 +- packages/google-cloud-memcache/setup.py | 2 +- .../testing/constraints-3.7.txt | 2 +- 25 files changed, 148 insertions(+), 145 deletions(-) create mode 100644 packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py create mode 100644 packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py diff --git a/packages/google-cloud-memcache/.coveragerc b/packages/google-cloud-memcache/.coveragerc index 028e2ca603ec..c090f54ef42e 100644 --- a/packages/google-cloud-memcache/.coveragerc +++ b/packages/google-cloud-memcache/.coveragerc @@ -10,8 +10,3 @@ exclude_lines = pragma: NO COVER # Ignore debug-only repr def __repr__ - # Ignore pkg_resources exceptions. - # This is added at the module level as a safeguard for if someone - # generates the code and tries to run it without pip installing. This - # makes it virtually impossible to test properly. - except pkg_resources.DistributionNotFound diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py new file mode 100644 index 000000000000..25e4dd61006b --- /dev/null +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "1.4.4" # {x-release-please-version} diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py index 6dbb0c9a7880..819dc9ab1c18 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/async_client.py @@ -34,7 +34,8 @@ from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.memcache_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -246,7 +247,7 @@ async def list_instances( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesAsyncPager: r"""Lists Instances in a given location. @@ -363,7 +364,7 @@ async def get_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_memcache.Instance: r"""Gets details of a single Instance. @@ -467,7 +468,7 @@ async def create_instance( instance: Optional[cloud_memcache.Instance] = None, instance_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Instance in a given location. @@ -505,7 +506,7 @@ async def sample_create_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -621,7 +622,7 @@ async def update_instance( instance: Optional[cloud_memcache.Instance] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates an existing Instance in a given project and @@ -658,7 +659,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -759,7 +760,7 @@ async def update_parameters( update_mask: Optional[field_mask_pb2.FieldMask] = None, parameters: Optional[cloud_memcache.MemcacheParameters] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the defined Memcached parameters for an existing @@ -792,7 +793,7 @@ async def sample_update_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -896,7 +897,7 @@ async def delete_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes a single Instance. @@ -926,7 +927,7 @@ async def sample_delete_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1024,7 +1025,7 @@ async def apply_parameters( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""``ApplyParameters`` restarts the set of specified nodes in order @@ -1056,7 +1057,7 @@ async def sample_apply_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1170,7 +1171,7 @@ async def reschedule_maintenance( ] = None, schedule_time: Optional[timestamp_pb2.Timestamp] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Reschedules upcoming maintenance event. @@ -1201,7 +1202,7 @@ async def sample_reschedule_maintenance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1308,7 +1309,7 @@ async def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1362,7 +1363,7 @@ async def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1416,7 +1417,7 @@ async def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1471,7 +1472,7 @@ async def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1525,7 +1526,7 @@ async def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1579,7 +1580,7 @@ async def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -1635,14 +1636,9 @@ async def __aexit__(self, exc_type, exc, tb): await self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("CloudMemcacheAsyncClient",) diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/client.py index b27b5a5d69c5..d00e4f27ff76 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/client.py @@ -38,7 +38,8 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.memcache_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -471,7 +472,7 @@ def list_instances( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists Instances in a given location. @@ -588,7 +589,7 @@ def get_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_memcache.Instance: r"""Gets details of a single Instance. @@ -692,7 +693,7 @@ def create_instance( instance: Optional[cloud_memcache.Instance] = None, instance_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Instance in a given location. @@ -846,7 +847,7 @@ def update_instance( instance: Optional[cloud_memcache.Instance] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates an existing Instance in a given project and @@ -984,7 +985,7 @@ def update_parameters( update_mask: Optional[field_mask_pb2.FieldMask] = None, parameters: Optional[cloud_memcache.MemcacheParameters] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates the defined Memcached parameters for an existing @@ -1121,7 +1122,7 @@ def delete_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes a single Instance. @@ -1249,7 +1250,7 @@ def apply_parameters( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""``ApplyParameters`` restarts the set of specified nodes in order @@ -1395,7 +1396,7 @@ def reschedule_maintenance( ] = None, schedule_time: Optional[timestamp_pb2.Timestamp] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Reschedules upcoming maintenance event. @@ -1546,7 +1547,7 @@ def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1600,7 +1601,7 @@ def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1654,7 +1655,7 @@ def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1709,7 +1710,7 @@ def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1763,7 +1764,7 @@ def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1817,7 +1818,7 @@ def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -1867,14 +1868,9 @@ def list_locations( return response -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("CloudMemcacheClient",) diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/base.py b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/base.py index 154e04ca7753..3f787c2996f8 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/base.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1/services/cloud_memcache/transports/base.py @@ -25,18 +25,13 @@ from google.cloud.location import locations_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.memcache_v1 import gapic_version as package_version from google.cloud.memcache_v1.types import cloud_memcache -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) class CloudMemcacheTransport(abc.ABC): diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py new file mode 100644 index 000000000000..25e4dd61006b --- /dev/null +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "1.4.4" # {x-release-please-version} diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py index 0f31f71e3e9d..f3f032fcff93 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/async_client.py @@ -34,7 +34,8 @@ from google.api_core.client_options import ClientOptions from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.memcache_v1beta2 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -246,7 +247,7 @@ async def list_instances( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesAsyncPager: r"""Lists Instances in a given location. @@ -363,7 +364,7 @@ async def get_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_memcache.Instance: r"""Gets details of a single Instance. @@ -467,7 +468,7 @@ async def create_instance( instance_id: Optional[str] = None, resource: Optional[cloud_memcache.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a new Instance in a given location. @@ -505,7 +506,7 @@ async def sample_create_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -621,7 +622,7 @@ async def update_instance( update_mask: Optional[field_mask_pb2.FieldMask] = None, resource: Optional[cloud_memcache.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates an existing Instance in a given project and @@ -658,7 +659,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -759,7 +760,7 @@ async def update_parameters( update_mask: Optional[field_mask_pb2.FieldMask] = None, parameters: Optional[cloud_memcache.MemcacheParameters] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the defined Memcached parameters for an existing @@ -792,7 +793,7 @@ async def sample_update_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -896,7 +897,7 @@ async def delete_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes a single Instance. @@ -926,7 +927,7 @@ async def sample_delete_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1024,7 +1025,7 @@ async def apply_parameters( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""``ApplyParameters`` restarts the set of specified nodes in order @@ -1056,7 +1057,7 @@ async def sample_apply_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1168,7 +1169,7 @@ async def apply_software_update( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates software on the selected nodes of the @@ -1199,7 +1200,7 @@ async def sample_apply_software_update(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1316,7 +1317,7 @@ async def reschedule_maintenance( ] = None, schedule_time: Optional[timestamp_pb2.Timestamp] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Performs the apply phase of the RescheduleMaintenance @@ -1348,7 +1349,7 @@ async def sample_reschedule_maintenance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -1455,7 +1456,7 @@ async def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1509,7 +1510,7 @@ async def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1563,7 +1564,7 @@ async def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1618,7 +1619,7 @@ async def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1672,7 +1673,7 @@ async def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1726,7 +1727,7 @@ async def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -1782,14 +1783,9 @@ async def __aexit__(self, exc_type, exc, tb): await self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("CloudMemcacheAsyncClient",) diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/client.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/client.py index 936ea9a93274..4bea8cee50e4 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/client.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/client.py @@ -38,7 +38,8 @@ from google.auth.transport import mtls # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources + +from google.cloud.memcache_v1beta2 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -471,7 +472,7 @@ def list_instances( *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists Instances in a given location. @@ -588,7 +589,7 @@ def get_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_memcache.Instance: r"""Gets details of a single Instance. @@ -692,7 +693,7 @@ def create_instance( instance_id: Optional[str] = None, resource: Optional[cloud_memcache.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a new Instance in a given location. @@ -846,7 +847,7 @@ def update_instance( update_mask: Optional[field_mask_pb2.FieldMask] = None, resource: Optional[cloud_memcache.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates an existing Instance in a given project and @@ -984,7 +985,7 @@ def update_parameters( update_mask: Optional[field_mask_pb2.FieldMask] = None, parameters: Optional[cloud_memcache.MemcacheParameters] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates the defined Memcached parameters for an existing @@ -1121,7 +1122,7 @@ def delete_instance( *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes a single Instance. @@ -1249,7 +1250,7 @@ def apply_parameters( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""``ApplyParameters`` restarts the set of specified nodes in order @@ -1393,7 +1394,7 @@ def apply_software_update( node_ids: Optional[MutableSequence[str]] = None, apply_all: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates software on the selected nodes of the @@ -1541,7 +1542,7 @@ def reschedule_maintenance( ] = None, schedule_time: Optional[timestamp_pb2.Timestamp] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Performs the apply phase of the RescheduleMaintenance @@ -1693,7 +1694,7 @@ def list_operations( request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -1747,7 +1748,7 @@ def get_operation( request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -1801,7 +1802,7 @@ def delete_operation( request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -1856,7 +1857,7 @@ def cancel_operation( request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -1910,7 +1911,7 @@ def get_location( request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -1964,7 +1965,7 @@ def list_locations( request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. @@ -2014,14 +2015,9 @@ def list_locations( return response -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) __all__ = ("CloudMemcacheClient",) diff --git a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/base.py b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/base.py index 67a6078df5b1..828089fa47fa 100644 --- a/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/base.py +++ b/packages/google-cloud-memcache/google/cloud/memcache_v1beta2/services/cloud_memcache/transports/base.py @@ -25,18 +25,13 @@ from google.cloud.location import locations_pb2 # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.memcache_v1beta2 import gapic_version as package_version from google.cloud.memcache_v1beta2.types import cloud_memcache -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-memcache", - ).version, - ) -except pkg_resources.DistributionNotFound: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) class CloudMemcacheTransport(abc.ABC): diff --git a/packages/google-cloud-memcache/release-please-config.json b/packages/google-cloud-memcache/release-please-config.json index 1c8d7b998014..e7faaa4c8c34 100644 --- a/packages/google-cloud-memcache/release-please-config.json +++ b/packages/google-cloud-memcache/release-please-config.json @@ -4,6 +4,8 @@ ".": { "release-type": "python", "extra-files": [ + "google/cloud/memcache_v1beta2/gapic_version.py", + "google/cloud/memcache_v1/gapic_version.py", "google/cloud/memcache/gapic_version.py", { "type": "json", diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py index 0bfffadee59b..4d7ed2e41699 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_apply_parameters_async.py @@ -48,7 +48,7 @@ async def sample_apply_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py index 58b8f087c667..3e8e97d19885 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_create_instance_async.py @@ -56,7 +56,7 @@ async def sample_create_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py index b6a4f6c8e57d..c74323e94c40 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_delete_instance_async.py @@ -48,7 +48,7 @@ async def sample_delete_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py index 1ebd88fe01fb..11b87445d214 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_reschedule_maintenance_async.py @@ -49,7 +49,7 @@ async def sample_reschedule_maintenance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py index 7db284cb664e..257fc1590b61 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_instance_async.py @@ -54,7 +54,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py index 231298f3c93d..94949ec578ef 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1_generated_cloud_memcache_update_parameters_async.py @@ -48,7 +48,7 @@ async def sample_update_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py index 3504b1bdd493..e2f69e79b1fd 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_parameters_async.py @@ -48,7 +48,7 @@ async def sample_apply_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py index 0dc515a80003..23486a72575f 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_apply_software_update_async.py @@ -48,7 +48,7 @@ async def sample_apply_software_update(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py index ca5e8dea8832..bba1842947f7 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_create_instance_async.py @@ -56,7 +56,7 @@ async def sample_create_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py index 3ee0113e7d3e..90e9057deac4 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_delete_instance_async.py @@ -48,7 +48,7 @@ async def sample_delete_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py index 867988e09363..c700a673409d 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_reschedule_maintenance_async.py @@ -49,7 +49,7 @@ async def sample_reschedule_maintenance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py index 80ce316e6d2f..f401e3a510a5 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_instance_async.py @@ -54,7 +54,7 @@ async def sample_update_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py index 3e502514e5d8..4606935186b9 100644 --- a/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py +++ b/packages/google-cloud-memcache/samples/generated_samples/memcache_v1beta2_generated_cloud_memcache_update_parameters_async.py @@ -48,7 +48,7 @@ async def sample_update_parameters(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/packages/google-cloud-memcache/setup.py b/packages/google-cloud-memcache/setup.py index cad6f1cc897e..a59489410eb3 100644 --- a/packages/google-cloud-memcache/setup.py +++ b/packages/google-cloud-memcache/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/packages/google-cloud-memcache/testing/constraints-3.7.txt b/packages/google-cloud-memcache/testing/constraints-3.7.txt index 6f3158cc2034..6c44adfea7ee 100644 --- a/packages/google-cloud-memcache/testing/constraints-3.7.txt +++ b/packages/google-cloud-memcache/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5