Codebase list python-webargs / debian/5.1.2-0kali1
New upstream version 5.1.2 * New upstream version 5.1.2 * Refresh patch Sophie Brun 5 years ago
5 changed file(s) with 30 addition(s) and 32 deletion(s). Raw diff Collapse all Expand all
0 python-webargs (5.1.2-0kali1) kali-dev; urgency=medium
1
2 * New upstream version 5.1.2
3 * Refresh patch
4
5 -- Sophie Brun <[email protected]> Fri, 22 Feb 2019 14:12:42 +0100
6
07 python-webargs (4.4.1-0kali1) kali-dev; urgency=medium
18
29 * New upstream version 4.4.1
+0
-1
debian/compat less more
0 11
11 Section: python
22 Priority: optional
33 Maintainer: Kali Developers <[email protected]>
4 Uploaders: Sophie Brun <[email protected]>
5 Build-Depends: debhelper (>= 11),
4 Uploaders: Sophie Brun <[email protected]>
5 Build-Depends: debhelper-compat (= 12),
66 dh-python,
77 python-all,
88 python-marshmallow,
99 python-pytest,
1010 python-setuptools,
11 python-simplejson (>= 2.1.0),
1112 python3-all,
1213 python3-marshmallow,
1314 python3-pytest,
22 Source: https://github.com/sloria/webargs
33
44 Files: *
5 Copyright: 2014-2017 Steven Loria <[email protected]>
5 Copyright: 2014-2019 Steven Loria <[email protected]>
66 License: MIT
77
88 Files: debian/*
9 Copyright: 2018 Sophie Brun <[email protected]>
9 Copyright: 2018-2019 Sophie Brun <[email protected]>
1010 License: MIT
1111
1212 License: MIT
77 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
88 --- a/webargs/core.py
99 +++ b/webargs/core.py
10 @@ -7,6 +7,7 @@ import inspect
10 @@ -6,6 +6,7 @@ import inspect
1111 import logging
1212 import warnings
1313 from distutils.version import LooseVersion
1414 +from packaging import version
1515
1616 try:
17 import simplejson as json
18 @@ -55,7 +56,7 @@ def get_func_args(func):
19 return _signature(func.__call__)
17 from collections.abc import Mapping
18 @@ -35,7 +36,7 @@ __all__ = [
19 "parse_json",
20 ]
2021
21
22 -MARSHMALLOW_VERSION_INFO = tuple(LooseVersion(ma.__version__).version)
22 -MARSHMALLOW_VERSION_INFO = tuple(LooseVersion(ma.__version__).version) # type: tuple
2323 +MARSHMALLOW_VERSION_INFO = ma.__version__
2424
25 DEFAULT_VALIDATION_STATUS = 422
25 DEFAULT_VALIDATION_STATUS = 422 # type: int
2626
27 @@ -142,7 +143,7 @@ def dict2schema(dct):
28 `Fields <marshmallow.fields.Field>`.
29 """
27 @@ -57,7 +58,7 @@ def dict2schema(dct):
3028 attrs = dct.copy()
31 - if MARSHMALLOW_VERSION_INFO[0] < 3:
32 + if version.parse(MARSHMALLOW_VERSION_INFO) < version.parse("3.0.0"):
3329
34 class Meta(object):
30 class Meta(object):
31 - if MARSHMALLOW_VERSION_INFO[0] < 3:
32 + if version.parse(MARSHMALLOW_VERSION_INFO) < version.parse("3.0.0"):
3533 strict = True
36 @@ -354,7 +355,7 @@ class Parser(object):
34 else:
35 register = False
36 @@ -265,7 +266,7 @@ class Parser(object):
3737 argdict = schema.fields
3838 parsed = {}
3939 for argname, field_obj in iteritems(argdict):
4242 parsed_value = self.parse_arg(argname, field_obj, req, locations)
4343 # If load_from is specified on the field, try to parse from that key
4444 if parsed_value is missing and field_obj.load_from:
45 @@ -378,7 +379,7 @@ class Parser(object):
46 # Raise a webargs error instead
47 kwargs = getattr(error, "kwargs", {})
48 kwargs["data"] = error.data
49 - if MARSHMALLOW_VERSION_INFO[0] < 3:
50 + if version.parse(MARSHMALLOW_VERSION_INFO) < version.parse("3.0.0b12"):
51 kwargs["fields"] = error.fields
52 kwargs["field_names"] = error.field_names
53 else:
54 @@ -432,7 +433,7 @@ class Parser(object):
45 @@ -309,7 +310,7 @@ class Parser(object):
5546 schema = argmap(req)
5647 else:
5748 schema = dict2schema(argmap)()
6051 warnings.warn(
6152 "It is highly recommended that you set strict=True on your schema "
6253 "so that the parser's error handler will be invoked when expected.",
63 @@ -479,7 +480,7 @@ class Parser(object):
64 try:
65 parsed = self._parse_request(schema=schema, req=req, locations=locations)
54 @@ -355,7 +356,7 @@ class Parser(object):
55 schema=schema, req=req, locations=locations or self.locations
56 )
6657 result = schema.load(parsed)
6758 - data = result.data if MARSHMALLOW_VERSION_INFO[0] < 3 else result
6859 + data = result.data if version.parse(MARSHMALLOW_VERSION_INFO) < version.parse("3.0.0b7") else result