Webargs

Latest version: v8.6.0

Safety actively analyzes 714772 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 18

5.1.0

Not secure
******************

Features:

* Error handlers for `AsyncParser` classes may be coroutine functions.
* Add type annotations to `AsyncParser` and `AIOHTTPParser`.

Bug fixes:

* Fix compatibility with Flask<1.0 (:issue:`355`).
Thanks :user:`hoatle` for reporting.
* Address warning on Python 3.7 about importing from ``collections.abc``.

5.0.0

Not secure
******************

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

Not secure
******************

Bug fixes:

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

4.4.0

Not secure
******************

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

4.3.1

Not secure
******************

* Add ``force_all`` param to ``PyramidParser.use_args``.
* Add warning about missing arguments to ``AsyncParser``.

4.3.0

Not secure
******************

* *Deprecation*: Add warning about missing arguments getting added
to parsed arguments dictionary (:issue:`342`). This behavior will be
removed in version 5.0.0.

Page 7 of 18

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.