Skip to content

Commit

Permalink
fix(mm): Replace deprecated Marshmallow Field parameters
Browse files Browse the repository at this point in the history
In Marshmallow 3.13.0, the `default` and `missing` parameters of the
`Field` object were deprecated and replaced with `dump_default` and
`load_default` respectively.

fixes: #328
  • Loading branch information
stevenpackardblp committed May 8, 2024
1 parent de0d230 commit d1f1e0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataclasses_json/mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def schema(cls, mixin, infer_missing):
else:
type_ = field.type
options: typing.Dict[str, typing.Any] = {}
missing_key = 'missing' if infer_missing else 'default'
missing_key = 'load_default' if infer_missing else 'dump_default'
if field.default is not MISSING:
options[missing_key] = field.default
elif field.default_factory is not MISSING:
Expand Down

0 comments on commit d1f1e0c

Please sign in to comment.