diff --git a/providers/standard/src/airflow/providers/standard/sensors/time_delta.py b/providers/standard/src/airflow/providers/standard/sensors/time_delta.py index 2b95e99c0c096..35d5c83e5759b 100644 --- a/providers/standard/src/airflow/providers/standard/sensors/time_delta.py +++ b/providers/standard/src/airflow/providers/standard/sensors/time_delta.py @@ -129,9 +129,10 @@ def execute(self, context: Context) -> bool | NoReturn: # todo: remove backcompat when min airflow version greater than 2.11 timeout: int | float | timedelta - if _get_airflow_version() >= Version("2.11.0"): + if AIRFLOW_V_3_0_PLUS: timeout = self.timeout else: + # <=2.11 requires timedelta timeout = timedelta(seconds=self.timeout) self.defer(