bolkedebruin commented on code in PR #34744:
URL: https://github.com/apache/airflow/pull/34744#discussion_r1402673852


##########
airflow/utils/timezone.py:
##########
@@ -18,14 +18,20 @@
 from __future__ import annotations
 
 import datetime as dt
+from functools import lru_cache
 from typing import overload
 
 import pendulum
 from dateutil.relativedelta import relativedelta
 from pendulum.datetime import DateTime
+from pendulum.tz import fixed_timezone
+from pendulum.tz.timezone import FixedTimezone, Timezone
 
-# UTC time zone as a tzinfo instance.
-utc = pendulum.tz.timezone("UTC")
+# UTC time zone as a FixedTimezone instance (subclass of tzinfo)
+# This type uses for compatibility with type provided by pendulum 2.x
+# - in pendulum 2.x ``pendulum.tz.timezone`` returns FixedTimezone
+# - in pendulum 3.x ``pendulum.timezone`` returns Timezone
+utc = FixedTimezone(offset=0, name="UTC")

Review Comment:
   then leave it for now, we can switch later



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to