Skip to content

Commit fb62cf2

Browse files
authored
Revert protection against back-compatibilty issue with google-core-api (#37111)
The bug we reported for google-core-api 2.16.0 has been fixed in 2.16.1 and we can revert the workaround now
1 parent 1e57cb1 commit fb62cf2

File tree

4 files changed

+6
-15
lines changed

4 files changed

+6
-15
lines changed

airflow/providers/google/provider.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ dependencies:
9393
- gcsfs>=2023.10.0
9494
- google-ads>=22.1.0
9595
- google-analytics-admin
96-
- google-api-core>=2.11.0
96+
# Google-api-core 2.16.0 back-compat issue: https://github.com/googleapis/python-api-core/issues/576
97+
- google-api-core>=2.11.0,!=2.16.0
9798
- google-api-python-client>=1.6.0
9899
- google-auth>=1.0.0
99100
- google-auth-httplib2>=0.0.1

generated/provider_dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
"gcsfs>=2023.10.0",
517517
"google-ads>=22.1.0",
518518
"google-analytics-admin",
519-
"google-api-core>=2.11.0",
519+
"google-api-core>=2.11.0,!=2.16.0",
520520
"google-api-python-client>=1.6.0",
521521
"google-auth-httplib2>=0.0.1",
522522
"google-auth>=1.0.0",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ winrm = [
524524
# If you want to modify these - modify the corresponding provider.yaml instead.
525525
#############################################################################################################
526526
# START OF GENERATED DEPENDENCIES
527-
# Hash of dependencies: 5041869464e6475fea61bee848306a8c
527+
# Hash of dependencies: ad91a0758ca9b408679bd3ea3ec22c66
528528
airbyte = [ # source: airflow/providers/airbyte/provider.yaml
529529
"apache-airflow[http]",
530530
]
@@ -705,7 +705,7 @@ google = [ # source: airflow/providers/google/provider.yaml
705705
"gcsfs>=2023.10.0",
706706
"google-ads>=22.1.0",
707707
"google-analytics-admin",
708-
"google-api-core>=2.11.0",
708+
"google-api-core>=2.11.0,!=2.16.0",
709709
"google-api-python-client>=1.6.0",
710710
"google-auth-httplib2>=0.0.1",
711711
"google-auth>=1.0.0",

tests/system/providers/google/cloud/dataproc/example_dataproc_batch.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,7 @@
2222
import os
2323
from datetime import datetime
2424

25-
try:
26-
from google.api_core.retry import AsyncRetry # type: ignore[attr-defined]
27-
# There is a backwards-incompatible change in google.api_core.retry.AsyncRetry imports
28-
# In 2.16.0 version of google-api-core, AsyncRetry was moved to google.api_core.retry_unary_async
29-
# and backwards compatibility impots were not haandling the case of
30-
# `from google.api_core.retry_async import AsyncRetry`
31-
# The issue is tracked in https://github.com/googleapis/python-api-core/issues/586
32-
# Until it is solved, we need to handle both cases, because one works before and one after 2.16.0
33-
# But there is no import that works for both.
34-
except ImportError:
35-
from google.api_core.retry_async import AsyncRetry # type: ignore[attr-defined]
25+
from google.api_core.retry_async import AsyncRetry
3626

3727
from airflow.models.dag import DAG
3828
from airflow.providers.google.cloud.operators.dataproc import (

0 commit comments

Comments
 (0)