Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Update webargs to 5.0.0 #80

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Jan 3, 2019

This PR updates webargs from 4.3.1 to 5.0.0.

Changelog

5.0.0

******************

Features:

* *Backwards-incompatible*: A 400 HTTPError is raised when an
invalid JSON payload is passed.  (:issue:`329`).
Thanks :user:`zedrdave` for reporting.

Other changes:

* Backwards-incompatible*: `webargs.argmap2schema` is removed. Use
`webargs.dict2schema` instead.
* *Backwards-incompatible*: `webargs.ValidationError` is removed.
Use `marshmallow.ValidationError` instead.


.. code-block:: python

  <5.0.0
 from webargs import ValidationError


 def auth_validator(value):
      ...
     raise ValidationError("Authentication failed", status_code=401)


 use_args({"auth": fields.Field(validate=auth_validator)})
 def auth_view(args):
     return jsonify(args)


  >=5.0.0
 from marshmallow import ValidationError


 def auth_validator(value):
      ...
     raise ValidationError("Authentication failed")


 use_args({"auth": fields.Field(validate=auth_validator)}, error_status_code=401)
 def auth_view(args):
     return jsonify(args)


* *Backwards-incompatible*: Missing arguments will no longer be filled
in when using ``use_kwargs`` (:issue:`342,307,252`). Use ``**kwargs``
to account for non-required fields.

.. code-block:: python

  <5.0.0
 use_kwargs(
     {"first_name": fields.Str(required=True), "last_name": fields.Str(required=False)}
 )
 def myview(first_name, last_name):
      last_name is webargs.missing if it's missing from the request
     return {"first_name": first_name}


  >=5.0.0
 use_kwargs(
     {"first_name": fields.Str(required=True), "last_name": fields.Str(required=False)}
 )
 def myview(first_name, **kwargs):
      last_name will not be in kwargs if it's missing from the request
     return {"first_name": first_name}


* `simplejson <https://pypi.org/project/simplejson/>`_ is now a required
dependency on Python 2 (:pr:`334`).
This ensures consistency of behavior across Python 2 and 3.

4.4.1

******************

Bug fixes:

* Remove usages of ``argmap2schema`` from ``fields.Nested``,
``AsyncParser``, and ``PyramidParser``.

4.4.0

******************

* *Deprecation*: ``argmap2schema`` is deprecated in favor of
``dict2schema`` (:pr:`352`).
Links

@pyup-bot pyup-bot mentioned this pull request Jan 3, 2019
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.656% when pulling 65d9067 on pyup-update-webargs-4.3.1-to-5.0.0 into 6b09c9c on master.

4 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.656% when pulling 65d9067 on pyup-update-webargs-4.3.1-to-5.0.0 into 6b09c9c on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.656% when pulling 65d9067 on pyup-update-webargs-4.3.1-to-5.0.0 into 6b09c9c on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.656% when pulling 65d9067 on pyup-update-webargs-4.3.1-to-5.0.0 into 6b09c9c on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.1%) to 84.656% when pulling 65d9067 on pyup-update-webargs-4.3.1-to-5.0.0 into 6b09c9c on master.

@mostafa mostafa closed this Jan 5, 2019
@mostafa mostafa deleted the pyup-update-webargs-4.3.1-to-5.0.0 branch January 14, 2019 01:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants