Skip to content

v3.0

Compare
Choose a tag to compare
@Fatal1ty Fatal1ty released this 09 Feb 13:52
· 634 commits to master since this release

Changes

  • Added support for new types:
    • typing.NewType
    • typing.Literal
    • typing_extensions.Literal
    • typing.Annotated
    • typing_extensions.Annotated
    • zoneinfo.ZoneInfo
    • typing_extensions.OrderedDict on Python<3.7.2.
  • Fixed using field options when using dataclass slots=True on Python 3.10 (#68).
  • Fixed using postponed evaluation with parent class (#70).
  • Fixed not removing field metadata options for the overridden field without them.
  • Fixed serialization of SerializableType generic classes.
  • Added new pass_through object that can be used in serialization_strategy and serialize / deserialize options.
  • Reduced code building time.
  • Use encoder and decoder written in C for YAML by default if available.

Backward incompatible changes

  • Moved msgpack, pyyaml dependencies to extras_require (#7).
  • Moved DataClassJSONMixin, DataClassMessagePackMixin, DataClassYAMLMixin to mashumaro.mixins.* subpackages.
  • Removed use_bytes, use_enum, use_datetime parameters from DataClassDictMixin methods.
  • Removed encoder and decoder kwargs from to_*, from_* methods of the serialization mixins in order to pass keyword arguments to underlying to_dict, from_dict methods.

You can find migration guide here: https://github.com/Fatal1ty/mashumaro/blob/master/docs/2to3.md.