RFC: Replace missing/default with default_load/default_dump/default
See original GitHub issueQuoting @deckar01 in https://github.com/marshmallow-code/marshmallow/issues/775#issuecomment-382130144:
It does seem arbitrary for
default
to only be used for serialization. It isn’t immediately obvious thatmissing
is the deserialization complement. It would be nice if there was a little more symmetry here. Maybe something likedefault_load
,default_dump
, anddefault
to set both at once.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (11 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So should it be
default_load
anddefault_dump
only?If we do that we can keep and deprecate the old names:
missing
(deprecated) ->load_default
default
(deprecated) ->dump_default
(I prefer
load_default
todefault_load
.)Aside from breaking users’ code, I’m also concerned about the maintenance burden for libraries that support both marshmallow 2 and 3. webargs, apispec, and environs will probably be affected by this change. I’m sure there are others.