feng-tao closed pull request #3760: [AIRFLOW-2909] Deprecate airflow.operators.sensors module URL: https://github.com/apache/incubator-airflow/pull/3760
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/airflow/contrib/sensors/sftp_sensor.py b/airflow/contrib/sensors/sftp_sensor.py index 51ad11ddbf..088e3e54b4 100644 --- a/airflow/contrib/sensors/sftp_sensor.py +++ b/airflow/contrib/sensors/sftp_sensor.py @@ -20,7 +20,7 @@ import logging from paramiko import SFTP_NO_SUCH_FILE from airflow.contrib.hooks.sftp_hook import SFTPHook -from airflow.operators.sensors import BaseSensorOperator +from airflow.sensors.base_sensor_operator import BaseSensorOperator from airflow.utils.decorators import apply_defaults diff --git a/airflow/operators/sensors.py b/airflow/operators/sensors.py deleted file mode 100644 index 61fb4d0b95..0000000000 --- a/airflow/operators/sensors.py +++ /dev/null @@ -1,94 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - - -# ------------------------------------------------------------------------ -# -# #TODO #FIXME Airflow 2.0 -# -# In Airflow this will be moved to the airflow.sensors package. -# Until then this class will provide backward compatibility -# -# ------------------------------------------------------------------------ - - -from airflow.sensors.base_sensor_operator import BaseSensorOperator as \ - BaseSensorOperatorImp -from airflow.sensors.external_task_sensor import ExternalTaskSensor as \ - ExternalTaskSensorImp -from airflow.sensors.hdfs_sensor import HdfsSensor as HdfsSensorImp -from airflow.sensors.hive_partition_sensor import HivePartitionSensor as \ - HivePartitionSensorImp -from airflow.sensors.http_sensor import HttpSensor as HttpSensorImp -from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor as \ - MetastorePartitionSensorImp -from airflow.sensors.s3_key_sensor import S3KeySensor as S3KeySensorImp -from airflow.sensors.s3_prefix_sensor import S3PrefixSensor as S3PrefixSensorImp -from airflow.sensors.sql_sensor import SqlSensor as SqlSensorImp -from airflow.sensors.time_delta_sensor import TimeDeltaSensor as TimeDeltaSensorImp -from airflow.sensors.time_sensor import TimeSensor as TimeSensorImp -from airflow.sensors.web_hdfs_sensor import WebHdfsSensor as WebHdfsSensorImp - - -class BaseSensorOperator(BaseSensorOperatorImp): - pass - - -class ExternalTaskSensor(ExternalTaskSensorImp): - pass - - -class HdfsSensor(HdfsSensorImp): - pass - - -class HttpSensor(HttpSensorImp): - pass - - -class MetastorePartitionSensor(MetastorePartitionSensorImp): - pass - - -class HivePartitionSensor(HivePartitionSensorImp): - pass - - -class S3KeySensor(S3KeySensorImp): - pass - - -class S3PrefixSensor(S3PrefixSensorImp): - pass - - -class SqlSensor(SqlSensorImp): - pass - - -class TimeDeltaSensor(TimeDeltaSensorImp): - pass - - -class TimeSensor(TimeSensorImp): - pass - - -class WebHdfsSensor(WebHdfsSensorImp): - pass ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
