ashb commented on a change in pull request #5743: [AIRFLOW-5088][AIP-24] Persisting serialized DAG in DB for webserver scalability URL: https://github.com/apache/airflow/pull/5743#discussion_r320697531
########## File path: airflow/dag/serialization/serialization.py ########## @@ -148,7 +148,7 @@ def _serialize(cls, var): # pylint: disable=too-many-return-statements return cls._encode(var.isoformat(), type_=DAT.DATETIME) elif isinstance(var, datetime.timedelta): return cls._encode(var.total_seconds(), type_=DAT.TIMEDELTA) - elif isinstance(var, pendulum.tz.Timezone): + elif isinstance(var, (pendulum.tz.Timezone, type(pendulum.UTC))): Review comment: This looks suspect - what about using `datetime.tzinfo` instead, which both pendulum.tz.Timezone and pendulum.tz.timezone_info.TimezoneInfo inherit from. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services