Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions airflow-core/newsfragments/70154.significant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The deprecated ``Dataset`` alias has been removed from the ``airflow`` module. Use ``Asset`` from ``airflow.sdk`` instead.
5 changes: 1 addition & 4 deletions airflow-core/src/airflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
"DAG",
"Asset",
"XComArg",
# TODO: Remove this module in Airflow 3.2
"Dataset",
]

# Perform side-effects unless someone has explicitly opted out before import
Expand All @@ -88,7 +86,6 @@
"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),
Expand All @@ -97,7 +94,7 @@
# 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):
Expand Down