luizribeiro / labby

Software for interacting with laboratory equipment and running experiment sequences.
MIT License
0 stars 1 forks source link

Update dependency mashumaro to v3 #110

Open renovate[bot] opened 2 years ago

renovate[bot] commented 2 years ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mashumaro 2.5 -> 3.13.1 age adoption passing confidence

Release Notes

Fatal1ty/mashumaro (mashumaro) ### [`v3.13.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.13.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.13...v3.13.1) ## Changes - Fixed type annotation for the result of `to_json` method in `DataClassORJSONMixin` ([#​223](https://togithub.com/Fatal1ty/mashumaro/issues/223)) - Fixed compatibility with Python 3.12.4 ([#​226](https://togithub.com/Fatal1ty/mashumaro/issues/226)) - Fixed compatibility with latest `TypeVar` default changes in Python 3.13.0 and typing-extensions>=4.12 ([#​227](https://togithub.com/Fatal1ty/mashumaro/issues/227)) ### [`v3.13`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.13) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.12...v3.13) ## Changes - Added support for Python 3.13 ([#​208](https://togithub.com/Fatal1ty/mashumaro/issues/208), [#​209](https://togithub.com/Fatal1ty/mashumaro/issues/209)) - Added support for PEP 695 ([#​211](https://togithub.com/Fatal1ty/mashumaro/issues/211)) - Added initial support for PEP 696 with typing-extensions 4.11.0 reference implementation ([#​216](https://togithub.com/Fatal1ty/mashumaro/issues/216)) - Added support for `MappingProxyType` ([#​218](https://togithub.com/Fatal1ty/mashumaro/issues/218)) - Added `forbid_extra_keys` config option to reject extra keys on deserialization ([#​197](https://togithub.com/Fatal1ty/mashumaro/issues/197), [#​198](https://togithub.com/Fatal1ty/mashumaro/issues/198)) - Added an alternative way to assign a field alias with `Alias(...)` annotation ([#​214](https://togithub.com/Fatal1ty/mashumaro/issues/214)), see updated [documentation](https://togithub.com/Fatal1ty/mashumaro?tab=readme-ov-file#field-aliases) - Improved union encoding performance ([#​194](https://togithub.com/Fatal1ty/mashumaro/issues/194)) - Fixed a case when `omit_default` didn't work for `Enum` with basic types mixed in ([#​204](https://togithub.com/Fatal1ty/mashumaro/issues/204)) - Fixed `RecursionError` when annotated `SerializationStrategy` was used as a field serialization strategy ([#​219](https://togithub.com/Fatal1ty/mashumaro/issues/219)) ### [`v3.12`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.12) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.11...v3.12) ## Changes - Added support for associating multiple tags with a single variant by returning a list of tags from `variant_tagger_fn` ([#​184](https://togithub.com/Fatal1ty/mashumaro/issues/184)) - Added support for locally defined types ([#​180](https://togithub.com/Fatal1ty/mashumaro/issues/180), [#​182](https://togithub.com/Fatal1ty/mashumaro/issues/182), [#​189](https://togithub.com/Fatal1ty/mashumaro/issues/189)) - Added support for `ForwardRef` in JSON Schema generation ([#​187](https://togithub.com/Fatal1ty/mashumaro/issues/187)) - Fixed serialization of `IntFlag` when `omit_default` is enabled ([#​188](https://togithub.com/Fatal1ty/mashumaro/issues/188)) - Improved type annotations for `serialization_strategy` config option ### [`v3.11`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.11) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.10...v3.11) ## Changes - Added "codecs" feature to separate data models from serialization and work with top-level lists, dataclasses without mixins etc. ([#​108](https://togithub.com/Fatal1ty/mashumaro/issues/108), [#​69](https://togithub.com/Fatal1ty/mashumaro/issues/69)), see updated [documentation](https://togithub.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://togithub.com/Fatal1ty/mashumaro#allow_deserialization_not_by_alias-config-option) ([https://github.com/Fatal1ty/mashumaro/pull/175](https://togithub.com/Fatal1ty/mashumaro/pull/175)) - Fixed `UnserializableDataError` for generic serializable types and generic serialization strategies with postponed evaluation of annotations ([#​177](https://togithub.com/Fatal1ty/mashumaro/issues/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 ### [`v3.10`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.10) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.9.1...v3.10) ## Changes - Added new `sort_keys` config option to sort keys on serialization, see [documentation](https://togithub.com/Fatal1ty/mashumaro#sort_keys-config-option) ([#​157](https://togithub.com/Fatal1ty/mashumaro/issues/157)) - Added new `omit_default` config and dialect options to exclude values equal to defaults on serialization, see [documentation](https://togithub.com/Fatal1ty/mashumaro#omit_default-config-option) ([#​161](https://togithub.com/Fatal1ty/mashumaro/issues/161)) - Added `variant_tagger_fn` discriminator parameter to allow discrimination based on a key that is not part of the model, see [documentation](https://togithub.com/Fatal1ty/mashumaro#using-a-custom-variant-tagger-function) ([#​135](https://togithub.com/Fatal1ty/mashumaro/issues/135)) - Added new `no_copy_collections` dialect option to avoid collection data types copying, see [documentation](https://togithub.com/Fatal1ty/mashumaro#no_copy_collections-dialect-option) ([#​163](https://togithub.com/Fatal1ty/mashumaro/issues/163)) - Added support for `LiteralString` ([#​166](https://togithub.com/Fatal1ty/mashumaro/issues/166)) - Added initial support for `ForwardRef` types ([#​144](https://togithub.com/Fatal1ty/mashumaro/issues/144)) - Added ability to use basic types as serialization methods so that they will be reflected in the JSON schema ([#​148](https://togithub.com/Fatal1ty/mashumaro/issues/148)) - Added ability to use slots in `SerializableType` and `GenericSerializableType` subclasses ([#​156](https://togithub.com/Fatal1ty/mashumaro/issues/156)) - Added ability to use frozen dataclasses as dictionary keys ([#​160](https://togithub.com/Fatal1ty/mashumaro/issues/160)) - Added support for Python 3.12 ([#​153](https://togithub.com/Fatal1ty/mashumaro/issues/153)) - Dropped support for Python 3.7 ([#​147](https://togithub.com/Fatal1ty/mashumaro/issues/147)) - Moved from `flake8` to `ruff` ([#​150](https://togithub.com/Fatal1ty/mashumaro/issues/150)) ### [`v3.9.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.9.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.9...v3.9.1) ## Changes - Fixed handling of collections of annotated with unhashable metadata types on python < 3.9 ([#​138](https://togithub.com/Fatal1ty/mashumaro/issues/138)) - Fixed JSON Schema for inner dataclasses and optional fields with custom serialization methods ([#​139](https://togithub.com/Fatal1ty/mashumaro/issues/139)) - Fixed JSON Schema for third-party types with default value ([#​141](https://togithub.com/Fatal1ty/mashumaro/issues/141)) ### [`v3.9`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.9) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.8.1...v3.9) ## Changes - Added support for inner dataclasses without mashumaro mixins ([#​109](https://togithub.com/Fatal1ty/mashumaro/issues/109)) - Added support for `default_factory` by JSON Schema generator ([#​114](https://togithub.com/Fatal1ty/mashumaro/issues/114)) - Added ability to override `additionalProperties` in JSON Schema ([#​123](https://togithub.com/Fatal1ty/mashumaro/issues/123)) - Added ability to add "description" keyword in JSON Schema by using "description" key in dataclass field metadata ([#​125](https://togithub.com/Fatal1ty/mashumaro/issues/125)) - Fixed default reference prefix in JSON Schema 2022-12 dialect ([#​126](https://togithub.com/Fatal1ty/mashumaro/issues/126)) - Fixed handling of `Annotated` type with unhashable metadata ([#​133](https://togithub.com/Fatal1ty/mashumaro/issues/133)) ### [`v3.8.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.8.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.8...v3.8.1) ## Changes - Fixed issues introduced in 3.8 when dataclass instantiation produced `TypeError` if one of the fields was overridden ([#​118](https://togithub.com/Fatal1ty/mashumaro/issues/118)) or post-deserialize hook was used ([#​120](https://togithub.com/Fatal1ty/mashumaro/issues/120)) ### [`v3.8`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.8) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.7...v3.8) ## Changes - Added new [`Discriminator`](https://togithub.com/Fatal1ty/mashumaro#discriminator) type for discriminated unions and subclasses support, see [documentation](https://togithub.com/Fatal1ty/mashumaro#discriminator) ([#​106](https://togithub.com/Fatal1ty/mashumaro/issues/106)) - Added ability to pass custom context from `to_*` methods to the hooks, see [documentation](https://togithub.com/Fatal1ty/mashumaro/#add-context-keyword-argument) ([#​110](https://togithub.com/Fatal1ty/mashumaro/issues/110)) - Types enclosed in `Annotated` are now different from unenclosed ones in `serialization_strategy`, see [documentation](https://togithub.com/Fatal1ty/mashumaro#extending-existing-types) ([#​115](https://togithub.com/Fatal1ty/mashumaro/issues/115)) - Added new `lazy_compilation` config option that can reduce import time and speed up deserialization, see [documentation](https://togithub.com/Fatal1ty/mashumaro#lazy_compilation-config-option) - Added support for `Final` types ([#​107](https://togithub.com/Fatal1ty/mashumaro/issues/107)) - Fixed support for `Literal` on Python 3.9.0 ([#​103](https://togithub.com/Fatal1ty/mashumaro/issues/103)) - Added workaround for mypy problem [https://github.com/python/mypy/issues/3186](https://togithub.com/python/mypy/issues/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 ### [`v3.7`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.7) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.6...v3.7) ## Changes - Added `"omit"` serialization engine to skip the field during serialization - Added `ref_prefix` parameter to `build_json_schema` and `JSONSchemaBuilder` to change reference prefix - Fixed adding dataclass field alias to JSON Schema "required" keyword value. See [https://github.com/Fatal1ty/mashumaro/issues/101](https://togithub.com/Fatal1ty/mashumaro/issues/101). ### [`v3.6`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.6) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.5...v3.6) ## Changes - Added JSON Schema generation functionality 🎉 (see [documentation](https://togithub.com/Fatal1ty/mashumaro#json-schema)) - Draft 2022-12 and OpenAPI Specification 3.1.0 - Validation keywords using typing.Annotated - No mixin required ### [`v3.5`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.5) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.4...v3.5) ## 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](https://togithub.com/Fatal1ty/mashumaro#third-party-generic-types)) - Improved writing `SerializationStrategy` methods by optional `use_annotations=True` ([details](https://togithub.com/Fatal1ty/mashumaro#third-party-types)) - Classes defining `__class_getitem__` methods will now be treated as generic types according to PEP 560 ### [`v3.4`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.4) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.3.1...v3.4) ## 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`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.3.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.3...v3.3.1) ## Changes - Fixed `UnresolvedTypeReferenceError`when postponed annotations were used and parent generic dataclass was defined in different module. See [https://github.com/Fatal1ty/mashumaro/issues/90](https://togithub.com/Fatal1ty/mashumaro/issues/90). - Fixed recursion error for self-referenced generic dataclasses. See [https://github.com/Fatal1ty/mashumaro/issues/91](https://togithub.com/Fatal1ty/mashumaro/issues/91). - Fixed inconsistent application of serialization_strategy appeared in version 3.2. See [https://github.com/Fatal1ty/mashumaro/issues/93](https://togithub.com/Fatal1ty/mashumaro/issues/93). ### [`v3.3`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.3) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.2...v3.3) ## Changes - Added ability to use annotations inside `SerializableType` to simplify dealing with generic types (see [updated documentation](https://togithub.com/Fatal1ty/mashumaro#serializabletype-interface)) - 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`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.2) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.1.1...v3.2) ## Changes - Added support for PEP 655 - Added skipping `None` value fields on serialization to TOML format. See [https://github.com/Fatal1ty/mashumaro/issues/85](https://togithub.com/Fatal1ty/mashumaro/issues/85). - Added new [`omit_none`](https://togithub.com/Fatal1ty/mashumaro#omit_none-config-option) config option - Added new [`omit_none`](https://togithub.com/Fatal1ty/mashumaro#omit_none-dialect-option) 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`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.1.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.1...v3.1.1) ## Changes - Fixed using compiled mixins with inheritance. See [https://github.com/Fatal1ty/mashumaro/issues/87](https://togithub.com/Fatal1ty/mashumaro/issues/87). ### [`v3.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.0.4...v3.1) ## 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`](https://togithub.com/Fatal1ty/mashumaro#dataclassorjsonmixin) to use a third-party [`orjson`](https://togithub.com/ijl/orjson) library that will handle supported data types by itself - Added new [`orjson_options`](https://togithub.com/Fatal1ty/mashumaro#orjson_options-config-option) 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](https://toml.io/en/) format using [`DataClassTOMLMixin`](https://togithub.com/Fatal1ty/mashumaro#dataclasstomlmixin) ### [`v3.0.4`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.0.4) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.0.3...v3.0.4) ## Changes - Fixed using fields with `init=False` — they are skipped during deserialization now. See [https://github.com/Fatal1ty/mashumaro/issues/82](https://togithub.com/Fatal1ty/mashumaro/issues/82). ### [`v3.0.3`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.0.3) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.0.2...v3.0.3) ## Changes - Fixed using dialects for `DataClassMessagePackMixin`. See [https://github.com/Fatal1ty/mashumaro/issues/76](https://togithub.com/Fatal1ty/mashumaro/issues/76). ### [`v3.0.2`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.0.2) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.0.1...v3.0.2) ## Changes - Fixed using dialects with inheritance. See [https://github.com/Fatal1ty/mashumaro/issues/78](https://togithub.com/Fatal1ty/mashumaro/issues/78). ### [`v3.0.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.0.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v3.0...v3.0.1) ## Changes - Fixed using Optional in tuples, named tuples and typed dicts. See [https://github.com/Fatal1ty/mashumaro/issues/73](https://togithub.com/Fatal1ty/mashumaro/issues/73). ### [`v3.0`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v3.0) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.11...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 ([https://github.com/Fatal1ty/mashumaro/issues/68](https://togithub.com/Fatal1ty/mashumaro/issues/68)). - Fixed using postponed evaluation with parent class ([https://github.com/Fatal1ty/mashumaro/issues/70](https://togithub.com/Fatal1ty/mashumaro/issues/70)). - Fixed not removing field metadata options for the overridden field without them. - Fixed serialization of `SerializableType` generic classes. - Added new [`pass_through`](https://togithub.com/Fatal1ty/mashumaro/tree/master#passing-field-values-as-is) 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 to `extras_require` ([https://github.com/Fatal1ty/mashumaro/issues/7](https://togithub.com/Fatal1ty/mashumaro/issues/7)). - Moved `DataClassJSONMixin`, `DataClassMessagePackMixin`, `DataClassYAMLMixin` to `mashumaro.mixins.*` subpackages. - Removed `use_bytes`, `use_enum`, `use_datetime` parameters from `DataClassDictMixin` methods. - Removed encoder and decoder kwargs from `to_*`, `from_*` methods of the serialization mixins in order to pass keyword arguments to underlying `to_dict`, `from_dict` methods. You can find migration guide here: https://github.com/Fatal1ty/mashumaro/blob/master/docs/2to3.md. ### [`v2.11`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.11) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.10.1...v2.11) ## Changes - PEP 604 compliance. - Fixed that `Union[None, X]` with `None` on the first place wasn't treated as `Optional[X]`. - Fixed that `Union[X, T]` where `T` was resolved to `None` wasn't treated as `Optional[X]`. - Allow using `None` as the field type (it's [considered](https://www.python.org/dev/peps/pep-0484/#using-none) equivalent to `NoneType`). - Changed the name of `NoneType` to `None` in Unions for convenience. In the previous versions you could see `Union[int, str, NoneType]` instead of `Union[int, str, None]` if the field was declared as `Union[int, str, None]`. ### [`v2.10.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.10.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.10...v2.10.1) ## Changes - Fixed using nested classes with future annotations import. See [https://github.com/Fatal1ty/mashumaro/issues/62](https://togithub.com/Fatal1ty/mashumaro/issues/62). ### [`v2.10`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.10) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.9.1...v2.10) ## Changes - Added support for [dialects](https://togithub.com/Fatal1ty/mashumaro#dialects). - Fixed type hints for `to_msgpack` and `from_msgpack` methods. See [https://github.com/Fatal1ty/mashumaro/issues/63](https://togithub.com/Fatal1ty/mashumaro/issues/63). - Fixed serialzation / deserialization override using `serialization_strategy` config option in a generic dataclass. ### [`v2.9.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.9.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.9...v2.9.1) ## Changes - Fixed installing with third-party tool pdistx. See [https://github.com/Fatal1ty/mashumaro/issues/60](https://togithub.com/Fatal1ty/mashumaro/issues/60). - Fixed serialzation / deserialization override for `Union` and `TypeVar` types. See [https://github.com/Fatal1ty/mashumaro/issues/61](https://togithub.com/Fatal1ty/mashumaro/issues/61). - Fixed the default value of `by_alias` argument of `to_dict` method when using `serialize_by_alias` config option. In the previous versions `by_alias` argument had a default value`False` regardless of whether `serialize_by_alias` config options was used. Now it could be `True`: ```python @​dataclass class MyClass(DataClassDictMixin): x: int class Config(BaseConfig): aliases = {"x": "x_alias"} serialize_by_alias = True code_generation_options = [TO_DICT_ADD_BY_ALIAS_FLAG] print(MyClass(x=1).to_dict()) # {'x_alias': 1} print(MyClass(x=1).to_dict(by_alias=False)) # {x': 1} ``` ### [`v2.9`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.9) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.8...v2.9) - Added support for PEP 563 postponed evaluation of annotations. See [here](https://togithub.com/Fatal1ty/mashumaro/#allow_postponed_evaluation-config-option) for details. - Added ability to treat named tuples as dictionaries during serialization/deserialization: - new `as_dict` and `as_list` [serialization](https://togithub.com/Fatal1ty/mashumaro#serialize-option) and [deserialization](https://togithub.com/Fatal1ty/mashumaro#deserialize-option) engines - new [`namedtuple_as_dict`](https://togithub.com/Fatal1ty/mashumaro#namedtuple_as_dict-config-option) config option ### [`v2.8`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.8) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.7...v2.8) - Added support for Python 3.10 - PEP 585 compliance - Added support for `TypedDict` - Added support for typed `NamedTuple` and untyped `namedtuple` - Fixed `Tuple` serialization and deserialization. Before 2.8 all values of tuples were deserialized as if they were values of the first type, no matter how many values the tuple was supposed to take. Now the following types are handled correctly: `Tuple[int]`, `Tuple[int, ...]`, `Tuple[int, str]`, `Tuple[()]`, `Tuple`. ### [`v2.7`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.7) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.6.4...v2.7) ## Changes - Added extended support for user-defined generic types. See [here](https://togithub.com/Fatal1ty/mashumaro/#user-defined-generic-types) for details. ### [`v2.6.4`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.6.4) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.6.3...v2.6.4) ## Changes - Fixed serialization of `Optional` types inside collections ([https://github.com/Fatal1ty/mashumaro/issues/54](https://togithub.com/Fatal1ty/mashumaro/issues/54)) ### [`v2.6.3`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.6.3) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.6.2...v2.6.3) ## Changes - Fixed serialization of `np.ndarray` and other third-party collection types ([https://github.com/Fatal1ty/mashumaro/issues/53](https://togithub.com/Fatal1ty/mashumaro/issues/53)) ### [`v2.6.2`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.6.2) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/2.6.1...v2.6.2) ## Changes - Fixed broken `type_name` for `Optional` types - Fixed broken `from_dict` method when using `TypeVar` with a `bound` parameter ### [`v2.6.1`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/2.6.1) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.6...2.6.1) ## Changes - Fixed broken `MissingField` and `InvalidFieldValue` exceptions with shortened generic type names ### [`v2.6`](https://togithub.com/Fatal1ty/mashumaro/releases/tag/v2.6) [Compare Source](https://togithub.com/Fatal1ty/mashumaro/compare/v2.5...v2.6) ## Changes - Added support for `TypeVar` types. It works like `Union` under the hood and both constraints and upper bound can be used to specify a variation of types. Similarly to `Union` it's recommended to place more complex variant types at first place like `TypeVar("T", Dict[int, int], List[int])` not `TypeVar("T", List[int], Dict[int, int])`. - Added support for short version of standard generic types without specifying type of objects kept in containers. Now it's possible to use `List` instead of `List[Any]` or `Dict` instead of `Dict[Any, Any]`. - Improved string representation of builtin and standard generic types. Now in the error messages you will see `int` instead of `builtins.int` or `List` instead of `typing.List`.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR was generated by Mend Renovate. View the repository job log.

renovate[bot] commented 1 year ago

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

The artifact failure details are included below:

File name: poetry.lock
Creating virtualenv labby-qm8eWC3D-py3.12 in /home/ubuntu/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...

The current project's Python requirement (>=3.7.1,<4.0.0) is not compatible with some of the required packages Python requirement:
  - mashumaro requires Python >=3.8, so it will not be satisfied for Python >=3.7.1,<3.8

Because labby depends on mashumaro (3.13) which requires Python >=3.8, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For mashumaro, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers
renovate[bot] commented 3 months ago

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

The artifact failure details are included below:

File name: poetry.lock
Creating virtualenv labby-qm8eWC3D-py3.12 in /home/ubuntu/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...

The current project's Python requirement (>=3.7.1,<4.0.0) is not compatible with some of the required packages Python requirement:
  - mashumaro requires Python >=3.8, so it will not be satisfied for Python >=3.7.1,<3.8

Because labby depends on mashumaro (3.13.1) which requires Python >=3.8, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For mashumaro, a possible solution would be to set the `python` property to ">=3.8,<4.0.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers