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

add support for de/serializing objects with json and msgpack #230

Merged
merged 22 commits into from Nov 4, 2022

Commits on Nov 3, 2022

  1. Configuration menu
    Copy the full SHA
    5a53459 View commit details
    Browse the repository at this point in the history
  2. LayerSet/Layer: record self._lazy and make unlazify idempotent

    similar to Font, DataSet, ImageSet
    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    bc82a2a View commit details
    Browse the repository at this point in the history
  3. remove unused Attribute.metadata[copyable]

    we currently don't have any attributes that are init=True and copyable=False, the only copyable=False is Font.path which is also init=False, so simply checking if init=False is enough
    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    c1322fe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e0f3d6a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    829e35a View commit details
    Browse the repository at this point in the history
  6. add tests/ufoLib2/serde

    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    d3a2b6a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3442969 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0dfc108 View commit details
    Browse the repository at this point in the history
  9. test de/serializing ALL ufoLib2.objects

    and in fact I had forgotten to decorate one of them (Info) ;)
    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    fb32994 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    30f639f View commit details
    Browse the repository at this point in the history
  11. remove ufoLib2.serde.pickle, doesn't add anything

    Doing font.pickle_dumps() is exactly the same as doing pickle.dumps(font), same for Font.pickle_loads(s) vs pickle.loads(s), we don't use cattrs for pickling. So it's better to simply remove the extra code, pickling still works out of the box (even with lazy objects now).
    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    0ac647b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6378e56 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5a8d9bc View commit details
    Browse the repository at this point in the history
  14. require latest attrs/cattrs; rename GenConverter => Converter

    in latest cattrs, GenConverter _is_ the normal Converter anyway
    anthrotype committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    a8223ed View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    b421da3 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    7c7f7f7 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    1206873 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. make mypy happy again

    anthrotype committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    ebc3131 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b88ff09 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c6e188c View commit details
    Browse the repository at this point in the history
  4. add standalone load/dump functions in each ufoLib2.serde submodule

    So one can do ufoLib2.serde.json.load('MyFont.json', ufoLib2.Font) in alternative to ufoLib2.Font.json_load('MyFont.json')
    anthrotype committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    36d4632 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7a9d1de View commit details
    Browse the repository at this point in the history