Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency mashumaro to v3 #298

Merged
merged 2 commits into from
Jul 9, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 9, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mashumaro 2.11 -> 3.8.1 age adoption passing confidence

Release Notes

Fatal1ty/mashumaro (mashumaro)

v3.8.1

Compare Source

Changes

  • Fixed issues introduced in 3.8 when dataclass instantiation produced TypeError if one of the fields was overridden (#​118) or post-deserialize hook was used (#​120)

v3.8

Compare Source

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 https://github.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

Compare Source

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.

v3.6

Compare Source

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

Compare Source

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

Compare Source

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

Compare Source

Changes

v3.3

Compare Source

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

Compare Source

Changes

  • Added support for PEP 655
  • Added skipping None value fields on serialization to TOML format. See https://github.com/Fatal1ty/mashumaro/issues/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

Compare Source

Changes

v3.1

Compare Source

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

Compare Source

Changes

v3.0.3

Compare Source

Changes

v3.0.2

Compare Source

Changes

v3.0.1

Compare Source

Changes

v3.0

Compare Source

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).
  • Fixed using postponed evaluation with parent class (https://github.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 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).
  • 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.


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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added chore dependencies Pull requests that update a dependency file labels Jul 9, 2023
@renovate renovate bot force-pushed the renovate/mashumaro-3.x branch 4 times, most recently from c489081 to 4fb28fd Compare July 9, 2023 15:01
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/mashumaro-3.x branch from caf2e13 to c9ee75f Compare July 9, 2023 16:21
@matfax matfax merged commit 72b6143 into main Jul 9, 2023
@matfax matfax deleted the renovate/mashumaro-3.x branch July 9, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant