Skip to content

v3.8

Compare
Choose a tag to compare
@Fatal1ty Fatal1ty released this 22 Jun 18:45
· 320 commits to master since this release

Changes

  • Added new Discriminator type for discriminated unions and subclasses support, see documentation (#106)
  • Added ability to pass custom context from to_* methods to the hooks, see documentation (#110)
  • Types enclosed in Annotated are now different from unenclosed ones in serialization_strategy, see documentation (#115)
  • Added new lazy_compilation config option that can reduce import time and speed up deserialization, see documentation
  • Added support for Final types (#107)
  • Fixed support for Literal on Python 3.9.0 (#103)
  • Added workaround for mypy problem python/mypy#3186 in JSON Schema number constraints
  • Fixed type substitutions in generic SerializableType when TypeVars were mixed with ordinary types in _serialize / _deserialize annotations
  • Fixed an issue where a sentinel value dataclasses.KW_ONLY resulted in UnserializableDataError
  • Fixed an issue where passing a user-defined dict-like object to from_dict method could result in unhandled exceptions
  • Speeded up dataclass instantiation
  • Speeded up deserialization of fields with default values if they are missing in the input data