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

Function and Method fields: set dump_only and load_only based on passed arguments? #328

sloria opened this Issue Nov 11, 2015 · 2 comments


None yet
3 participants

sloria commented Nov 11, 2015


Function(serialize=f) -> automatically set dump_only to True
Function(deserialize=f2) -> automatically set load_only to True
Function(serialize=f, deserialize=f2) -> dump_only is False, load_only is False

sloria added a commit that referenced this issue Nov 11, 2015

Don't set dump_only and load_only automatically
In order to maintain backwards compatibility.

This may change in 3.0. Proposal here: #328

This comment has been minimized.


justanr commented Nov 12, 2015

I think this is a good rationale. If only one of the attributes is set, the intention is probably to only load or dump depending on which it is.

@sloria sloria added this to the 3.0 milestone Nov 19, 2015

sloria added a commit that referenced this issue May 22, 2016

Set ``dump_only`` and ``load_only``...
...based on values of ``serialize`` and ``deserialize``

closes #328

deckar01 pushed a commit to deckar01/marshmallow that referenced this issue Jun 22, 2016

Set ``dump_only`` and ``load_only``...
...based on values of ``serialize`` and ``deserialize``

closes marshmallow-code#328

This comment has been minimized.


deckar01 commented Jun 28, 2016

@sloria It looks like #460 was merged, which moved the implementation of this proposal to 3.0. Is there anything else you still needed to add?

@sloria sloria closed this Feb 18, 2017

@sloria sloria modified the milestones: 3.0, 3.0a Feb 18, 2017

llazzaro pushed a commit to infobyte/faraday that referenced this issue Jun 28, 2018

Fix some issues with the marshmallow shemas
- Fix compatibility issues with dev version marshmallow
  Related to marshmallow-code/marshmallow#328
- Set parent and parent_type required
- Improve support for partial loading schemas (although we don't use
them yet)
- Fix potential bug in PrimaryKeyRelatedField
  It only happens with the field name is in `dir(NoneType)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment