You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rishi-kulkarni (via GitHub)" <gi...@apache.org> on 2023/09/19 15:36:08 UTC

[GitHub] [airflow] rishi-kulkarni opened a new issue, #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

rishi-kulkarni opened a new issue, #34483:
URL: https://github.com/apache/airflow/issues/34483

   ### Apache Airflow version
   
   2.7.1
   
   ### What happened
   
   We recently updated our Airflow server to 2.7.0 (from 2.6.0) and moved from a local PostGres instance to one located in AWS RDS. We had some DAGs that passed pendulum.DateTimes as XCOMs that used to work on the old server that now fail with the following error: 
   
   ```
   [2023-09-19, 15:28:23 UTC] {abstractoperator.py:696} ERROR - Exception rendering Jinja template for task 'apply_bonuses_to_new_shifts', field 'op_args'. Template: (XComArg(<Task(_PythonDecoratedOperator): update_early_bird_eligible_shifts>),)
   Traceback (most recent call last):
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/reader.py", line 50, in read_for
       file_path = pytzdata.tz_path(timezone)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pytzdata/__init__.py", line 74, in tz_path
       raise TimezoneNotFound('Timezone {} not found at {}'.format(name, filepath))
   pytzdata.exceptions.TimezoneNotFound: Timezone EDT not found at /home/airflow/dagger/venv/lib64/python3.9/site-packages/pytzdata/zoneinfo/EDT
   During handling of the above exception, another exception occurred:
   Traceback (most recent call last):
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/abstractoperator.py", line 688, in _do_render_template_fields
       rendered_content = self.render_template(
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 162, in render_template
       return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 162, in <genexpr>
       return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 158, in render_template
       return value.resolve(context)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/session.py", line 77, in wrapper
       return func(*args, session=session, **kwargs)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom_arg.py", line 413, in resolve
       result = ti.xcom_pull(
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/session.py", line 74, in wrapper
       return func(*args, **kwargs)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/taskinstance.py", line 2562, in xcom_pull
       return XCom.deserialize_value(first)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom.py", line 693, in deserialize_value
       return BaseXCom._deserialize_value(result, False)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom.py", line 686, in _deserialize_value
       return json.loads(result.value.decode("UTF-8"), cls=XComDecoder, object_hook=object_hook)
     File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads
       return cls(**kw).decode(s)
     File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
       obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     File "/usr/lib64/python3.9/json/decoder.py", line 353, in raw_decode
       obj, end = self.scan_once(s, idx)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/json.py", line 117, in object_hook
       return deserialize(dct)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/serialization/serde.py", line 253, in deserialize
       return _deserializers[classname].deserialize(classname, version, deserialize(value))
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/serialization/serializers/datetime.py", line 70, in deserialize
       return DateTime.fromtimestamp(float(data[TIMESTAMP]), tz=timezone(data[TIMEZONE]))
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/__init__.py", line 37, in timezone
       tz = _Timezone(name, extended=extended)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/timezone.py", line 40, in __init__
       tz = read(name, extend=extended)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/__init__.py", line 9, in read
       return Reader(extend=extend).read_for(name)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/reader.py", line 52, in read_for
       raise InvalidTimezone(timezone)
   pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "EDT"
   [2023-09-19, 15:28:23 UTC] {taskinstance.py:1943} ERROR - Task failed with exception
   Traceback (most recent call last):
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/reader.py", line 50, in read_for
       file_path = pytzdata.tz_path(timezone)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pytzdata/__init__.py", line 74, in tz_path
       raise TimezoneNotFound('Timezone {} not found at {}'.format(name, filepath))
   pytzdata.exceptions.TimezoneNotFound: Timezone EDT not found at /home/airflow/dagger/venv/lib64/python3.9/site-packages/pytzdata/zoneinfo/EDT
   During handling of the above exception, another exception occurred:
   Traceback (most recent call last):
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/taskinstance.py", line 1518, in _run_raw_task
       self._execute_task_with_callbacks(context, test_mode, session=session)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/taskinstance.py", line 1646, in _execute_task_with_callbacks
       task_orig = self.render_templates(context=context)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/taskinstance.py", line 2291, in render_templates
       original_task.render_template_fields(context)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/baseoperator.py", line 1244, in render_template_fields
       self._do_render_template_fields(self, self.template_fields, context, jinja_env, set())
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/session.py", line 77, in wrapper
       return func(*args, session=session, **kwargs)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/abstractoperator.py", line 688, in _do_render_template_fields
       rendered_content = self.render_template(
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 162, in render_template
       return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 162, in <genexpr>
       return tuple(self.render_template(element, context, jinja_env, oids) for element in value)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/template/templater.py", line 158, in render_template
       return value.resolve(context)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/session.py", line 77, in wrapper
       return func(*args, session=session, **kwargs)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom_arg.py", line 413, in resolve
       result = ti.xcom_pull(
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/session.py", line 74, in wrapper
       return func(*args, **kwargs)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/taskinstance.py", line 2562, in xcom_pull
       return XCom.deserialize_value(first)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom.py", line 693, in deserialize_value
       return BaseXCom._deserialize_value(result, False)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/models/xcom.py", line 686, in _deserialize_value
       return json.loads(result.value.decode("UTF-8"), cls=XComDecoder, object_hook=object_hook)
     File "/usr/lib64/python3.9/json/__init__.py", line 359, in loads
       return cls(**kw).decode(s)
     File "/usr/lib64/python3.9/json/decoder.py", line 337, in decode
       obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     File "/usr/lib64/python3.9/json/decoder.py", line 353, in raw_decode
       obj, end = self.scan_once(s, idx)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/utils/json.py", line 117, in object_hook
       return deserialize(dct)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/serialization/serde.py", line 253, in deserialize
       return _deserializers[classname].deserialize(classname, version, deserialize(value))
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/airflow/serialization/serializers/datetime.py", line 70, in deserialize
       return DateTime.fromtimestamp(float(data[TIMESTAMP]), tz=timezone(data[TIMEZONE]))
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/__init__.py", line 37, in timezone
       tz = _Timezone(name, extended=extended)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/timezone.py", line 40, in __init__
       tz = read(name, extend=extended)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/__init__.py", line 9, in read
       return Reader(extend=extend).read_for(name)
     File "/home/airflow/dagger/venv/lib64/python3.9/site-packages/pendulum/tz/zoneinfo/reader.py", line 52, in read_for
       raise InvalidTimezone(timezone)
   pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "EDT"
   ```
   
   However, the DAG itself makes no mention of EDT - it does the following:
   
   ```
   last_datetime.in_tz("America/New_York")
   ```
   
   I've identified the issue as how these XCOMs are being serialized - one our old server, they were being serialized as ISO timestamps:
   ![image](https://github.com/apache/airflow/assets/29555644/f0027b3a-2245-4529-aa52-7e9cff8cd009)
   
   Now, however, they're being serialized like this:
   
   ![image](https://github.com/apache/airflow/assets/29555644/485ac5a8-eb29-4304-96f3-f6612b36d60c)
   
   This is unexpected, and also causes problems because `EDT` is not an IANA timezone, which prevents `pendulum` from deserializing it in the task that accepts this XCOM. 
   
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   I think this is reproducible by creating a DAG that has a task that converts a `pendulum.DateTime` to `America/New_York` and passes it as an XCOM to another task. 
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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

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


[GitHub] [airflow] Taragolis commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726540817

   `o.tzname` it is refers to `datatime.datetime.tzname` ([Latest native Python implementation](https://github.com/python/cpython/blob/17a335dd0291d09e1510157a4ebe02932ec632dd/Lib/datetime.py#L1579-L1590)), I think @rishi-kulkarni suggestion to use `pendulum.datetime.Datetime.tz.name` most applicable for pendulum
   
   If I change current implementation in `serialize` then DAG work fine as well as your example
   
   ```diff
   -        tz = o.tzname()
   +        tz = o.tz.name if isinstance(o, DateTime) else o.tzname()
   ```
   
   ![image](https://github.com/apache/airflow/assets/3998685/e93e2ee2-143c-42cd-a967-883b932f10cb)
   


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

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


[GitHub] [airflow] bolkedebruin commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "bolkedebruin (via GitHub)" <gi...@apache.org>.
bolkedebruin commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1727791996

   I suggested some updates on the PR that would also retroactively workaround the issue.


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

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


[GitHub] [airflow] hussein-awala commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726526268

   Looks like the problem is in pytz package; by running this small code, we find that there is a lot of missing short codes:
   ```python
   import pytz
   
   for tz in pytz.all_timezones:
       print(tz)
   ```
   
   The best option is using the long name instead in the serialized values, and this will not affect the deserialization of the serialized dates which we could deserialize now, but for the broken dates, I think there is no solution (except if we can find a package which knows all the short codes)
   
   @Taragolis wdyt?


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

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


[GitHub] [airflow] bolkedebruin commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "bolkedebruin (via GitHub)" <gi...@apache.org>.
bolkedebruin commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1727495879

   ISO dates are slow to parse. Let me take a look.


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

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


[GitHub] [airflow] rishi-kulkarni commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "rishi-kulkarni (via GitHub)" <gi...@apache.org>.
rishi-kulkarni commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726258188

   Yep, done. 


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

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


[GitHub] [airflow] hussein-awala commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726432534

   A simple example to reproduce:
   ```python
   >>> import pendulum
   >>> from airflow.serialization.serializers.datetime import serialize, deserialize
   >>> dt = pendulum.now("Europe/Paris").in_tz("America/New_York")
   >>> dt
   DateTime(2023, 9, 19, 16, 35, 8, 500201, tzinfo=Timezone('America/New_York'))
   >>> serialized_dt = serialize(dt)
   >>> serialized_dt
   ({'timestamp': 1695155708.500201, 'tz': 'EDT'}, 'pendulum.datetime.DateTime', 1, True)
   >>> deserialize(classname=serialized_dt[1], version=serialized_dt[2], data=serialized_dt[0])
   Traceback (most recent call last):
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/reader.py", line 50, in read_for
       file_path = pytzdata.tz_path(timezone)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pytzdata/__init__.py", line 74, in tz_path
       raise TimezoneNotFound('Timezone {} not found at {}'.format(name, filepath))
   pytzdata.exceptions.TimezoneNotFound: Timezone EDT not found at /home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pytzdata/zoneinfo/EDT
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/home/hussein.awala/hussein/airflow/airflow/serialization/serializers/datetime.py", line 70, in deserialize
       return DateTime.fromtimestamp(float(data[TIMESTAMP]), tz=timezone(data[TIMEZONE]))
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pendulum/tz/__init__.py", line 37, in timezone
       tz = _Timezone(name, extended=extended)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pendulum/tz/timezone.py", line 40, in __init__
       tz = read(name, extend=extended)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/__init__.py", line 9, in read
       return Reader(extend=extend).read_for(name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/hussein.awala/anaconda3/envs/airflow-env/lib/python3.11/site-packages/pendulum/tz/zoneinfo/reader.py", line 52, in read_for
       raise InvalidTimezone(timezone)
   pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "EDT"
   
   ```


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

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


[GitHub] [airflow] bolkedebruin commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "bolkedebruin (via GitHub)" <gi...@apache.org>.
bolkedebruin commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1727723754

   > #34492 works too, but we should test it with all the possible values for tzinfo (pytz, dateutil, ...), the same for your suggestion
   
   pytz etc are explicitly not supported as they delivery factually incorrect information


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

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


[GitHub] [airflow] hussein-awala commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726572058

   #34492 works too, but we should test it with all the possible values for tzinfo (pytz, dateutil, ...), the same for your suggestion


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

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


[GitHub] [airflow] Taragolis commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726084879

   @rishi-kulkarni Could you provide a simple DAG which could reproduce this error?


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

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


[GitHub] [airflow] Taragolis commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726465231

   > It looks like instead of o.tzname(), this will work with o.tz.name. I'm happy to open a PR unless you already have one in the works.
   
   Yep, it should it need to be conditional, if it `pendulum.datetime.Datetime` then use Timezone.name if `datetime.datetime` then `o.tzname()`


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

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


[GitHub] [airflow] rishi-kulkarni commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "rishi-kulkarni (via GitHub)" <gi...@apache.org>.
rishi-kulkarni commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726659793

   Is there any harm in serializing all of these as ISO format string? That would navigate the pytz deprecation, as well. 


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

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


[GitHub] [airflow] hussein-awala commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726469763

   I think there is a bug in pendulum. If not, we need to find a different way to recreate a Timezone instance from the short code which we use in the serialized values.


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

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


[GitHub] [airflow] bolkedebruin closed issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "bolkedebruin (via GitHub)" <gi...@apache.org>.
bolkedebruin closed issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones
URL: https://github.com/apache/airflow/issues/34483


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

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


[GitHub] [airflow] bolkedebruin commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "bolkedebruin (via GitHub)" <gi...@apache.org>.
bolkedebruin commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1727721754

   https://github.com/sdispater/pendulum/issues/363 - interestingly EDT is serialized but cannot be deserialized. We probably should use the serialization code in `timezone.py` which does the correct thing.


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

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


[GitHub] [airflow] hussein-awala commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726545996

   I implemented the exact thing, but it fails when we create a datetime with a pendulum timezone


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

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


[GitHub] [airflow] rishi-kulkarni commented on issue #34483: `pendulum.DateTime` objects now being serialized as python objects with non-standard timezones

Posted by "rishi-kulkarni (via GitHub)" <gi...@apache.org>.
rishi-kulkarni commented on issue #34483:
URL: https://github.com/apache/airflow/issues/34483#issuecomment-1726443450

   @hussein-awala Interestingly, that fails on both servers, but does appear to be the problem. I wonder why our old server still manages to serialize these `DateTime` objects as ISO timestamps.


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

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