Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ repos:
name: Update cross-dependencies for providers packages
entry: ./scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py
language: python
files: ^airflow/providers/.*\.py$|^tests/providers/.*\.py$|^tests/system/providers/.*\.py$|$airflow/providers/.*/provider.yaml$
files: ^airflow/providers/.*\.py$|^tests/providers/.*\.py$|^tests/system/providers/.*\.py$|^airflow/providers/.*/provider.yaml$
pass_filenames: false
additional_dependencies: ['setuptools', 'rich>=12.4.4', 'pyyaml']
- id: update-extras
Expand Down
24 changes: 13 additions & 11 deletions airflow/operators/check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@
# specific language governing permissions and limitations
# under the License.

"""This module is deprecated. Please use :mod:`airflow.operators.sql`."""
"""This module is deprecated. Please use :mod:`airflow.providers.common.sql.operators.sql`."""

import warnings

from airflow.operators.sql import (
from airflow.providers.common.sql.operators.sql import (
SQLCheckOperator,
SQLIntervalCheckOperator,
SQLThresholdCheckOperator,
SQLValueCheckOperator,
)

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


class CheckOperator(SQLCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.sql.SQLCheckOperator`.""",
Please use `airflow.providers.common.sql.operators.sql.SQLCheckOperator`.""",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -51,13 +53,13 @@ def __init__(self, **kwargs):
class IntervalCheckOperator(SQLIntervalCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLIntervalCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLIntervalCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.sql.SQLIntervalCheckOperator`.""",
Please use `airflow.providers.common.sql.operators.sql.SQLIntervalCheckOperator`.""",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -67,13 +69,13 @@ def __init__(self, **kwargs):
class ThresholdCheckOperator(SQLThresholdCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLThresholdCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLThresholdCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.sql.SQLThresholdCheckOperator`.""",
Please use `airflow.providers.common.sql.operators.sql.SQLThresholdCheckOperator`.""",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -83,13 +85,13 @@ def __init__(self, **kwargs):
class ValueCheckOperator(SQLValueCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLValueCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLValueCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.sql.SQLValueCheckOperator`.""",
Please use `airflow.providers.common.sql.operators.sql.SQLValueCheckOperator`.""",
DeprecationWarning,
stacklevel=2,
)
Expand Down
4 changes: 2 additions & 2 deletions airflow/operators/druid_check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
# 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 :mod:`airflow.providers.apache.druid.operators.druid_check`."""
"""This module is deprecated. Please use :mod:`airflow.providers.common.sql.operators.sql`."""

import warnings

from airflow.providers.apache.druid.operators.druid_check import DruidCheckOperator # noqa

warnings.warn(
"This module is deprecated. Please use `airflow.operators.sql.SQLCheckOperator`.",
"This module is deprecated. Please use `airflow.providers.common.sql.operators.sql` module.",
DeprecationWarning,
stacklevel=2,
)
24 changes: 15 additions & 9 deletions airflow/operators/presto_check_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,33 @@
# 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 :mod:`airflow.operators.sql`."""
"""This module is deprecated. Please use :mod:`airflow.providers.common.sql.operators.sql`."""

import warnings

from airflow.operators.sql import SQLCheckOperator, SQLIntervalCheckOperator, SQLValueCheckOperator
from airflow.providers.common.sql.operators.sql import (
SQLCheckOperator,
SQLIntervalCheckOperator,
SQLValueCheckOperator,
)

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


class PrestoCheckOperator(SQLCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.operators.sql.SQLCheckOperator`.""",
Please use `airflow.providers.common.sql.operators.sql.SQLCheckOperator`.""",
DeprecationWarning,
stacklevel=2,
)
Expand All @@ -45,14 +51,14 @@ def __init__(self, **kwargs):
class PrestoIntervalCheckOperator(SQLIntervalCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLIntervalCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLIntervalCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""
This class is deprecated.l
Please use `airflow.operators.sql.SQLIntervalCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLIntervalCheckOperator`.
""",
DeprecationWarning,
stacklevel=2,
Expand All @@ -63,14 +69,14 @@ def __init__(self, **kwargs):
class PrestoValueCheckOperator(SQLValueCheckOperator):
"""
This class is deprecated.
Please use `airflow.operators.sql.SQLValueCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLValueCheckOperator`.
"""

def __init__(self, **kwargs):
warnings.warn(
"""
This class is deprecated.l
Please use `airflow.operators.sql.SQLValueCheckOperator`.
Please use `airflow.providers.common.sql.operators.sql.SQLValueCheckOperator`.
""",
DeprecationWarning,
stacklevel=2,
Expand Down
Loading