notatallshaw-gts commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1349248206


##########
tests/models/test_dag.py:
##########
@@ -94,10 +95,17 @@
 from tests.test_utils.timetables import cron_timetable, delta_timetable
 
 TEST_DATE = datetime_tz(2015, 1, 2, 0, 0)
-
 repo_root = Path(__file__).parents[2]
 
 
+def convert_dt(tz: Timezone, dt, dst_rule):
+    """Converts a datetime in the current timezone"""
+    try:
+        return tz.convert(dt=dt, dst_rule=dst_rule)
+    except TypeError:  # Pendulum 3 Timezone doesn't have dst_rule
+        return tz.convert(dt=dt)

Review Comment:
   > Airflow doesn’t support 3.6 anymore
   
   FYI, Python 3.6 did introduce fold, so this is only for Python 3.5 and 
earlier.



##########
tests/models/test_dag.py:
##########
@@ -94,10 +95,17 @@
 from tests.test_utils.timetables import cron_timetable, delta_timetable
 
 TEST_DATE = datetime_tz(2015, 1, 2, 0, 0)
-
 repo_root = Path(__file__).parents[2]
 
 
+def convert_dt(tz: Timezone, dt, dst_rule):
+    """Converts a datetime in the current timezone"""
+    try:
+        return tz.convert(dt=dt, dst_rule=dst_rule)
+    except TypeError:  # Pendulum 3 Timezone doesn't have dst_rule
+        return tz.convert(dt=dt)

Review Comment:
   > Airflow doesn’t support 3.6 anymore
   
   FYI, Python 3.6 did introduce fold, so this is only for Python 3.5 and 
earlier.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to