You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/10 04:51:05 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #20507: Fix DAG date range bug

uranusjr commented on a change in pull request #20507:
URL: https://github.com/apache/airflow/pull/20507#discussion_r780891273



##########
File path: airflow/models/dag.py
##########
@@ -570,7 +570,7 @@ def date_range(
         message = "`DAG.date_range()` is deprecated."
         if num is not None:
             warnings.warn(message, category=DeprecationWarning, stacklevel=2)
-            return utils_date_range(start_date=start_date, num=num)
+            return utils_date_range(start_date=start_date, num=num, delta=self.normalized_schedule_interval)

Review comment:
       Since `normalized_schedule_interval` is also deprecated, this emits two successive warnings in one call. The `normalized_schedule_interval` warning should be suppressed here.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org