diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index ba7b2f7..cb89b2e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:3728d8fd14daa46a96d04ce61c6451a3ac864dc48fb71eecbb4411f4a95618d4 + digest: sha256:ec49167c606648a063d1222220b48119c912562849a0528f35bfb592a9f72737 diff --git a/.kokoro/docs/common.cfg b/.kokoro/docs/common.cfg index a397f45..3c57ec8 100644 --- a/.kokoro/docs/common.cfg +++ b/.kokoro/docs/common.cfg @@ -30,6 +30,7 @@ env_vars: { env_vars: { key: "V2_STAGING_BUCKET" + # Push google cloud library docs to the Cloud RAD bucket `docs-staging-v2` value: "docs-staging-v2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2b2eb..a8591d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +### [0.4.1](https://www.github.com/googleapis/python-life-sciences/compare/v0.4.0...v0.4.1) (2021-11-01) + + +### Bug Fixes + +* **deps:** drop packaging dependency ([3364a46](https://www.github.com/googleapis/python-life-sciences/commit/3364a46234f2667908d6be5dbce125debc9be582)) +* **deps:** require google-api-core >= 1.28.0 ([3364a46](https://www.github.com/googleapis/python-life-sciences/commit/3364a46234f2667908d6be5dbce125debc9be582)) + + +### Documentation + +* list oneofs in docstring ([3364a46](https://www.github.com/googleapis/python-life-sciences/commit/3364a46234f2667908d6be5dbce125debc9be582)) + ## [0.4.0](https://www.github.com/googleapis/python-life-sciences/compare/v0.3.0...v0.4.0) (2021-10-18) diff --git a/docs/index.rst b/docs/index.rst index 2599b81..e54c5b0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,12 +11,13 @@ API Reference lifesciences_v2beta/services lifesciences_v2beta/types + Changelog --------- For a list of all ``google-cloud-life-sciences`` releases: .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - changelog + changelog diff --git a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py index d6b0e1c..c0e4189 100644 --- a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py +++ b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/async_client.py @@ -19,13 +19,15 @@ from typing import Dict, Sequence, Tuple, Type, Union import pkg_resources -import google.api_core.client_options as ClientOptions # type: ignore +from google.api_core.client_options import ClientOptions # type: ignore from google.api_core import exceptions as core_exceptions # type: ignore from google.api_core import gapic_v1 # type: ignore from google.api_core import retry as retries # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.oauth2 import service_account # type: ignore +OptionalRetry = Union[retries.Retry, object] + from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore from google.cloud.lifesciences_v2beta.types import workflows @@ -167,9 +169,9 @@ def __init__( async def run_pipeline( self, - request: workflows.RunPipelineRequest = None, + request: Union[workflows.RunPipelineRequest, dict] = None, *, - retry: retries.Retry = gapic_v1.method.DEFAULT, + retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: @@ -193,7 +195,7 @@ async def run_pipeline( - ``lifesciences.workflows.run`` Args: - request (:class:`google.cloud.lifesciences_v2beta.types.RunPipelineRequest`): + request (Union[google.cloud.lifesciences_v2beta.types.RunPipelineRequest, dict]): The request object. The arguments to the `RunPipeline` method. The requesting user must have the `iam.serviceAccounts.actAs` permission for the Cloud diff --git a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/client.py b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/client.py index f7271a5..90f8b03 100644 --- a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/client.py +++ b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/client.py @@ -30,6 +30,8 @@ from google.auth.exceptions import MutualTLSChannelError # type: ignore from google.oauth2 import service_account # type: ignore +OptionalRetry = Union[retries.Retry, object] + from google.api_core import operation # type: ignore from google.api_core import operation_async # type: ignore from google.cloud.lifesciences_v2beta.types import workflows @@ -340,7 +342,7 @@ def run_pipeline( self, request: Union[workflows.RunPipelineRequest, dict] = None, *, - retry: retries.Retry = gapic_v1.method.DEFAULT, + retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: float = None, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: diff --git a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/base.py b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/base.py index eb9fdd1..2278a90 100644 --- a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/base.py +++ b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/base.py @@ -15,7 +15,6 @@ # import abc from typing import Awaitable, Callable, Dict, Optional, Sequence, Union -import packaging.version import pkg_resources import google.auth # type: ignore @@ -39,15 +38,6 @@ except pkg_resources.DistributionNotFound: DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo() -try: - # google.auth.__version__ was added in 1.26.0 - _GOOGLE_AUTH_VERSION = google.auth.__version__ -except AttributeError: - try: # try pkg_resources if it is available - _GOOGLE_AUTH_VERSION = pkg_resources.get_distribution("google-auth").version - except pkg_resources.DistributionNotFound: # pragma: NO COVER - _GOOGLE_AUTH_VERSION = None - class WorkflowsServiceV2BetaTransport(abc.ABC): """Abstract transport class for WorkflowsServiceV2Beta.""" @@ -97,7 +87,7 @@ def __init__( host += ":443" self._host = host - scopes_kwargs = self._get_scopes_kwargs(self._host, scopes) + scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} # Save the scopes. self._scopes = scopes @@ -130,29 +120,6 @@ def __init__( # Save the credentials. self._credentials = credentials - # TODO(busunkim): This method is in the base transport - # to avoid duplicating code across the transport classes. These functions - # should be deleted once the minimum required versions of google-auth is increased. - - # TODO: Remove this function once google-auth >= 1.25.0 is required - @classmethod - def _get_scopes_kwargs( - cls, host: str, scopes: Optional[Sequence[str]] - ) -> Dict[str, Optional[Sequence[str]]]: - """Returns scopes kwargs to pass to google-auth methods depending on the google-auth version""" - - scopes_kwargs = {} - - if _GOOGLE_AUTH_VERSION and ( - packaging.version.parse(_GOOGLE_AUTH_VERSION) - >= packaging.version.parse("1.25.0") - ): - scopes_kwargs = {"scopes": scopes, "default_scopes": cls.AUTH_SCOPES} - else: - scopes_kwargs = {"scopes": scopes or cls.AUTH_SCOPES} - - return scopes_kwargs - def _prep_wrapped_messages(self, client_info): # Precompute the wrapped methods. self._wrapped_methods = { @@ -171,7 +138,7 @@ def close(self): raise NotImplementedError() @property - def operations_client(self) -> operations_v1.OperationsClient: + def operations_client(self): """Return the client designed to process long-running operations.""" raise NotImplementedError() diff --git a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc.py b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc.py index dac918d..030be13 100644 --- a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc.py +++ b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc.py @@ -113,7 +113,7 @@ def __init__( self._grpc_channel = None self._ssl_channel_credentials = ssl_channel_credentials self._stubs: Dict[str, Callable] = {} - self._operations_client = None + self._operations_client: Optional[operations_v1.OperationsClient] = None if api_mtls_endpoint: warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) diff --git a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc_asyncio.py b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc_asyncio.py index b6ea700..ec44797 100644 --- a/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc_asyncio.py +++ b/google/cloud/lifesciences_v2beta/services/workflows_service_v2_beta/transports/grpc_asyncio.py @@ -21,7 +21,6 @@ from google.api_core import operations_v1 # type: ignore from google.auth import credentials as ga_credentials # type: ignore from google.auth.transport.grpc import SslCredentials # type: ignore -import packaging.version import grpc # type: ignore from grpc.experimental import aio # type: ignore @@ -160,7 +159,7 @@ def __init__( self._grpc_channel = None self._ssl_channel_credentials = ssl_channel_credentials self._stubs: Dict[str, Callable] = {} - self._operations_client = None + self._operations_client: Optional[operations_v1.OperationsAsyncClient] = None if api_mtls_endpoint: warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) diff --git a/google/cloud/lifesciences_v2beta/types/workflows.py b/google/cloud/lifesciences_v2beta/types/workflows.py index 8022146..8c7b554 100644 --- a/google/cloud/lifesciences_v2beta/types/workflows.py +++ b/google/cloud/lifesciences_v2beta/types/workflows.py @@ -629,6 +629,13 @@ class Volume(proto.Message): Specify either [``Volume``][google.cloud.lifesciences.v2beta.Volume] or [``Disk``][google.cloud.lifesciences.v2beta.Disk], but not both. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: volume (str): A user-supplied name for the volume. Used when mounting the @@ -638,10 +645,13 @@ class Volume(proto.Message): characters and hyphens and cannot start with a hyphen. persistent_disk (google.cloud.lifesciences_v2beta.types.PersistentDisk): Configuration for a persistent disk. + This field is a member of `oneof`_ ``storage``. existing_disk (google.cloud.lifesciences_v2beta.types.ExistingDisk): Configuration for a existing disk. + This field is a member of `oneof`_ ``storage``. nfs_mount (google.cloud.lifesciences_v2beta.types.NFSMount): Configuration for an NFS mount. + This field is a member of `oneof`_ ``storage``. """ volume = proto.Field(proto.STRING, number=1,) @@ -762,6 +772,13 @@ class Event(proto.Message): r"""Carries information about events that occur during pipeline execution. + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: timestamp (google.protobuf.timestamp_pb2.Timestamp): The time at which the event occurred. @@ -773,33 +790,43 @@ class Event(proto.Message): delayed (google.cloud.lifesciences_v2beta.types.DelayedEvent): See [google.cloud.lifesciences.v2beta.DelayedEvent][google.cloud.lifesciences.v2beta.DelayedEvent]. + This field is a member of `oneof`_ ``details``. worker_assigned (google.cloud.lifesciences_v2beta.types.WorkerAssignedEvent): See [google.cloud.lifesciences.v2beta.WorkerAssignedEvent][google.cloud.lifesciences.v2beta.WorkerAssignedEvent]. + This field is a member of `oneof`_ ``details``. worker_released (google.cloud.lifesciences_v2beta.types.WorkerReleasedEvent): See [google.cloud.lifesciences.v2beta.WorkerReleasedEvent][google.cloud.lifesciences.v2beta.WorkerReleasedEvent]. + This field is a member of `oneof`_ ``details``. pull_started (google.cloud.lifesciences_v2beta.types.PullStartedEvent): See [google.cloud.lifesciences.v2beta.PullStartedEvent][google.cloud.lifesciences.v2beta.PullStartedEvent]. + This field is a member of `oneof`_ ``details``. pull_stopped (google.cloud.lifesciences_v2beta.types.PullStoppedEvent): See [google.cloud.lifesciences.v2beta.PullStoppedEvent][google.cloud.lifesciences.v2beta.PullStoppedEvent]. + This field is a member of `oneof`_ ``details``. container_started (google.cloud.lifesciences_v2beta.types.ContainerStartedEvent): See [google.cloud.lifesciences.v2beta.ContainerStartedEvent][google.cloud.lifesciences.v2beta.ContainerStartedEvent]. + This field is a member of `oneof`_ ``details``. container_stopped (google.cloud.lifesciences_v2beta.types.ContainerStoppedEvent): See [google.cloud.lifesciences.v2beta.ContainerStoppedEvent][google.cloud.lifesciences.v2beta.ContainerStoppedEvent]. + This field is a member of `oneof`_ ``details``. container_killed (google.cloud.lifesciences_v2beta.types.ContainerKilledEvent): See [google.cloud.lifesciences.v2beta.ContainerKilledEvent][google.cloud.lifesciences.v2beta.ContainerKilledEvent]. + This field is a member of `oneof`_ ``details``. unexpected_exit_status (google.cloud.lifesciences_v2beta.types.UnexpectedExitStatusEvent): See [google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent][google.cloud.lifesciences.v2beta.UnexpectedExitStatusEvent]. + This field is a member of `oneof`_ ``details``. failed (google.cloud.lifesciences_v2beta.types.FailedEvent): See [google.cloud.lifesciences.v2beta.FailedEvent][google.cloud.lifesciences.v2beta.FailedEvent]. + This field is a member of `oneof`_ ``details``. """ timestamp = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,) diff --git a/noxfile.py b/noxfile.py index 2bb4cf7..2a2001c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -101,7 +101,7 @@ def default(session): "py.test", "--quiet", f"--junitxml=unit_{session.python}_sponge_log.xml", - "--cov=google/cloud", + "--cov=google", "--cov=tests/unit", "--cov-append", "--cov-config=.coveragerc", diff --git a/setup.py b/setup.py index 5d127ca..cc35a67 100644 --- a/setup.py +++ b/setup.py @@ -22,16 +22,15 @@ name = "google-cloud-life-sciences" description = "Cloud Life Sciences client library" -version = "0.4.0" +version = "0.4.1" release_status = "Development Status :: 4 - Beta" url = "https://github.com/googleapis/python-life-sciences" dependencies = [ # NOTE: Maintainers, please do not require google-api-core>=2.x.x # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 - "google-api-core[grpc] >= 1.26.0, <3.0.0dev", + "google-api-core[grpc] >= 1.28.0, <3.0.0dev", "proto-plus >= 1.15.0", - "packaging >= 14.3", ] package_root = os.path.abspath(os.path.dirname(__file__)) diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index fe11de2..1e3ec8b 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -4,7 +4,5 @@ # 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.26.0 +google-api-core==1.28.0 proto-plus==1.15.0 -packaging==14.3 -google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 si transitively required through google-api-core \ No newline at end of file diff --git a/tests/unit/gapic/lifesciences_v2beta/test_workflows_service_v2_beta.py b/tests/unit/gapic/lifesciences_v2beta/test_workflows_service_v2_beta.py index 44d3376..2f52ad6 100644 --- a/tests/unit/gapic/lifesciences_v2beta/test_workflows_service_v2_beta.py +++ b/tests/unit/gapic/lifesciences_v2beta/test_workflows_service_v2_beta.py @@ -15,7 +15,6 @@ # import os import mock -import packaging.version import grpc from grpc.experimental import aio @@ -44,9 +43,6 @@ from google.cloud.lifesciences_v2beta.services.workflows_service_v2_beta import ( transports, ) -from google.cloud.lifesciences_v2beta.services.workflows_service_v2_beta.transports.base import ( - _GOOGLE_AUTH_VERSION, -) from google.cloud.lifesciences_v2beta.types import workflows from google.longrunning import operations_pb2 from google.oauth2 import service_account @@ -54,20 +50,6 @@ import google.auth -# TODO(busunkim): Once google-auth >= 1.25.0 is required transitively -# through google-api-core: -# - Delete the auth "less than" test cases -# - Delete these pytest markers (Make the "greater than or equal to" tests the default). -requires_google_auth_lt_1_25_0 = pytest.mark.skipif( - packaging.version.parse(_GOOGLE_AUTH_VERSION) >= packaging.version.parse("1.25.0"), - reason="This test requires google-auth < 1.25.0", -) -requires_google_auth_gte_1_25_0 = pytest.mark.skipif( - packaging.version.parse(_GOOGLE_AUTH_VERSION) < packaging.version.parse("1.25.0"), - reason="This test requires google-auth >= 1.25.0", -) - - def client_cert_source_callback(): return b"cert bytes", b"key bytes" @@ -229,7 +211,7 @@ def test_workflows_service_v2_beta_client_client_options( options = client_options.ClientOptions(api_endpoint="squid.clam.whelk") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(client_options=options) + client = client_class(transport=transport_name, client_options=options) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -246,7 +228,7 @@ def test_workflows_service_v2_beta_client_client_options( with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "never"}): with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class() + client = client_class(transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -263,7 +245,7 @@ def test_workflows_service_v2_beta_client_client_options( with mock.patch.dict(os.environ, {"GOOGLE_API_USE_MTLS_ENDPOINT": "always"}): with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class() + client = client_class(transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -292,7 +274,7 @@ def test_workflows_service_v2_beta_client_client_options( options = client_options.ClientOptions(quota_project_id="octopus") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(client_options=options) + client = client_class(transport=transport_name, client_options=options) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -361,7 +343,7 @@ def test_workflows_service_v2_beta_client_mtls_env_auto( ) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(client_options=options) + client = client_class(transport=transport_name, client_options=options) if use_client_cert_env == "false": expected_client_cert_source = None @@ -403,7 +385,7 @@ def test_workflows_service_v2_beta_client_mtls_env_auto( expected_client_cert_source = client_cert_source_callback patched.return_value = None - client = client_class() + client = client_class(transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -425,7 +407,7 @@ def test_workflows_service_v2_beta_client_mtls_env_auto( return_value=False, ): patched.return_value = None - client = client_class() + client = client_class(transport=transport_name) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -460,7 +442,7 @@ def test_workflows_service_v2_beta_client_client_options_scopes( options = client_options.ClientOptions(scopes=["1", "2"],) with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(client_options=options) + client = client_class(transport=transport_name, client_options=options) patched.assert_called_once_with( credentials=None, credentials_file=None, @@ -495,7 +477,7 @@ def test_workflows_service_v2_beta_client_client_options_credentials_file( options = client_options.ClientOptions(credentials_file="credentials.json") with mock.patch.object(transport_class, "__init__") as patched: patched.return_value = None - client = client_class(client_options=options) + client = client_class(transport=transport_name, client_options=options) patched.assert_called_once_with( credentials=None, credentials_file="credentials.json", @@ -774,7 +756,6 @@ def test_workflows_service_v2_beta_base_transport(): transport.operations_client -@requires_google_auth_gte_1_25_0 def test_workflows_service_v2_beta_base_transport_with_credentials_file(): # Instantiate the base transport with a credentials file with mock.patch.object( @@ -795,26 +776,6 @@ def test_workflows_service_v2_beta_base_transport_with_credentials_file(): ) -@requires_google_auth_lt_1_25_0 -def test_workflows_service_v2_beta_base_transport_with_credentials_file_old_google_auth(): - # Instantiate the base transport with a credentials file - with mock.patch.object( - google.auth, "load_credentials_from_file", autospec=True - ) as load_creds, mock.patch( - "google.cloud.lifesciences_v2beta.services.workflows_service_v2_beta.transports.WorkflowsServiceV2BetaTransport._prep_wrapped_messages" - ) as Transport: - Transport.return_value = None - load_creds.return_value = (ga_credentials.AnonymousCredentials(), None) - transport = transports.WorkflowsServiceV2BetaTransport( - credentials_file="credentials.json", quota_project_id="octopus", - ) - load_creds.assert_called_once_with( - "credentials.json", - scopes=("https://www.googleapis.com/auth/cloud-platform",), - quota_project_id="octopus", - ) - - def test_workflows_service_v2_beta_base_transport_with_adc(): # Test the default credentials are used if credentials and credentials_file are None. with mock.patch.object(google.auth, "default", autospec=True) as adc, mock.patch( @@ -826,7 +787,6 @@ def test_workflows_service_v2_beta_base_transport_with_adc(): adc.assert_called_once() -@requires_google_auth_gte_1_25_0 def test_workflows_service_v2_beta_auth_adc(): # If no credentials are provided, we should use ADC credentials. with mock.patch.object(google.auth, "default", autospec=True) as adc: @@ -839,18 +799,6 @@ def test_workflows_service_v2_beta_auth_adc(): ) -@requires_google_auth_lt_1_25_0 -def test_workflows_service_v2_beta_auth_adc_old_google_auth(): - # If no credentials are provided, we should use ADC credentials. - with mock.patch.object(google.auth, "default", autospec=True) as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - WorkflowsServiceV2BetaClient() - adc.assert_called_once_with( - scopes=("https://www.googleapis.com/auth/cloud-platform",), - quota_project_id=None, - ) - - @pytest.mark.parametrize( "transport_class", [ @@ -858,7 +806,6 @@ def test_workflows_service_v2_beta_auth_adc_old_google_auth(): transports.WorkflowsServiceV2BetaGrpcAsyncIOTransport, ], ) -@requires_google_auth_gte_1_25_0 def test_workflows_service_v2_beta_transport_auth_adc(transport_class): # If credentials and host are not provided, the transport class should use # ADC credentials. @@ -872,26 +819,6 @@ def test_workflows_service_v2_beta_transport_auth_adc(transport_class): ) -@pytest.mark.parametrize( - "transport_class", - [ - transports.WorkflowsServiceV2BetaGrpcTransport, - transports.WorkflowsServiceV2BetaGrpcAsyncIOTransport, - ], -) -@requires_google_auth_lt_1_25_0 -def test_workflows_service_v2_beta_transport_auth_adc_old_google_auth(transport_class): - # If credentials and host are not provided, the transport class should use - # ADC credentials. - with mock.patch.object(google.auth, "default", autospec=True) as adc: - adc.return_value = (ga_credentials.AnonymousCredentials(), None) - transport_class(quota_project_id="octopus") - adc.assert_called_once_with( - scopes=("https://www.googleapis.com/auth/cloud-platform",), - quota_project_id="octopus", - ) - - @pytest.mark.parametrize( "transport_class,grpc_helpers", [