eladkal commented on code in PR #22832: URL: https://github.com/apache/airflow/pull/22832#discussion_r848053012
########## airflow/operators/dummy.py: ########## @@ -15,23 +15,26 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -from airflow.models.baseoperator import BaseOperator -from airflow.utils.context import Context +"""This module is deprecated. Please use :mod:`airflow.operators.empty`.""" +import warnings -class DummyOperator(BaseOperator): - """ - Operator that does literally nothing. It can be used to group tasks in a - DAG. +from airflow.operators.empty import EmptyOperator - The task is evaluated by the scheduler but never processed by the executor. - """ +warnings.warn( + "This module is deprecated. Please use `airflow.operators.empty`.", + DeprecationWarning, + stacklevel=2, +) - ui_color = '#e8f7e4' - inherits_from_dummy_operator = True - def __init__(self, **kwargs) -> None: - super().__init__(**kwargs) +class DummyOperator(EmptyOperator): + """This class is deprecated. Please use `airflow.operators.empty.Empty`.""" - def execute(self, context: Context): - pass + def __init__(self, **kwargs): + warnings.warn( + """This class is deprecated. Please use `airflow.operators.empty.Empty`.""", Review Comment: done https://github.com/apache/airflow/pull/22832/commits/ceead3ec82a5d685900d19dc018f4e1fab6723ac -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
