Skip to content

Commit 4830e2b

Browse files
fix(mm): Replace deprecated Marshmallow Field parameters
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. As these are new parameters added in version 3.13.0, the minimum version requirement is bumped accordingly. fixes: #328
1 parent 3264a00 commit 4830e2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dataclasses_json/mm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def schema(cls, mixin, infer_missing):
289289
else:
290290
type_ = field.type
291291
options = {}
292-
missing_key = 'missing' if infer_missing else 'default'
292+
missing_key = 'load_default' if infer_missing else 'dump_default'
293293
if field.default is not MISSING:
294294
options[missing_key] = field.default
295295
elif field.default_factory is not MISSING:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
keywords='dataclasses json',
1919
install_requires=[
2020
'dataclasses;python_version=="3.6"',
21-
'marshmallow>=3.3.0,<4.0.0',
21+
'marshmallow>=3.13.0,<4.0.0',
2222
'marshmallow-enum>=1.5.1,<2.0.0',
2323
'typing-inspect>=0.4.0'
2424
],

0 commit comments

Comments
 (0)