Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate GCS sensors #1444

Merged
merged 7 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions astronomer/providers/google/cloud/hooks/gcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""This module contains a Google Cloud Storage hook."""
from typing import cast
import warnings
from typing import Any, cast

from aiohttp import ClientSession as ClientSession
from airflow.providers.google.cloud.hooks.gcs import GCSHook
Expand All @@ -12,7 +13,22 @@


class GCSHookAsync(GoogleBaseHookAsync):
"""GCSHookAsync run on the trigger worker, inherits from GoogleBaseHookAsync"""
"""GCSHookAsync run on the trigger worker, inherits from GoogleBaseHookAsync

This class is deprecated and will be removed in 2.0.0.
Use :class: `~airflow.providers.google.cloud.hooks.gcs.GCSAsyncHook` instead
"""

def __init__(self, **kwargs: Any):
warnings.warn(
(
"This class is deprecated and will be removed in 2.0.0."
"Use `airflow.providers.google.cloud.hooks.gcs.GCSAsyncHook` instead"
),
DeprecationWarning,
stacklevel=2,
)
super().__init__(**kwargs)

sync_hook_class = GCSHook

Expand Down
Loading
Loading