Skip to content

Releases: Fatal1ty/mashumaro

v3.6

07 Apr 09:28
Compare
Choose a tag to compare

Changes

  • Added JSON Schema generation functionality 🎉 (see documentation)
    • Draft 2022-12 and OpenAPI Specification 3.1.0
    • Validation keywords using typing.Annotated
    • No mixin required

v3.5

13 Feb 10:37
Compare
Choose a tag to compare

Changes

  • Added possibility to define a generic serialization method for a generic type by registering a method for its origin type
  • Improved support for third-party generic types by writing a generic SerializationStrategy (details)
  • Improved writing SerializationStrategy methods by optional use_annotations=True (details)
  • Classes defining __class_getitem__ methods will now be treated as generic types according to PEP 560

v3.4

06 Feb 08:37
Compare
Choose a tag to compare

Changes

  • Added support for typing.DefaultDict / collections.defaultdict
  • Added support for generic TypedDict and generic NamedTuple
  • Speeded up the generated code for deserialization of fields that could be None

v3.3.1

10 Jan 13:41
Compare
Choose a tag to compare

Changes

  • Fixed UnresolvedTypeReferenceErrorwhen postponed annotations were used and parent generic dataclass was defined in different module. See #90.
  • Fixed recursion error for self-referenced generic dataclasses. See #91.
  • Fixed inconsistent application of serialization_strategy appeared in version 3.2. See #93.

v3.3

21 Dec 23:50
Compare
Choose a tag to compare

Changes

  • Added ability to use annotations inside SerializableType to simplify dealing with generic types (see updated documentation)
  • Added support for user-defined variadic generic types and dataclasses, TypeVarTuple and Unpack from PEP 646
  • Fixed serialization / deserialization of Tuple[()] on python 3.11
  • Changed type name for Tuple[T, ...] from "Tuple[T, Ellipsis]" to "Tuple[T, ...]"

v3.2

02 Dec 22:18
Compare
Choose a tag to compare

Changes

  • Added support for PEP 655
  • Added skipping None value fields on serialization to TOML format. See #85.
  • Added new omit_none config option
  • Added new omit_none dialect option
  • Removed allowance to pass None values to fields that can't be None according to their type
  • Speeded up the generated code
  • Dropped Python 3.6 support

v3.1.1

29 Nov 21:28
Compare
Choose a tag to compare

Changes

  • Fixed using compiled mixins with inheritance. See #87.

v3.1

19 Oct 15:20
Compare
Choose a tag to compare

Changes

  • Added support for Python 3.11
  • Added support for typing.Self and typing_extensions.Self
  • In addition to from_dict and to_dict, methods in other mixins can also be compiled now
  • Increased speed of serialization and deserialization in MessagePack when using DataClassMessagePackMixin:
    • Removed the implicit inclusion of the ADD_DIALECT_SUPPORT config option when using DataClassMessagePackMixin
    • Methods from_msgpack and to_msgpack are now compiled
  • Added DataClassORJSONMixin to use a third-party orjson library that will handle supported data types by itself
    • Added new orjson_options config option to change default options passing to orjson.dumps method
    • Methods to_jsonb and to_json have orjson_options keyword argument to override the default options
  • Added support for TOML format using DataClassTOMLMixin

v3.0.4

11 Aug 08:02
Compare
Choose a tag to compare

Changes

  • Fixed using fields with init=False — they are skipped during deserialization now. See #82.

v3.0.3

08 Jun 10:20
Compare
Choose a tag to compare

Changes

  • Fixed using dialects for DataClassMessagePackMixin. See #76.