Skip to content

Commit

Permalink
Fixed name of 20 remaining wrongly named operators. (#8994)
Browse files Browse the repository at this point in the history
  • Loading branch information
potiuk committed May 26, 2020
1 parent 9764c90 commit 00642a4
Show file tree
Hide file tree
Showing 182 changed files with 806 additions and 302 deletions.
2 changes: 1 addition & 1 deletion BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ This is the current syntax for `./breeze <./breeze>`_:
Prepares README.md files for backport packages. You can provide (after --) optional version
in the form of YYYY.MM.DD, optionally followed by the list of packages to generate readme for.
If the first parameter is not formatted as a date, then today is used as version.
If the first parameter is not formatted as a date, then today is regenerated.
If no packages are specified, readme for all packages are generated.
If no date is specified, current date + 3 days is used (allowing for PMC votes to pass).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# pylint: disable=unused-import
from airflow.providers.microsoft.azure.operators.oracle_to_azure_data_lake_transfer import ( # noqa
OracleToAzureDataLakeTransfer,
OracleToAzureDataLakeTransferOperator,
)

warnings.warn(
Expand Down
18 changes: 17 additions & 1 deletion airflow/contrib/operators/oracle_to_oracle_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.oracle.operators.oracle_to_oracle_transfer import OracleToOracleTransfer # noqa
from airflow.providers.oracle.operators.oracle_to_oracle_transfer import OracleToOracleTransferOperator

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


class OracleToOracleTransfer(OracleToOracleTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.oracle.operators.oracle_to_oracle_transfer.OracleToOracleTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.oracle.operators.oracle_to_oracle_transfer.OracleToOracleTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
19 changes: 17 additions & 2 deletions airflow/contrib/operators/vertica_to_hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,25 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hive.operators.vertica_to_hive import VerticaToHiveTransfer # noqa
from airflow.providers.apache.hive.operators.vertica_to_hive import VerticaToHiveTransferOperator

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


class VerticaToHiveTransfer(VerticaToHiveTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.hive.operators.vertica_to_hive.VerticaToHiveTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.hive.operators.vertica_to_hive.VerticaToHiveTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 17 additions & 1 deletion airflow/contrib/operators/vertica_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.mysql.operators.vertica_to_mysql import VerticaToMySqlTransfer # noqa
from airflow.providers.mysql.operators.vertica_to_mysql import VerticaToMySqlTransferOperator

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


class VerticaToMySqlTransfer(VerticaToMySqlTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.mysql.operators.vertica_to_mysql.VerticaToMySqlTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.mysql.operators.vertica_to_mysql.VerticaToMySqlTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
36 changes: 35 additions & 1 deletion airflow/contrib/sensors/hdfs_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,43 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hdfs.sensors.hdfs import HdfsSensorFolder, HdfsSensorRegex # noqa
from airflow.providers.apache.hdfs.sensors.hdfs import HdfsFolderSensor, HdfsRegexSensor

warnings.warn(
"This module is deprecated. Please use `airflow.providers.apache.hdfs.sensors.hdfs`.",
DeprecationWarning, stacklevel=2
)


# pylint: disable=too-many-ancestors
class HdfsSensorFolder(HdfsFolderSensor):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsFolderSensor`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)


# pylint: disable=too-many-ancestors
class HdfsSensorRegex(HdfsRegexSensor):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.hdfs.sensors.hdfs.HdfsRegexSensor`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
20 changes: 18 additions & 2 deletions airflow/operators/google_api_to_s3_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,27 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.amazon.aws.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer # noqa
from airflow.providers.amazon.aws.operators.google_api_to_s3_transfer import GoogleApiToS3TransferOperator

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


class GoogleApiToS3Transfer(GoogleApiToS3TransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.amazon.aws.operators.google_api_to_s3_transfer.GoogleApiToS3TransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.amazon.aws.operators.""" +
"google_api_to_s3_transfer.GoogleApiToS3TransferOperator`.",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 17 additions & 1 deletion airflow/operators/hive_to_druid.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.apache.druid.operators.hive_to_druid import HiveToDruidTransfer # noqa
from airflow.providers.apache.druid.operators.hive_to_druid import HiveToDruidTransferOperator

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


class HiveToDruidTransfer(HiveToDruidTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.druid.operators.hive_to_druid.HiveToDruidTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.druid.operators.hive_to_druid.HiveToDruidTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 17 additions & 1 deletion airflow/operators/hive_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hive.operators.hive_to_mysql import HiveToMySqlTransfer # noqa
from airflow.providers.apache.hive.operators.hive_to_mysql import HiveToMySqlTransferOperator

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


class HiveToMySqlTransfer(HiveToMySqlTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.hive.operators.hive_to_mysql.HiveToMySqlTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.hive.operators.hive_to_mysql.HiveToMySqlTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
19 changes: 17 additions & 2 deletions airflow/operators/mssql_to_hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,25 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hive.operators.mssql_to_hive import MsSqlToHiveTransfer # noqa
from airflow.providers.apache.hive.operators.mssql_to_hive import MsSqlToHiveTransferOperator

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


class MsSqlToHiveTransfer(MsSqlToHiveTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.apache.hive.operators.mssql_to_hive.MsSqlToHiveTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.apache.hive.operators.mssql_to_hive.MsSqlToHiveTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 16 additions & 2 deletions airflow/operators/mysql_to_hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hive.operators.mysql_to_hive import MySqlToHiveTransfer # noqa
from airflow.providers.apache.hive.operators.mysql_to_hive import MySqlToHiveTransferOperator

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


class MySqlToHiveTransfer(MySqlToHiveTransferOperator):
"""
This class is deprecated.
Please use `airflow.providers.apache.hive.operators.mysql_to_hive.MySqlToHiveTransferOperator`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.providers.apache.hive.operators.mysql_to_hive.MySqlToHiveTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 17 additions & 1 deletion airflow/operators/presto_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,25 @@
import warnings

# pylint: disable=unused-import
from airflow.providers.mysql.operators.presto_to_mysql import PrestoToMySqlTransfer # noqa
from airflow.providers.mysql.operators.presto_to_mysql import PrestoToMySqlTransferOperator

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


class PrestoToMySqlTransfer(PrestoToMySqlTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.mysql.operators.presto_to_mysql.PrestoToMySqlTransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.mysql.operators.presto_to_mysql.PrestoToMySqlTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
19 changes: 17 additions & 2 deletions airflow/operators/redshift_to_s3_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,25 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.amazon.aws.operators.redshift_to_s3 import RedshiftToS3Transfer # noqa
from airflow.providers.amazon.aws.operators.redshift_to_s3 import RedshiftToS3TransferOperator

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


class RedshiftToS3Transfer(RedshiftToS3TransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.amazon.aws.operators.redshift_to_s3.RedshiftToS3TransferOperator`."""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use
`airflow.providers.amazon.aws.operators.redshift_to_s3.RedshiftToS3TransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
18 changes: 16 additions & 2 deletions airflow/operators/s3_to_hive_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.apache.hive.operators.s3_to_hive import S3ToHiveTransfer # noqa
from airflow.providers.apache.hive.operators.s3_to_hive import S3ToHiveTransferOperator

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


class S3ToHiveTransfer(S3ToHiveTransferOperator):
"""
This class is deprecated.
Please use `airflow.providers.apache.hive.operators.s3_to_hive.S3ToHiveTransferOperator`.
"""

def __init__(self, *args, **kwargs):
warnings.warn(
"""This class is deprecated.
Please use `airflow.providers.apache.hive.operators.s3_to_hive.S3ToHiveTransferOperator`.""",
DeprecationWarning, stacklevel=2
)
super().__init__(*args, **kwargs)
19 changes: 17 additions & 2 deletions airflow/operators/s3_to_redshift_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,25 @@

import warnings

# pylint: disable=unused-import
from airflow.providers.amazon.aws.operators.s3_to_redshift import S3ToRedshiftTransfer # noqa
from airflow.providers.amazon.aws.operators.s3_to_redshift import S3ToRedshiftTransferOperator

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


class S3ToRedshiftTransfer(S3ToRedshiftTransferOperator):
"""
This class is deprecated.
Please use:
`airflow.providers.amazon.aws.operators.s3_to_redshift.S3ToRedshiftTransferOperator`."""

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

0 comments on commit 00642a4

Please sign in to comment.