v3.0
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 toextras_require
(#7). - Moved
DataClassJSONMixin
,DataClassMessagePackMixin
,DataClassYAMLMixin
tomashumaro.mixins.*
subpackages. - Removed
use_bytes
,use_enum
,use_datetime
parameters fromDataClassDictMixin
methods. - Removed encoder and decoder kwargs from
to_*
,from_*
methods of the serialization mixins in order to pass keyword arguments to underlyingto_dict
,from_dict
methods.
You can find migration guide here: https://github.com/Fatal1ty/mashumaro/blob/master/docs/2to3.md.