Taragolis commented on code in PR #34744: URL: https://github.com/apache/airflow/pull/34744#discussion_r1347111539
########## 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: That is interesting question. In general speaking right now we use two different version of UTC timezone in airflow codebase. 1. `FixedTimezone` created by pendulum.tz.timezone("UTC") in most part of codebase 2. `Timezone` created by pendulum.tz.timezone.Timezone("UTC") in timetables This is a two different objects with different attributes however it should work exactly the same. So it might be a good idea to try to resolve different implementation of UTC timezone in airflow codebase, I just choose to keep the same as it now in most parts, but I happy to change it to `pendulum.tz.timezone.Timezone("UTC")` -- 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