You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by we...@apache.org on 2026/07/21 06:45:39 UTC
(airflow) branch main updated: Remove deprecated dataset aliases (#70154)
This is an automated email from the ASF dual-hosted git repository.
Lee-W 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 a8e4b9d537d Remove deprecated dataset aliases (#70154)
a8e4b9d537d is described below
commit a8e4b9d537d3adce381f56d9a5f5e151bf48d5c6
Author: Vic Wen <vi...@apache.org>
AuthorDate: Tue Jul 21 14:45:31 2026 +0800
Remove deprecated dataset aliases (#70154)
Co-authored-by: SHIVANSH-ux-ys <si...@gmail.com>
Signed-off-by: viiccwen <vi...@apache.org>
---
airflow-core/newsfragments/70154.significant.rst | 1 +
airflow-core/src/airflow/__init__.py | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/airflow-core/newsfragments/70154.significant.rst b/airflow-core/newsfragments/70154.significant.rst
new file mode 100644
index 00000000000..e97de862c45
--- /dev/null
+++ b/airflow-core/newsfragments/70154.significant.rst
@@ -0,0 +1 @@
+The deprecated ``Dataset`` alias has been removed from the ``airflow`` module. Use ``Asset`` from ``airflow.sdk`` instead.
diff --git a/airflow-core/src/airflow/__init__.py b/airflow-core/src/airflow/__init__.py
index 4f7c9d10251..8699ba8cc16 100644
--- a/airflow-core/src/airflow/__init__.py
+++ b/airflow-core/src/airflow/__init__.py
@@ -68,8 +68,6 @@ __all__ = [
"DAG",
"Asset",
"XComArg",
- # TODO: Remove this module in Airflow 3.2
- "Dataset",
]
# Perform side-effects unless someone has explicitly opted out before import
@@ -88,7 +86,6 @@ __lazy_imports: dict[str, tuple[str, str, bool]] = {
"version": (".version", "", False),
# Deprecated lazy imports
"AirflowException": (".exceptions", "AirflowException", True),
- "Dataset": (".sdk", "Asset", True),
"Trace": (".observability.trace", "Trace", True),
"metrics": (".observability.metrics", "", True),
"traces": ("._shared.observability.traces", "", True),
@@ -97,7 +94,7 @@ if TYPE_CHECKING:
# These objects are imported by PEP-562, however, static analyzers and IDE's
# have no idea about typing of these objects.
# Add it under TYPE_CHECKING block should help with it.
- from airflow.sdk import DAG, Asset, Asset as Dataset, XComArg
+ from airflow.sdk import DAG, Asset, XComArg
def __getattr__(name: str):