v1.3.0
Breaking changes:
- The type annotations now require mypy 1.0 or higher to validate correctly.
Features & fixes:
- Create values for fields of non-
listordictcomposite types (such asfrozensetorOrderedDict) as that type, instead oflistordict. - Allow overriding the field for specific composite types through the
serializer_field_mappingdictionary. - Don't set optional fields to
rest_framework.fields.emptysentinel value when used in non-partial mode. This fixes occasional leaks of the sentinel into dataclasses returned to the user, for example when aDataclassSerializerwas nested inside a regular serializer. Not setting, and later stripping, the sentinels also increases performance. - Support dataclasses with fields that have
init=False. - Support
save()on serializers withmany=True. - Support for fields with union types.
- Support nested serializers with
source='*'. - Fix
child_kwargsdefined in dataclass field metadata (as opposed toextra_kwargsfield onMetasubclass).