Skip to content

Commit

Permalink
Remove GCSObjectsWtihPrefixExistenceSensor
Browse files Browse the repository at this point in the history
  • Loading branch information
eladkal authored and potiuk committed Apr 25, 2022
1 parent f956b76 commit 27ad3b7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions airflow/providers/google/CHANGELOG.rst
Expand Up @@ -36,6 +36,8 @@ Breaking changes

* ``GoogleDriveToGCSOperator``: Remove ``destination_bucket`` and ``destination_object``. Please use ``bucket_name`` and ``object_name``.

* ``GCSObjectsWtihPrefixExistenceSensor`` removed. Please use ``GCSObjectsWithPrefixExistenceSensor``.

6.8.0
.....

Expand Down
17 changes: 0 additions & 17 deletions airflow/providers/google/cloud/sensors/gcs.py
Expand Up @@ -19,7 +19,6 @@

import os
import textwrap
import warnings
from datetime import datetime
from typing import TYPE_CHECKING, Callable, List, Optional, Sequence, Set, Union

Expand Down Expand Up @@ -228,22 +227,6 @@ def execute(self, context: "Context") -> List[str]:
return self._matches


class GCSObjectsWtihPrefixExistenceSensor(GCSObjectsWithPrefixExistenceSensor):
"""
This class is deprecated.
Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.providers.google.cloud.sensors.gcs.GCSObjectsWithPrefixExistenceSensor`.""",
DeprecationWarning,
stacklevel=3,
)
super().__init__(*args, **kwargs)


def get_time():
"""
This is just a wrapper of datetime.datetime.now to simplify mocking in the
Expand Down
1 change: 0 additions & 1 deletion tests/always/test_project_structure.py
Expand Up @@ -167,7 +167,6 @@ class TestGoogleProviderProjectStructure(unittest.TestCase):
'.CloudDataTransferServiceS3ToGCSOperator',
'airflow.providers.google.cloud.operators.cloud_storage_transfer_service'
'.CloudDataTransferServiceGCSToGCSOperator',
'airflow.providers.google.cloud.sensors.gcs.GCSObjectsWtihPrefixExistenceSensor',
'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitHadoopJobOperator',
'airflow.providers.google.cloud.operators.dataproc.DataprocScaleClusterOperator',
'airflow.providers.google.cloud.operators.dataproc.DataprocSubmitSparkJobOperator',
Expand Down

0 comments on commit 27ad3b7

Please sign in to comment.