diff --git a/airflow/providers/google/provider.yaml b/airflow/providers/google/provider.yaml index 694acf706158..78d513a791bf 100644 --- a/airflow/providers/google/provider.yaml +++ b/airflow/providers/google/provider.yaml @@ -93,7 +93,8 @@ dependencies: - gcsfs>=2023.10.0 - google-ads>=22.1.0 - google-analytics-admin - - google-api-core>=2.11.0 + # Google-api-core 2.16.0 back-compat issue: https://github.com/googleapis/python-api-core/issues/576 + - google-api-core>=2.11.0,!=2.16.0 - google-api-python-client>=1.6.0 - google-auth>=1.0.0 - google-auth-httplib2>=0.0.1 diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index 50ceabadfa8a..63af5f0982bf 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -516,7 +516,7 @@ "gcsfs>=2023.10.0", "google-ads>=22.1.0", "google-analytics-admin", - "google-api-core>=2.11.0", + "google-api-core>=2.11.0,!=2.16.0", "google-api-python-client>=1.6.0", "google-auth-httplib2>=0.0.1", "google-auth>=1.0.0", diff --git a/pyproject.toml b/pyproject.toml index 412032235798..dd181ddbdf9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -524,7 +524,7 @@ winrm = [ # If you want to modify these - modify the corresponding provider.yaml instead. ############################################################################################################# # START OF GENERATED DEPENDENCIES -# Hash of dependencies: 5041869464e6475fea61bee848306a8c +# Hash of dependencies: ad91a0758ca9b408679bd3ea3ec22c66 airbyte = [ # source: airflow/providers/airbyte/provider.yaml "apache-airflow[http]", ] @@ -705,7 +705,7 @@ google = [ # source: airflow/providers/google/provider.yaml "gcsfs>=2023.10.0", "google-ads>=22.1.0", "google-analytics-admin", - "google-api-core>=2.11.0", + "google-api-core>=2.11.0,!=2.16.0", "google-api-python-client>=1.6.0", "google-auth-httplib2>=0.0.1", "google-auth>=1.0.0", diff --git a/tests/system/providers/google/cloud/dataproc/example_dataproc_batch.py b/tests/system/providers/google/cloud/dataproc/example_dataproc_batch.py index a6ec2a3c4532..7d126fc28bdb 100644 --- a/tests/system/providers/google/cloud/dataproc/example_dataproc_batch.py +++ b/tests/system/providers/google/cloud/dataproc/example_dataproc_batch.py @@ -22,17 +22,7 @@ import os from datetime import datetime -try: - from google.api_core.retry import AsyncRetry # type: ignore[attr-defined] - # There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports - # In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async - # and backwards compatibility impots were not haandling the case of - # `from google.api_core.retry_async import AsyncRetry` - # The issue is tracked in https://github.com/googleapis/python-api-core/issues/586 - # Until it is solved, we need to handle both cases, because one works before and one after 2.16.0 - # But there is no import that works for both. -except ImportError: - from google.api_core.retry_async import AsyncRetry # type: ignore[attr-defined] +from google.api_core.retry_async import AsyncRetry from airflow.models.dag import DAG from airflow.providers.google.cloud.operators.dataproc import (