kaxil 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_r320756016
##########
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:
I did have this (`pendulum.tz.timezone_info.TimezoneInfo`) first, however
IDE complained (and so I guess mypy might have complained too - I guess not
sure though):

And so I changed it to ` type(pendulum.UTC)` which checks the type of the
instance created.
Happy to try `pendulum.tz.timezone_info.TimezoneInfo` and see if mypy
passes/fails
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services