This is an automated email from the ASF dual-hosted git repository.
kaxilnaik 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 fc013d4217c Fix `DatasetOrTimeSchedule` compatiblility (#49371)
fc013d4217c is described below
commit fc013d4217cc6858157a6ce77a0915815bf751fc
Author: Rahul Vats <[email protected]>
AuthorDate: Thu Apr 17 03:11:57 2025 +0530
Fix `DatasetOrTimeSchedule` compatiblility (#49371)
---
airflow-core/src/airflow/timetables/datasets.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/airflow-core/src/airflow/timetables/datasets.py
b/airflow-core/src/airflow/timetables/datasets.py
index b716435a5e0..234160add78 100644
--- a/airflow-core/src/airflow/timetables/datasets.py
+++ b/airflow-core/src/airflow/timetables/datasets.py
@@ -21,13 +21,13 @@ import warnings
from airflow.timetables.assets import AssetOrTimeSchedule
-class DatasetOrTimeSchedule(AssetOrTimeSchedule):
+class DatasetOrTimeSchedule:
"""Deprecated alias for `AssetOrTimeSchedule`."""
- def __init__(self, *, timetable, datasets) -> None:
+ def __new__(cls, *, timetable, datasets) -> AssetOrTimeSchedule: # type:
ignore[misc]
warnings.warn(
"DatasetOrTimeSchedule is deprecated and will be removed in
Airflow 3.2. Use `airflow.timetables.AssetOrTimeSchedule` instead.",
DeprecationWarning,
stacklevel=2,
)
- super().__init__(timetable=timetable, assets=datasets)
+ return AssetOrTimeSchedule(timetable=timetable, assets=datasets)