Taragolis commented on code in PR #34683:
URL: https://github.com/apache/airflow/pull/34683#discussion_r1341316709


##########
setup.py:
##########
@@ -270,6 +270,9 @@ def write_version(filename: str = str(AIRFLOW_SOURCES_ROOT 
/ "airflow" / "git_ve
 atlas = [
     "atlasclient>=0.1.2",
 ]
+backports = [
+    "backports.zoneinfo>=0.2.1;python_version<'3.9'",
+]

Review Comment:
   Maybe we should just add it into the main dependencies? By the same way as 
we done for `importlib` backports?
   
   
https://github.com/apache/airflow/blob/55fbdfea4235569c91942e6b2227090366e0e75a/setup.cfg#L106-L107



##########
airflow/serialization/serializers/timezone.py:
##########
@@ -69,4 +82,28 @@ def deserialize(classname: str, version: int, data: object) 
-> Timezone:
     if isinstance(data, int):
         return fixed_timezone(data)
 
+    if "zoneinfo.ZoneInfo" in classname:  # capturing backports and stdlib
+        if PY39:
+            from zoneinfo import ZoneInfo
+        else:
+            from backports.zoneinfo import ZoneInfo
+        return ZoneInfo(data)
+
     return timezone(data)
+
+
+def _get_tzinfo_name(tzinfo: datetime.tzinfo | None) -> str | None:
+    if tzinfo is None:

Review Comment:
   Should we mentioned that this part vendored from pendulum?



-- 
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