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

RFC: Remove fill_in_missing_args behavior #342

Closed
sloria opened this issue Dec 25, 2018 · 3 comments

Comments

@sloria
Copy link
Member

commented Dec 25, 2018

Proposal: Don't fill in missing args for use_kwargs.

I believe this behavior was added to prevent a variable number of kwargs from being passed to view functions. However, this leads to unexpected behavior, as seen in #252 and #307.

  • Remove the force_all argument to parse/use_args/use_kwargs
  • Remove fill_in_missing_args
@sloria

This comment has been minimized.

Copy link
Member Author

commented Dec 28, 2018

Thoughts, @lafrech @TTWShell ?

sloria added a commit that referenced this issue Dec 28, 2018

Deprecate fill_missing behavior
in preparation for #342
@lafrech

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

No objection.

If the view function needs a value, the schema should make it required or provide a default.

Or the view function itself may provide a default, but I think this is the schema's responsibility.

get_field_names_for_argmap can be removed as well.

@sloria

This comment has been minimized.

Copy link
Member Author

commented Dec 28, 2018

Cool. I'll go ahead with #347 then.

sloria added a commit that referenced this issue Dec 31, 2018

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Dec 31, 2018

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Dec 31, 2018

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Jan 1, 2019

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Jan 1, 2019

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Jan 1, 2019

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

sloria added a commit that referenced this issue Jan 1, 2019

Remove fill_in_missing_args behavior
This behavior is unintuitive and breaks use cases with
`partial=True` and pre_load methods that remove keys
(#252, #307).

close #342

@sloria sloria closed this in #349 Jan 1, 2019

Deimos added a commit to spectria/tildes that referenced this issue Jan 8, 2019

Pin webargs version to < 5.0
webargs 5.0.0 makes a behavior change to its @use_args / @use_kwargs
decorators that makes it so that optional/missing arguments are no
longer filled: marshmallow-code/webargs#342

This breaks how I'm currently doing some views with missing arguments
(such as views.topic.get_group_topics), so to be able to upgrade to 5.0
we will need to either update the views or the schemas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.