Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't serialize ZoneInfo #828

Open
guillaumematheron opened this issue Aug 26, 2024 · 0 comments
Open

Can't serialize ZoneInfo #828

guillaumematheron opened this issue Aug 26, 2024 · 0 comments

Comments

@guillaumematheron
Copy link

In python 3.11, the serialization of
yaml.dump(zoneinfo.ZoneInfo("Europe/Paris"))
is:

  tz: &id002 !!python/object/apply:None._unpickle
  - Europe/Paris
  - 1

However it can't be constructed back into a ZoneInfo object:

> yaml.unsafe_load(yaml.dump(zoneinfo.ZoneInfo("Europe/Paris")))
*** yaml.constructor.ConstructorError: while constructing a Python object
cannot find module 'None' (No module named 'None')
  in "<unicode string>", line 1, column 1:
    !!python/object/apply:None._unpickle
    ^

yaml.version is '6.0.2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant