This is an automated email from the ASF dual-hosted git repository.
shahar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 87715bcbcc0 Fix backcompat old `airflow.operators` (#47815)
87715bcbcc0 is described below
commit 87715bcbcc00d56a0676169dad1a07c3c017a5c4
Author: Jed Cunningham <[email protected]>
AuthorDate: Sat Mar 15 12:21:56 2025 -0600
Fix backcompat old `airflow.operators` (#47815)
Adding EmptyOperator and SmoothOperator to the deprecated helper was
missed, breaking existing DAGs.
Also, I've moved the branch operators into the deprecated helper so
proper deprecation warnings are emitted.
---
airflow/operators/README.md | 24 ------------------------
airflow/operators/__init__.py | 10 ++++++++++
airflow/operators/branch.py | 22 ----------------------
3 files changed, 10 insertions(+), 46 deletions(-)
diff --git a/airflow/operators/README.md b/airflow/operators/README.md
deleted file mode 100644
index b5dce562894..00000000000
--- a/airflow/operators/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- 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.
- -->
-
-# Airflow Operators
-
-Airflow Operators are modules that represent a single, ideally idempotent
task. They are arbiters of the logic that executes when your DAG runs.
-
-The Operators contained within this directory are core Airflow Operators from
which others may inherit, including the modules distributed in provider
packages. They are included by default in any Airflow implementation.
diff --git a/airflow/operators/__init__.py b/airflow/operators/__init__.py
index 465343a4d05..df46ec18164 100644
--- a/airflow/operators/__init__.py
+++ b/airflow/operators/__init__.py
@@ -53,6 +53,16 @@ __deprecated_classes = {
},
"latest_only": {
"LatestOnlyOperator":
"airflow.providers.standard.operators.latest_only.LatestOnlyOperator",
+ },
+ "empty": {
+ "EmptyOperator":
"airflow.providers.standard.operators.empty.EmptyOperator",
+ },
+ "smooth": {
+ "SmoothOperator":
"airflow.providers.standard.operators.smooth.SmoothOperator",
+ },
+ "branch":{
+ "BranchMixIn":
"airflow.providers.standard.operators.branch.BranchMixIn",
+ "BaseBranchOperator":
"airflow.providers.standard.operators.branch.BaseBranchOperator",
}
}
diff --git a/airflow/operators/branch.py b/airflow/operators/branch.py
deleted file mode 100644
index 7e9996c7b6c..00000000000
--- a/airflow/operators/branch.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.
-from __future__ import annotations
-
-from airflow.providers.standard.operators.branch import BaseBranchOperator,
BranchMixIn
-
-__all__ = ["BranchMixIn", "BaseBranchOperator"]