mostafa / grest

Build REST APIs with Neo4j and Flask, as quickly as possible!
http://grest.readthedocs.io/
GNU General Public License v3.0
115 stars 11 forks source link

Update webargs to 6.1.1 #269

Closed pyup-bot closed 3 years ago

pyup-bot commented 3 years ago

This PR updates webargs from 5.5.3 to 6.1.1.

Changelog ### 6.1.1 ``` ****************** Bug fixes: * Failure to validate flask headers would produce error data which contained tuples as keys, and was therefore not JSON-serializable. (:issue:`500`) These errors will now extract the headername as the key correctly. Thanks to :user:`shughes-uk` for reporting. ``` ### 6.1.0 ``` ****************** Features: * Add ``fields.DelimitedTuple`` when using marshmallow 3. This behaves as a combination of ``fields.DelimitedList`` and ``marshmallow.fields.Tuple``. It takes an iterable of fields, plus a delimiter (defaults to ``,``), and parses delimiter-separated strings into tuples. (:pr:`509`) * Add ``__str__`` and ``__repr__`` to MultiDictProxy to make it easier to work with (:pr:`488`) Support: * Various docs updates (:pr:`482`, :pr:`486`, :pr:`489`, :pr:`498`, :pr:`508`). Thanks :user:`lefterisjp`, :user:`timgates42`, and :user:`ugultopu` for the PRs. ``` ### 6.0.0 ``` ****************** Features: * ``FalconParser``: Pass request content length to ``req.stream.read`` to provide compatibility with ``falcon.testing`` (:pr:`477`). Thanks :user:`suola` for the PR. * *Backwards-incompatible*: Factorize the ``use_args`` / ``use_kwargs`` branch in all parsers. When ``as_kwargs`` is ``False``, arguments are now consistently appended to the arguments list by the ``use_args`` decorator. Before this change, the ``PyramidParser`` would prepend the argument list on each call to ``use_args``. Pyramid view functions must reverse the order of their arguments. (:pr:`478`) ``` ### 6.0.0b8 ``` ******************** Refactoring: * *Backwards-incompatible*: Use keyword-only arguments (:pr:`472`). ``` ### 6.0.0b7 ``` ******************** Features: * *Backwards-incompatible*: webargs will rewrite the error messages in ValidationErrors to be namespaced under the location which raised the error. The `messages` field on errors will therefore be one layer deeper with a single top-level key. ``` ### 6.0.0b6 ``` ******************** Refactoring: * Remove the cache attached to webargs parsers. Due to changes between webargs v5 and v6, the cache is no longer considered useful. Other changes: * Import ``Mapping`` from ``collections.abc`` in pyramidparser.py (:pr:`471`). Thanks :user:`tirkarthi` for the PR. ``` ### 6.0.0b5 ``` ******************** Refactoring: * *Backwards-incompatible*: `DelimitedList` now requires that its input be a string and always serializes as a string. It can still serialize and deserialize using another field, e.g. `DelimitedList(Int())` is still valid and requires that the values in the list parse as ints. ``` ### 6.0.0b4 ``` ******************** Bug fixes: * :cve:`CVE-2020-7965`: Don't attempt to parse JSON if request's content type is mismatched (bugfix from 5.5.3). ``` ### 6.0.0b3 ``` ******************** Features: * *Backwards-incompatible*: Support Falcon 2.0. Drop support for Falcon 1.x (:pr:`459`). Thanks :user:`dodumosu` and :user:`Nateyo` for the PR. ``` ### 6.0.0b2 ``` ******************** Other changes: * *Backwards-incompatible*: Drop support for Python 2 (:issue:`440`). Thanks :user:`hugovk` for the PR. ``` ### 6.0.0b1 ``` ******************** Features: * *Backwards-incompatible*: Schemas will now load all data from a location, not only data specified by fields. As a result, schemas with validators which examine the full input data may change in behavior. The `unknown` parameter on schemas may be used to alter this. For example, `unknown=marshmallow.EXCLUDE` will produce a behavior similar to webargs v5. Bug fixes: * *Backwards-incompatible*: All parsers now require the Content-Type to be set correctly when processing JSON request bodies. This impacts ``DjangoParser``, ``FalconParser``, ``FlaskParser``, and ``PyramidParser`` Refactoring: * *Backwards-incompatible*: Schema fields may not specify a location any longer, and `Parser.use_args` and `Parser.use_kwargs` now accept `location` (singular) instead of `locations` (plural). Instead of using a single field or schema with multiple `locations`, users are recommended to make multiple calls to `use_args` or `use_kwargs` with a distinct schema per location. For example, code should be rewritten like this: .. code-block:: python webargs 5.x and older parser.use_args( { "q1": ma.fields.Int(location="query"), "q2": ma.fields.Int(location="query"), "h1": ma.fields.Int(location="headers"), }, locations=("query", "headers"), ) def foo(q1, q2, h1): ... webargs 6.x parser.use_args({"q1": ma.fields.Int(), "q2": ma.fields.Int()}, location="query") parser.use_args({"h1": ma.fields.Int()}, location="headers") def foo(q1, q2, h1): ... * The `location_handler` decorator has been removed and replaced with `location_loader`. `location_loader` serves the same purpose (letting you write custom hooks for loading data) but its expected method signature is different. See the docs on `location_loader` for proper usage. Thanks :user:`sirosen` for the PR! ```
Links - PyPI: https://pypi.org/project/webargs - Changelog: https://pyup.io/changelogs/webargs/ - Repo: https://github.com/marshmallow-code/webargs
coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 86.168% when pulling e57fcff1dd0c4a252ff15987d03e2ad1fdac8b4e on pyup-update-webargs-5.5.3-to-6.1.1 into 7830b219e0a2dfe58ac8f0b51fd9a2c536c75a69 on master.