Skip to content

Commit

Permalink
Remove Presto check operators (#7884)
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-laj authored Mar 26, 2020
1 parent d2042b7 commit 35834c3
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 399 deletions.
57 changes: 52 additions & 5 deletions airflow/operators/presto_check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,63 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""This module is deprecated. Please use `airflow.providers.presto.operators.presto_check`."""
"""This module is deprecated. Please use `airflow.operators.check_operator`."""

import warnings

# pylint: disable=unused-import
from airflow.providers.presto.operators.presto_check import ( # noqa
PrestoCheckOperator, PrestoIntervalCheckOperator, PrestoValueCheckOperator,
)
from airflow.operators.check_operator import CheckOperator, IntervalCheckOperator, ValueCheckOperator # noqa

warnings.warn(
"This module is deprecated. Please use `airflow.providers.presto.operators.presto_check`.",
"This module is deprecated. Please use `airflow.operators.check_operator`.",
DeprecationWarning, stacklevel=2
)


class PrestoCheckOperator(CheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.check_operator.CheckOperator`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.check_operator.CheckOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)


class PrestoIntervalCheckOperator(IntervalCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.check_operator.IntervalCheckOperator`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""
This class is deprecated.l
Please use `airflow.operators.check_operator.IntervalCheckOperator`.
""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)


class PrestoValueCheckOperator(ValueCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.check_operator.ValueCheckOperator`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""
This class is deprecated.l
Please use `airflow.operators.check_operator.ValueCheckOperator`.
""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
17 changes: 0 additions & 17 deletions airflow/providers/presto/operators/__init__.py

This file was deleted.

133 changes: 0 additions & 133 deletions airflow/providers/presto/operators/presto_check.py

This file was deleted.

2 changes: 0 additions & 2 deletions docs/autoapi_templates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ All operators are in the following packages:

airflow/providers/postgres/operators/index

airflow/providers/presto/operators/index

airflow/providers/qubole/operators/index

airflow/providers/qubole/sensors/index
Expand Down
18 changes: 0 additions & 18 deletions tests/providers/presto/operators/__init__.py

This file was deleted.

Loading

0 comments on commit 35834c3

Please sign in to comment.