Mashumaro

Latest version: v3.15

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 12

3.15

Changes
--------
* Improved `Union` and basic types deserialization (256), highlighted changes:
* Expected `int | float` or `float | int` value can now be passed through without coercion and losing precision
* Expected `str` value will be guaranteed to be a [string version](https://docs.python.org/3/library/stdtypes.html#str) of the input value (42)
* Expected `bool` value will be guaranteed to be a boolean using standard [truth testing procedure](https://docs.python.org/3/library/stdtypes.html#truth-value-testing) for the input value
* Expected `NoneType` will be guaranteed to be `None` regardless of the input value
* Introduced JSON Schema plugin system (265), see updated [documentation](https://github.com/Fatal1ty/mashumaro?tab=readme-ov-file#json-schema-plugins)
* Added built-in `DocstringDescriptionPlugin` to use a docstring as a description (222)
* Added support for recursive `Union` types (206)
* Configured MANIFEST.in to include tests folder in the sdist (262)
* Dropped support for Python 3.8 (258)

3.14

Changes
--------
* Added support for `re.Pattern` and `typing.Pattern` (105)
* Fixed `DeprecationWarning` introduced in Python 3.13 (249)
* Fixed potential duplications in the Union unpacker (250)
* Small changes under the hood (244, 247)

3.13.1

Changes
--------
* Fixed type annotation for the result of `to_json` method in `DataClassORJSONMixin` (223)
* Fixed compatibility with Python 3.12.4 (226)
* Fixed compatibility with latest `TypeVar` default changes in Python 3.13.0 and typing-extensions>=4.12 (227)

3.13

Changes
--------
* Added support for Python 3.13 (208, 209)
* Added support for PEP 695 (211)
* Added initial support for PEP 696 with typing-extensions 4.11.0 reference implementation (216)
* Added support for `MappingProxyType` (218)
* Added `forbid_extra_keys` config option to reject extra keys on deserialization (197, 198)
* Added an alternative way to assign a field alias with `Alias(...)` annotation (214), see updated [documentation](https://github.com/Fatal1ty/mashumaro?tab=readme-ov-file#field-aliases)
* Improved union encoding performance (194)
* Fixed a case when `omit_default` didn't work for `Enum` with basic types mixed in (204)
* Fixed `RecursionError` when annotated `SerializationStrategy` was used as a field serialization strategy (219)

3.12

Changes
--------
* Added support for associating multiple tags with a single variant by returning a list of tags from `variant_tagger_fn` (184)
* Added support for locally defined types (180, 182, 189)
* Added support for `ForwardRef` in JSON Schema generation (187)
* Fixed serialization of `IntFlag` when `omit_default` is enabled (188)
* Improved type annotations for `serialization_strategy` config option

3.11

Changes
--------
* Added "codecs" feature to separate data models from serialization and work with top-level lists, dataclasses without mixins etc. (108, 69), see updated [documentation](https://github.com/Fatal1ty/mashumaro#supported-serialization-formats)
* Added new `allow_deserialization_not_by_alias` config option to allow deserialization by both alias and field name, see [documentation](https://github.com/Fatal1ty/mashumaro#allow_deserialization_not_by_alias-config-option) (https://github.com/Fatal1ty/mashumaro/pull/175)
* Fixed `UnserializableDataError` for generic serializable types and generic serialization strategies with postponed evaluation of annotations (177)
* Fixed regression when `ValueError` was not thrown if invalid value type was passed to `from_*` method
* Added `serialize_by_alias` dialect option
* Added `namedtuple_as_dict` dialect option

Page 1 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.