From a086ce0d68a2790bb46390fe5d2c7d9b2db235c0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:58:41 -0500 Subject: [PATCH] fix(deps): Require google-api-core >=1.34.0, >=2.11.0 (#212) 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 Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .coveragerc | 5 ---- .../cloud/appengine_admin_v1/gapic_version.py | 16 ++++++++++ .../services/applications/async_client.py | 28 ++++++++--------- .../services/applications/client.py | 22 ++++++-------- .../services/applications/transports/base.py | 13 +++----- .../authorized_certificates/async_client.py | 24 +++++++-------- .../authorized_certificates/client.py | 24 +++++++-------- .../transports/base.py | 13 +++----- .../authorized_domains/async_client.py | 16 ++++------ .../services/authorized_domains/client.py | 16 ++++------ .../authorized_domains/transports/base.py | 13 +++----- .../services/domain_mappings/async_client.py | 30 ++++++++----------- .../services/domain_mappings/client.py | 24 +++++++-------- .../domain_mappings/transports/base.py | 13 +++----- .../services/firewall/async_client.py | 26 +++++++--------- .../services/firewall/client.py | 26 +++++++--------- .../services/firewall/transports/base.py | 13 +++----- .../services/instances/async_client.py | 26 +++++++--------- .../services/instances/client.py | 22 ++++++-------- .../services/instances/transports/base.py | 13 +++----- .../services/services/async_client.py | 26 +++++++--------- .../services/services/client.py | 22 ++++++-------- .../services/services/transports/base.py | 13 +++----- .../services/versions/async_client.py | 30 ++++++++----------- .../services/versions/client.py | 24 +++++++-------- .../services/versions/transports/base.py | 13 +++----- release-please-config.json | 1 + ...d_applications_create_application_async.py | 2 +- ...d_applications_repair_application_async.py | 2 +- ...d_applications_update_application_async.py | 2 +- ...in_mappings_create_domain_mapping_async.py | 2 +- ...in_mappings_delete_domain_mapping_async.py | 2 +- ...in_mappings_update_domain_mapping_async.py | 2 +- ...enerated_instances_debug_instance_async.py | 2 +- ...nerated_instances_delete_instance_async.py | 2 +- ...generated_services_delete_service_async.py | 2 +- ...generated_services_update_service_async.py | 2 +- ...generated_versions_create_version_async.py | 2 +- ...generated_versions_delete_version_async.py | 2 +- ...generated_versions_update_version_async.py | 2 +- .../snippet_metadata_google.appengine.v1.json | 2 +- setup.py | 2 +- testing/constraints-3.7.txt | 2 +- 43 files changed, 226 insertions(+), 318 deletions(-) create mode 100644 google/cloud/appengine_admin_v1/gapic_version.py diff --git a/.coveragerc b/.coveragerc index 44c6382..c4d3671 100644 --- a/.coveragerc +++ b/.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/google/cloud/appengine_admin_v1/gapic_version.py b/google/cloud/appengine_admin_v1/gapic_version.py new file mode 100644 index 0000000..f033c61 --- /dev/null +++ b/google/cloud/appengine_admin_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.7.0" # {x-release-please-version} diff --git a/google/cloud/appengine_admin_v1/services/applications/async_client.py b/google/cloud/appengine_admin_v1/services/applications/async_client.py index 562386f..e094798 100644 --- a/google/cloud/appengine_admin_v1/services/applications/async_client.py +++ b/google/cloud/appengine_admin_v1/services/applications/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -217,7 +218,7 @@ async def get_application( *, 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]] = (), ) -> application.Application: r"""Gets information about an application. @@ -318,7 +319,7 @@ async def create_application( request: Optional[Union[appengine.CreateApplicationRequest, dict]] = 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 an App Engine application for a Google Cloud Platform @@ -357,7 +358,7 @@ async def sample_create_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -415,7 +416,7 @@ async def update_application( request: Optional[Union[appengine.UpdateApplicationRequest, dict]] = 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 specified Application resource. You can update the @@ -452,7 +453,7 @@ async def sample_update_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -516,7 +517,7 @@ async def repair_application( request: Optional[Union[appengine.RepairApplicationRequest, dict]] = 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"""Recreates the required App Engine features for the specified App @@ -555,7 +556,7 @@ async def sample_repair_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -621,14 +622,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-appengine-admin", - ).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__ = ("ApplicationsAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/applications/client.py b/google/cloud/appengine_admin_v1/services/applications/client.py index 52217f8..ac24ba5 100644 --- a/google/cloud/appengine_admin_v1/services/applications/client.py +++ b/google/cloud/appengine_admin_v1/services/applications/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -426,7 +427,7 @@ def get_application( *, 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]] = (), ) -> application.Application: r"""Gets information about an application. @@ -527,7 +528,7 @@ def create_application( request: Optional[Union[appengine.CreateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Creates an App Engine application for a Google Cloud Platform @@ -625,7 +626,7 @@ def update_application( request: Optional[Union[appengine.UpdateApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified Application resource. You can update the @@ -727,7 +728,7 @@ def repair_application( request: Optional[Union[appengine.RepairApplicationRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Recreates the required App Engine features for the specified App @@ -840,14 +841,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("ApplicationsClient",) diff --git a/google/cloud/appengine_admin_v1/services/applications/transports/base.py b/google/cloud/appengine_admin_v1/services/applications/transports/base.py index 51740ea..96e0ed7 100644 --- a/google/cloud/appengine_admin_v1/services/applications/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/applications/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, application -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 ApplicationsTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py b/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py index 6695956..c2a7dc2 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_certificates/async_client.py +++ b/google/cloud/appengine_admin_v1/services/authorized_certificates/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -226,7 +227,7 @@ async def list_authorized_certificates( ] = 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.ListAuthorizedCertificatesAsyncPager: r"""Lists all SSL certificates the user is authorized to @@ -321,7 +322,7 @@ async def get_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Gets the specified SSL certificate. @@ -405,7 +406,7 @@ async def create_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Uploads the specified SSL certificate. @@ -489,7 +490,7 @@ async def update_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Updates the specified SSL certificate. To renew a certificate @@ -578,7 +579,7 @@ async def delete_authorized_certificate( ] = 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 the specified SSL certificate. @@ -647,14 +648,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-appengine-admin", - ).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__ = ("AuthorizedCertificatesAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py b/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py index 815cfc6..a7d8cd9 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_certificates/client.py +++ b/google/cloud/appengine_admin_v1/services/authorized_certificates/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -430,7 +431,7 @@ def list_authorized_certificates( ] = 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.ListAuthorizedCertificatesPager: r"""Lists all SSL certificates the user is authorized to @@ -528,7 +529,7 @@ def get_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Gets the specified SSL certificate. @@ -615,7 +616,7 @@ def create_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Uploads the specified SSL certificate. @@ -702,7 +703,7 @@ def update_authorized_certificate( ] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> certificate.AuthorizedCertificate: r"""Updates the specified SSL certificate. To renew a certificate @@ -794,7 +795,7 @@ def delete_authorized_certificate( ] = 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 the specified SSL certificate. @@ -873,14 +874,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("AuthorizedCertificatesClient",) diff --git a/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py b/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py index b59421d..c2771e8 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/authorized_certificates/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore from google.protobuf import empty_pb2 # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, certificate -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 AuthorizedCertificatesTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py b/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py index c021a2e..565a7e7 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_domains/async_client.py +++ b/google/cloud/appengine_admin_v1/services/authorized_domains/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -219,7 +220,7 @@ async def list_authorized_domains( request: Optional[Union[appengine.ListAuthorizedDomainsRequest, dict]] = 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.ListAuthorizedDomainsAsyncPager: r"""Lists all domains the user is authorized to @@ -314,14 +315,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-appengine-admin", - ).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__ = ("AuthorizedDomainsAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/authorized_domains/client.py b/google/cloud/appengine_admin_v1/services/authorized_domains/client.py index 760bf73..d22ae87 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_domains/client.py +++ b/google/cloud/appengine_admin_v1/services/authorized_domains/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -426,7 +427,7 @@ def list_authorized_domains( request: Optional[Union[appengine.ListAuthorizedDomainsRequest, dict]] = 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.ListAuthorizedDomainsPager: r"""Lists all domains the user is authorized to @@ -529,14 +530,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("AuthorizedDomainsClient",) diff --git a/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py b/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py index f74f018..87e51d4 100644 --- a/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/authorized_domains/transports/base.py @@ -23,18 +23,13 @@ import google.auth # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 AuthorizedDomainsTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py b/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py index 319e8a8..75e8308 100644 --- a/google/cloud/appengine_admin_v1/services/domain_mappings/async_client.py +++ b/google/cloud/appengine_admin_v1/services/domain_mappings/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -221,7 +222,7 @@ async def list_domain_mappings( request: Optional[Union[appengine.ListDomainMappingsRequest, dict]] = 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.ListDomainMappingsAsyncPager: r"""Lists the domain mappings on an application. @@ -312,7 +313,7 @@ async def get_domain_mapping( request: Optional[Union[appengine.GetDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> domain_mapping.DomainMapping: r"""Gets the specified domain mapping. @@ -391,7 +392,7 @@ async def create_domain_mapping( request: Optional[Union[appengine.CreateDomainMappingRequest, dict]] = 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"""Maps a domain to an application. A user must be authorized to @@ -423,7 +424,7 @@ async def sample_create_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -488,7 +489,7 @@ async def update_domain_mapping( request: Optional[Union[appengine.UpdateDomainMappingRequest, dict]] = 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 specified domain mapping. To map an SSL certificate @@ -521,7 +522,7 @@ async def sample_update_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -586,7 +587,7 @@ async def delete_domain_mapping( request: Optional[Union[appengine.DeleteDomainMappingRequest, dict]] = 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 the specified domain mapping. A user must be authorized @@ -617,7 +618,7 @@ async def sample_delete_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -691,14 +692,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-appengine-admin", - ).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__ = ("DomainMappingsAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/domain_mappings/client.py b/google/cloud/appengine_admin_v1/services/domain_mappings/client.py index 127254a..f22ddaf 100644 --- a/google/cloud/appengine_admin_v1/services/domain_mappings/client.py +++ b/google/cloud/appengine_admin_v1/services/domain_mappings/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -428,7 +429,7 @@ def list_domain_mappings( request: Optional[Union[appengine.ListDomainMappingsRequest, dict]] = 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.ListDomainMappingsPager: r"""Lists the domain mappings on an application. @@ -520,7 +521,7 @@ def get_domain_mapping( request: Optional[Union[appengine.GetDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> domain_mapping.DomainMapping: r"""Gets the specified domain mapping. @@ -600,7 +601,7 @@ def create_domain_mapping( request: Optional[Union[appengine.CreateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Maps a domain to an application. A user must be authorized to @@ -698,7 +699,7 @@ def update_domain_mapping( request: Optional[Union[appengine.UpdateDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified domain mapping. To map an SSL certificate @@ -797,7 +798,7 @@ def delete_domain_mapping( request: Optional[Union[appengine.DeleteDomainMappingRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes the specified domain mapping. A user must be authorized @@ -910,14 +911,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("DomainMappingsClient",) diff --git a/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py b/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py index 9fc3f0c..af69105 100644 --- a/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/domain_mappings/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, domain_mapping -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 DomainMappingsTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/firewall/async_client.py b/google/cloud/appengine_admin_v1/services/firewall/async_client.py index 140c5c3..02d80a5 100644 --- a/google/cloud/appengine_admin_v1/services/firewall/async_client.py +++ b/google/cloud/appengine_admin_v1/services/firewall/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -219,7 +220,7 @@ async def list_ingress_rules( request: Optional[Union[appengine.ListIngressRulesRequest, dict]] = 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.ListIngressRulesAsyncPager: r"""Lists the firewall rules of an application. @@ -310,7 +311,7 @@ async def batch_update_ingress_rules( request: Optional[Union[appengine.BatchUpdateIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> appengine.BatchUpdateIngressRulesResponse: r"""Replaces the entire firewall ruleset in one bulk operation. This @@ -393,7 +394,7 @@ async def create_ingress_rule( request: Optional[Union[appengine.CreateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Creates a firewall rule for the application. @@ -474,7 +475,7 @@ async def get_ingress_rule( request: Optional[Union[appengine.GetIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Gets the specified firewall rule. @@ -555,7 +556,7 @@ async def update_ingress_rule( request: Optional[Union[appengine.UpdateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Updates the specified firewall rule. @@ -636,7 +637,7 @@ async def delete_ingress_rule( request: Optional[Union[appengine.DeleteIngressRuleRequest, dict]] = 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 the specified firewall rule. @@ -705,14 +706,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-appengine-admin", - ).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__ = ("FirewallAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/firewall/client.py b/google/cloud/appengine_admin_v1/services/firewall/client.py index 4b1f219..0293e45 100644 --- a/google/cloud/appengine_admin_v1/services/firewall/client.py +++ b/google/cloud/appengine_admin_v1/services/firewall/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -432,7 +433,7 @@ def list_ingress_rules( request: Optional[Union[appengine.ListIngressRulesRequest, dict]] = 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.ListIngressRulesPager: r"""Lists the firewall rules of an application. @@ -524,7 +525,7 @@ def batch_update_ingress_rules( request: Optional[Union[appengine.BatchUpdateIngressRulesRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> appengine.BatchUpdateIngressRulesResponse: r"""Replaces the entire firewall ruleset in one bulk operation. This @@ -610,7 +611,7 @@ def create_ingress_rule( request: Optional[Union[appengine.CreateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Creates a firewall rule for the application. @@ -692,7 +693,7 @@ def get_ingress_rule( request: Optional[Union[appengine.GetIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Gets the specified firewall rule. @@ -774,7 +775,7 @@ def update_ingress_rule( request: Optional[Union[appengine.UpdateIngressRuleRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> firewall.FirewallRule: r"""Updates the specified firewall rule. @@ -856,7 +857,7 @@ def delete_ingress_rule( request: Optional[Union[appengine.DeleteIngressRuleRequest, dict]] = 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 the specified firewall rule. @@ -933,14 +934,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("FirewallClient",) diff --git a/google/cloud/appengine_admin_v1/services/firewall/transports/base.py b/google/cloud/appengine_admin_v1/services/firewall/transports/base.py index 252df36..ee78145 100644 --- a/google/cloud/appengine_admin_v1/services/firewall/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/firewall/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore from google.protobuf import empty_pb2 # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, firewall -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 FirewallTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/instances/async_client.py b/google/cloud/appengine_admin_v1/services/instances/async_client.py index 1cafa52..ab4150f 100644 --- a/google/cloud/appengine_admin_v1/services/instances/async_client.py +++ b/google/cloud/appengine_admin_v1/services/instances/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -218,7 +219,7 @@ async def list_instances( request: Optional[Union[appengine.ListInstancesRequest, dict]] = 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 the instances of a version. @@ -313,7 +314,7 @@ async def get_instance( request: Optional[Union[appengine.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> instance.Instance: r"""Gets instance information. @@ -393,7 +394,7 @@ async def delete_instance( request: Optional[Union[appengine.DeleteInstanceRequest, dict]] = 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"""Stops a running instance. @@ -436,7 +437,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) @@ -508,7 +509,7 @@ async def debug_instance( request: Optional[Union[appengine.DebugInstanceRequest, dict]] = 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"""Enables debugging on a VM instance. This allows you @@ -546,7 +547,7 @@ async def sample_debug_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -612,14 +613,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-appengine-admin", - ).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__ = ("InstancesAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/instances/client.py b/google/cloud/appengine_admin_v1/services/instances/client.py index 6e61c63..5ae7a9e 100644 --- a/google/cloud/appengine_admin_v1/services/instances/client.py +++ b/google/cloud/appengine_admin_v1/services/instances/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -451,7 +452,7 @@ def list_instances( request: Optional[Union[appengine.ListInstancesRequest, dict]] = 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 the instances of a version. @@ -547,7 +548,7 @@ def get_instance( request: Optional[Union[appengine.GetInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> instance.Instance: r"""Gets instance information. @@ -628,7 +629,7 @@ def delete_instance( request: Optional[Union[appengine.DeleteInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Stops a running instance. @@ -744,7 +745,7 @@ def debug_instance( request: Optional[Union[appengine.DebugInstanceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Enables debugging on a VM instance. This allows you @@ -856,14 +857,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("InstancesClient",) diff --git a/google/cloud/appengine_admin_v1/services/instances/transports/base.py b/google/cloud/appengine_admin_v1/services/instances/transports/base.py index 31325b3..cbba79c 100644 --- a/google/cloud/appengine_admin_v1/services/instances/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/instances/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, instance -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 InstancesTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/services/async_client.py b/google/cloud/appengine_admin_v1/services/services/async_client.py index 242c602..e774ce3 100644 --- a/google/cloud/appengine_admin_v1/services/services/async_client.py +++ b/google/cloud/appengine_admin_v1/services/services/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -214,7 +215,7 @@ async def list_services( request: Optional[Union[appengine.ListServicesRequest, dict]] = 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.ListServicesAsyncPager: r"""Lists all the services in the application. @@ -305,7 +306,7 @@ async def get_service( request: Optional[Union[appengine.GetServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> service.Service: r"""Gets the current configuration of the specified @@ -395,7 +396,7 @@ async def update_service( request: Optional[Union[appengine.UpdateServiceRequest, dict]] = 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 configuration of the specified service. @@ -424,7 +425,7 @@ async def sample_update_service(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -495,7 +496,7 @@ async def delete_service( request: Optional[Union[appengine.DeleteServiceRequest, dict]] = 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 the specified service and all enclosed @@ -525,7 +526,7 @@ async def sample_delete_service(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -599,14 +600,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-appengine-admin", - ).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__ = ("ServicesAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/services/client.py b/google/cloud/appengine_admin_v1/services/services/client.py index b1beb5c..7a6d2c2 100644 --- a/google/cloud/appengine_admin_v1/services/services/client.py +++ b/google/cloud/appengine_admin_v1/services/services/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -427,7 +428,7 @@ def list_services( request: Optional[Union[appengine.ListServicesRequest, dict]] = 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.ListServicesPager: r"""Lists all the services in the application. @@ -519,7 +520,7 @@ def get_service( request: Optional[Union[appengine.GetServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> service.Service: r"""Gets the current configuration of the specified @@ -610,7 +611,7 @@ def update_service( request: Optional[Union[appengine.UpdateServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the configuration of the specified service. @@ -711,7 +712,7 @@ def delete_service( request: Optional[Union[appengine.DeleteServiceRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes the specified service and all enclosed @@ -823,14 +824,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("ServicesClient",) diff --git a/google/cloud/appengine_admin_v1/services/services/transports/base.py b/google/cloud/appengine_admin_v1/services/services/transports/base.py index f6eb783..797a86b 100644 --- a/google/cloud/appengine_admin_v1/services/services/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/services/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, service -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 ServicesTransport(abc.ABC): diff --git a/google/cloud/appengine_admin_v1/services/versions/async_client.py b/google/cloud/appengine_admin_v1/services/versions/async_client.py index 71f50d0..816c09d 100644 --- a/google/cloud/appengine_admin_v1/services/versions/async_client.py +++ b/google/cloud/appengine_admin_v1/services/versions/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -216,7 +217,7 @@ async def list_versions( request: Optional[Union[appengine.ListVersionsRequest, dict]] = 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.ListVersionsAsyncPager: r"""Lists the versions of a service. @@ -307,7 +308,7 @@ async def get_version( request: Optional[Union[appengine.GetVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> version.Version: r"""Gets the specified Version resource. By default, only a @@ -389,7 +390,7 @@ async def create_version( request: Optional[Union[appengine.CreateVersionRequest, dict]] = 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"""Deploys code and resource files to a new version. @@ -418,7 +419,7 @@ async def sample_create_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -482,7 +483,7 @@ async def update_version( request: Optional[Union[appengine.UpdateVersionRequest, dict]] = 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 specified Version resource. You can specify the @@ -546,7 +547,7 @@ async def sample_update_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -610,7 +611,7 @@ async def delete_version( request: Optional[Union[appengine.DeleteVersionRequest, dict]] = 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 an existing Version resource. @@ -639,7 +640,7 @@ async def sample_delete_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) @@ -713,14 +714,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-appengine-admin", - ).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__ = ("VersionsAsyncClient",) diff --git a/google/cloud/appengine_admin_v1/services/versions/client.py b/google/cloud/appengine_admin_v1/services/versions/client.py index 0425e51..3b2f0f3 100644 --- a/google/cloud/appengine_admin_v1/services/versions/client.py +++ b/google/cloud/appengine_admin_v1/services/versions/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.appengine_admin_v1 import gapic_version as package_version try: OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault] @@ -429,7 +430,7 @@ def list_versions( request: Optional[Union[appengine.ListVersionsRequest, dict]] = 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.ListVersionsPager: r"""Lists the versions of a service. @@ -521,7 +522,7 @@ def get_version( request: Optional[Union[appengine.GetVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> version.Version: r"""Gets the specified Version resource. By default, only a @@ -604,7 +605,7 @@ def create_version( request: Optional[Union[appengine.CreateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deploys code and resource files to a new version. @@ -698,7 +699,7 @@ def update_version( request: Optional[Union[appengine.UpdateVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Updates the specified Version resource. You can specify the @@ -827,7 +828,7 @@ def delete_version( request: Optional[Union[appengine.DeleteVersionRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> gac_operation.Operation: r"""Deletes an existing Version resource. @@ -938,14 +939,9 @@ def __exit__(self, type, value, traceback): self.transport.close() -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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__ = ("VersionsClient",) diff --git a/google/cloud/appengine_admin_v1/services/versions/transports/base.py b/google/cloud/appengine_admin_v1/services/versions/transports/base.py index 1addb34..4490b11 100644 --- a/google/cloud/appengine_admin_v1/services/versions/transports/base.py +++ b/google/cloud/appengine_admin_v1/services/versions/transports/base.py @@ -24,18 +24,13 @@ from google.auth import credentials as ga_credentials # type: ignore from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account # type: ignore -import pkg_resources +from google.cloud.appengine_admin_v1 import gapic_version as package_version from google.cloud.appengine_admin_v1.types import appengine, version -try: - DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( - gapic_version=pkg_resources.get_distribution( - "google-cloud-appengine-admin", - ).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 VersionsTransport(abc.ABC): diff --git a/release-please-config.json b/release-please-config.json index e1ecbdd..1b0eb82 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -5,6 +5,7 @@ "release-type": "python", "extra-files": [ "google/cloud/appengine_admin/gapic_version.py", + "google/cloud/appengine_admin_v1/gapic_version.py", { "type": "json", "path": "samples/generated_samples/snippet_metadata_google.appengine.v1.json", diff --git a/samples/generated_samples/appengine_v1_generated_applications_create_application_async.py b/samples/generated_samples/appengine_v1_generated_applications_create_application_async.py index da93f20..8eab013 100644 --- a/samples/generated_samples/appengine_v1_generated_applications_create_application_async.py +++ b/samples/generated_samples/appengine_v1_generated_applications_create_application_async.py @@ -47,7 +47,7 @@ async def sample_create_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_applications_repair_application_async.py b/samples/generated_samples/appengine_v1_generated_applications_repair_application_async.py index c849447..827974a 100644 --- a/samples/generated_samples/appengine_v1_generated_applications_repair_application_async.py +++ b/samples/generated_samples/appengine_v1_generated_applications_repair_application_async.py @@ -47,7 +47,7 @@ async def sample_repair_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_applications_update_application_async.py b/samples/generated_samples/appengine_v1_generated_applications_update_application_async.py index e5d3402..9b9e504 100644 --- a/samples/generated_samples/appengine_v1_generated_applications_update_application_async.py +++ b/samples/generated_samples/appengine_v1_generated_applications_update_application_async.py @@ -47,7 +47,7 @@ async def sample_update_application(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_domain_mappings_create_domain_mapping_async.py b/samples/generated_samples/appengine_v1_generated_domain_mappings_create_domain_mapping_async.py index b117722..51505e6 100644 --- a/samples/generated_samples/appengine_v1_generated_domain_mappings_create_domain_mapping_async.py +++ b/samples/generated_samples/appengine_v1_generated_domain_mappings_create_domain_mapping_async.py @@ -47,7 +47,7 @@ async def sample_create_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_domain_mappings_delete_domain_mapping_async.py b/samples/generated_samples/appengine_v1_generated_domain_mappings_delete_domain_mapping_async.py index 79ff3a1..1cf7ff2 100644 --- a/samples/generated_samples/appengine_v1_generated_domain_mappings_delete_domain_mapping_async.py +++ b/samples/generated_samples/appengine_v1_generated_domain_mappings_delete_domain_mapping_async.py @@ -47,7 +47,7 @@ async def sample_delete_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_domain_mappings_update_domain_mapping_async.py b/samples/generated_samples/appengine_v1_generated_domain_mappings_update_domain_mapping_async.py index fbc8087..3db55b5 100644 --- a/samples/generated_samples/appengine_v1_generated_domain_mappings_update_domain_mapping_async.py +++ b/samples/generated_samples/appengine_v1_generated_domain_mappings_update_domain_mapping_async.py @@ -47,7 +47,7 @@ async def sample_update_domain_mapping(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_instances_debug_instance_async.py b/samples/generated_samples/appengine_v1_generated_instances_debug_instance_async.py index 7834ab3..963c210 100644 --- a/samples/generated_samples/appengine_v1_generated_instances_debug_instance_async.py +++ b/samples/generated_samples/appengine_v1_generated_instances_debug_instance_async.py @@ -47,7 +47,7 @@ async def sample_debug_instance(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_instances_delete_instance_async.py b/samples/generated_samples/appengine_v1_generated_instances_delete_instance_async.py index a1d9063..965849c 100644 --- a/samples/generated_samples/appengine_v1_generated_instances_delete_instance_async.py +++ b/samples/generated_samples/appengine_v1_generated_instances_delete_instance_async.py @@ -47,7 +47,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/samples/generated_samples/appengine_v1_generated_services_delete_service_async.py b/samples/generated_samples/appengine_v1_generated_services_delete_service_async.py index 6b125aa..02b80fe 100644 --- a/samples/generated_samples/appengine_v1_generated_services_delete_service_async.py +++ b/samples/generated_samples/appengine_v1_generated_services_delete_service_async.py @@ -47,7 +47,7 @@ async def sample_delete_service(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_services_update_service_async.py b/samples/generated_samples/appengine_v1_generated_services_update_service_async.py index 3a1d440..99914ae 100644 --- a/samples/generated_samples/appengine_v1_generated_services_update_service_async.py +++ b/samples/generated_samples/appengine_v1_generated_services_update_service_async.py @@ -47,7 +47,7 @@ async def sample_update_service(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_versions_create_version_async.py b/samples/generated_samples/appengine_v1_generated_versions_create_version_async.py index 29ce9fe..9482b6c 100644 --- a/samples/generated_samples/appengine_v1_generated_versions_create_version_async.py +++ b/samples/generated_samples/appengine_v1_generated_versions_create_version_async.py @@ -47,7 +47,7 @@ async def sample_create_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_versions_delete_version_async.py b/samples/generated_samples/appengine_v1_generated_versions_delete_version_async.py index 2f5dff4..c69926e 100644 --- a/samples/generated_samples/appengine_v1_generated_versions_delete_version_async.py +++ b/samples/generated_samples/appengine_v1_generated_versions_delete_version_async.py @@ -47,7 +47,7 @@ async def sample_delete_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/appengine_v1_generated_versions_update_version_async.py b/samples/generated_samples/appengine_v1_generated_versions_update_version_async.py index 7c915fe..13b63b8 100644 --- a/samples/generated_samples/appengine_v1_generated_versions_update_version_async.py +++ b/samples/generated_samples/appengine_v1_generated_versions_update_version_async.py @@ -47,7 +47,7 @@ async def sample_update_version(): print("Waiting for operation to complete...") - response = await operation.result() + response = (await operation).result() # Handle the response print(response) diff --git a/samples/generated_samples/snippet_metadata_google.appengine.v1.json b/samples/generated_samples/snippet_metadata_google.appengine.v1.json index 5f88fd1..fb8cbf5 100644 --- a/samples/generated_samples/snippet_metadata_google.appengine.v1.json +++ b/samples/generated_samples/snippet_metadata_google.appengine.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-appengine-admin", - "version": "1.7.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/setup.py b/setup.py index 922a440..7306d96 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,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/testing/constraints-3.7.txt b/testing/constraints-3.7.txt index 6f3158c..6c44adf 100644 --- a/testing/constraints-3.7.txt +++ b/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