ignatenkobrain pushed to python-flask-restful (epel8). "Update to
0.3.7 (..more)"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From 0f231bb10f1e23a895eb361c688d04a78c33f07f Mon Sep 17 00:00:00 2001
From: František Zatloukal <fzatlouk(a)redhat.com>
Date: Feb 12 2019 11:13:16 +0000
Subject: Update to 0.3.7
Drop some patches, drop python 2 support
---
diff --git a/.gitignore b/.gitignore
index 159afee..7d51e81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/0.3.4.tar.gz
/0.3.5.tar.gz
/0.3.6.tar.gz
+/0.3.7.tar.gz
diff --git a/0001-Fix-arguments-with-type-list-705.patch b/0001-Fix-arguments-with-type-list-705.patch
deleted file mode 100644
index 5f39816..0000000
--- a/0001-Fix-arguments-with-type-list-705.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From f71b4f61d96c43748ca1cb9002f874a8d8276312 Mon Sep 17 00:00:00 2001
-From: Stephen Pascoe <stephen.pascoe(a)lirico.co.uk>
-Date: Wed, 4 Oct 2017 01:01:47 +0100
-Subject: [PATCH] Fix arguments with type=list (#705)
-
-Closes #681
----
- flask_restful/reqparse.py | 2 +-
- tests/test_reqparse.py | 25 +++++++++++++++++++++++++
- 2 files changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/flask_restful/reqparse.py b/flask_restful/reqparse.py
-index 8fe142e..527bc94 100644
---- flask_restful/reqparse.py
-+++ flask_restful/reqparse.py
-@@ -176,7 +176,7 @@ class Argument(object):
- values = source.getlist(name)
- else:
- values = source.get(name)
-- if not isinstance(values, collections.MutableSequence):
-+ if not (isinstance(values, collections.MutableSequence) and self.action == 'append'):
- values = [values]
-
- for value in values:
-diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
-index ce9ce30..df18ead 100644
---- tests/test_reqparse.py
-+++ tests/test_reqparse.py
-@@ -891,5 +891,30 @@ class ReqParseTestCase(unittest.TestCase):
- self.assertEquals(args['int1'], 1)
- self.assertEquals(args['int2'], 2)
-
-+ def test_list_argument(self):
-+ app = Flask(__name__)
-+
-+ parser = RequestParser()
-+ parser.add_argument('arg1', location='json', type=list)
-+
-+ with app.test_request_context('/bubble', method="post",
-+ data=json.dumps({'arg1': ['foo', 'bar']}),
-+ content_type='application/json'):
-+ args = parser.parse_args()
-+ self.assertEquals(args['arg1'], ['foo', 'bar'])
-+
-+ def test_list_argument_dict(self):
-+ app = Flask(__name__)
-+
-+ parser = RequestParser()
-+ parser.add_argument('arg1', location='json', type=list)
-+
-+ with app.test_request_context('/bubble', method="post",
-+ data=json.dumps({'arg1': [{'foo': 1, 'bar': 2}]}),
-+ content_type='application/json'):
-+ args = parser.parse_args()
-+ self.assertEquals(args['arg1'], [{'foo': 1, 'bar': 2}])
-+
-+
- if __name__ == '__main__':
- unittest.main()
---
-2.17.0.rc1
-
diff --git a/0002-Support-aniso8601-3.0-in-tests.patch b/0002-Support-aniso8601-3.0-in-tests.patch
deleted file mode 100644
index 832bce9..0000000
--- a/0002-Support-aniso8601-3.0-in-tests.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 54979f0a49b2217babc53c5b65b5df10b6de8e05 Mon Sep 17 00:00:00 2001
-From: Josh Friend <josh(a)fueledbycaffeine.com>
-Date: Thu, 29 Mar 2018 14:55:35 -0400
-Subject: [PATCH] Support aniso8601 >3.0 in tests
-
----
- tests/test_inputs.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/test_inputs.py b/tests/test_inputs.py
-index 90a2fb0..6cb9e9b 100644
---- tests/test_inputs.py
-+++ tests/test_inputs.py
-@@ -417,7 +417,7 @@ def test_bad_isointervals():
- for bad_interval in bad_intervals:
- yield (
- assert_raises,
-- ValueError,
-+ Exception,
- inputs.iso8601interval,
- bad_interval,
- )
---
-2.17.0
-
diff --git a/0003-Fix-tests_api-list-traceback.patch b/0003-Fix-tests_api-list-traceback.patch
deleted file mode 100644
index 77cc629..0000000
--- a/0003-Fix-tests_api-list-traceback.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-commit dfd60ce7c656d95afc2e7c4c1e03be2982cc9a9d
-Author: Kamil Páral <kparal(a)redhat.com>
-Date: Tue Jun 26 12:06:37 2018 +0200
-
- test_api: fix traceback
-
- This is fixed:
- ```
- Traceback (most recent call last):
- File "/builddir/build/BUILD/flask-restful-0.3.6/tests/test_api.py", line 787, in test_fr_405
- set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
- TypeError: can only concatenate list (not "set") to list
- ```
-
-diff --git a/tests/test_api.py b/tests/test_api.py
-index 26447ae..f34b3f6 100644
---- a/tests/test_api.py
-+++ b/tests/test_api.py
-@@ -784,7 +784,7 @@ class APITestCase(unittest.TestCase):
- allow = ', '.join(set(resp.headers.get_all('Allow')))
- allow = set(method.strip() for method in allow.split(','))
- self.assertEquals(allow,
-- set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
-+ set(['HEAD', 'OPTIONS'] + list(HelloWorld.methods)))
-
- def test_exception_header_forwarded(self):
- """Test that HTTPException's headers are extended properly"""
diff --git a/python-flask-restful.remove_q0_testcase.patch b/python-flask-restful.remove_q0_testcase.patch
deleted file mode 100644
index 1a50171..0000000
--- a/python-flask-restful.remove_q0_testcase.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- tests/test_accept.py.orig 2015-11-13 12:06:18.914003153 +0100
-+++ tests/test_accept.py 2015-11-13 12:04:42.786435117 +0100
-@@ -121,26 +121,6 @@
- assert_equals(res.content_type, 'text/plain')
-
-
-- def test_accept_no_default_match_q0_not_acceptable(self):
-- """
-- q=0 should be considered NotAcceptable,
-- but this depends on werkzeug >= 1.0 which is not yet released
-- so this test is expected to fail until we depend on werkzeug >= 1.0
-- """
-- class Foo(flask_restful.Resource):
-- def get(self):
-- return "data"
--
-- app = Flask(__name__)
-- api = flask_restful.Api(app, default_mediatype=None)
--
-- api.add_resource(Foo, '/')
--
-- with app.test_client() as client:
-- res = client.get('/', headers=[('Accept', 'application/json; q=0')])
-- assert_equals(res.status_code, 406)
-- assert_equals(res.content_type, 'application/json')
--
- def test_accept_no_default_accept_highest_quality_of_two(self):
- class Foo(flask_restful.Resource):
- def get(self):
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index 2ad548b..b69d008 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -1,61 +1,18 @@
-%if 0%{?rhel} && 0%{?rhel} <= 6
-%{!?__python2: %global __python2 /usr/bin/python}
-%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%endif
-
-%if 0%{?fedora}
-%global with_python3 1
-%endif
-
%global srcname flask-restful
%global sum Simple framework for creating REST APIs for Flask
Name: python-%{srcname}
-Version: 0.3.6
-Release: 9%{?dist}
+Version: 0.3.7
+Release: 1%{?dist}
Summary: %{sum}
License: BSD
URL: https://www.github.com/%{srcname}/%{srcname}/
Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}.tar.gz
Patch0: python-flask-restful.remove_q0_testcase.patch
-Patch1: 0001-Fix-arguments-with-type-list-705.patch
-Patch2: 0002-Support-aniso8601-3.0-in-tests.patch
-# https://github.com/flask-restful/flask-restful/pull/762
-# should be hopefully merged into release > 0.3.6
-Patch3: 0003-Fix-tests_api-list-traceback.patch
BuildArch: noarch
-# those are needed for tests:
-%if 0%{?rhel} || 0%{?fedora} <= 27
-BuildRequires: python-flask
-BuildRequires: python-six
-BuildRequires: python-aniso8601
-BuildRequires: pytz
-%else
-BuildRequires: python2-flask
-BuildRequires: python2-six
-BuildRequires: python2-aniso8601
-BuildRequires: python2-pytz
-%endif
-BuildRequires: python2-devel
-
-%if 0%{?rhel} || 0%{?fedora} <= 27
-BuildRequires: python-setuptools
-BuildRequires: python-nose
-BuildRequires: python-mock
-BuildRequires: python-blinker
-BuildRequires: python-crypto
-%else
-BuildRequires: python2-setuptools
-BuildRequires: python2-nose
-BuildRequires: python2-mock
-BuildRequires: python2-blinker
-BuildRequires: python2-crypto
-%endif
-
-%if 0%{?with_python3}
+
BuildRequires: python3-flask
BuildRequires: python3-six
BuildRequires: python3-aniso8601
@@ -66,34 +23,12 @@ BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-blinker
BuildRequires: python3-crypto
-%endif
%description
Flask-RESTful is Python extension for Flask that adds support
for quickly building REST APIs. It is a lightweight abstraction
that works with your existing ORM/libraries.
-%package -n python2-%{srcname}
-Summary: %{sum}
-%if 0%{?rhel} || 0%{?fedora} <= 27
-Requires: python-flask
-Requires: python-six
-Requires: python-aniso8601
-Requires: pytz
-%else
-Requires: python2-flask
-Requires: python2-six
-Requires: python2-aniso8601
-Requires: python2-pytz
-%endif
-%{?python_provide:%python_provide python2-%{srcname}}
-
-%description -n python2-%{srcname}
-Flask-RESTful is Python 2 extension for Flask that adds support
-for quickly building REST APIs. It is a lightweight abstraction
-that works with your existing ORM/libraries.
-
-%if 0%{?with_python3}
%package -n python3-%{srcname}
Summary: %{sum}
Requires: python3-flask
@@ -106,47 +41,35 @@ Requires: python3-pytz
Flask-RESTful is Python 3 extension for Flask that adds support
for quickly building REST APIs. It is a lightweight abstraction
that works with your existing ORM/libraries.
-%endif
%prep
%setup -qn %{srcname}-%{version}
rm -rf docs/_themes/.gitignore
-%patch0
-%patch1
-%patch2
-%patch3 -p1
%build
-%py2_build
-%if 0%{?with_python3}
%py3_build
-%endif
%install
-%py2_install
-%if 0%{?with_python3}
%py3_install
-%endif
%check
-%{__python2} setup.py test
-%if 0%{?with_python3}
%{__python3} setup.py test
-%endif
-%files -n python2-%{srcname}
-%doc AUTHORS.md README.md examples/ docs/
-%license LICENSE
-%{python2_sitelib}/*
-
-%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc AUTHORS.md README.md examples/ docs/
%license LICENSE
%{python3_sitelib}/*
-%endif
%changelog
+* Tue Feb 12 2019 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 0.3.7-1
+- Update to upstream 0.3.7 release
+- Drop upstreamed patch: 0003-Fix-tests_api-list-traceback.patch
+- Drop upstreamed patch: 0001-Fix-arguments-with-type-list-705.patch
+- Drop upstreamed patch: 0002-Support-aniso8601-3.0-in-tests.patch
+- Drop no longer needed patch: python-flask-restful.remove_q0_testcase.patch
+- Drop Fedora 27 support
+- Drop Python 2 support
+
* Sat Feb 02 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.3.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/sources b/sources
index cf99200..b98666d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (0.3.6.tar.gz) = c5136302111e6c8953e038d31b42b029744111bb916dea7ec8bd5fac2de5e17a86d30a7d04a7335cdc5da25ee13f35ad9a6d284166e11cca0c6fec96d23fd977
+SHA512 (0.3.7.tar.gz) = 1d1d066dec5f39af3197b680f791d83df686602b703efe874ea0e81d7f3b65f605dbdb63f84fdd07e469c6824d52571e195ae70f58e1543b53f13a81e1cd8543
https://src.fedoraproject.org/rpms/python-flask-restful/c/0f231bb10f1e23a...
1 year, 10 months
ignatenkobrain pushed to python-flask-restful (epel8). "fix traceback
in test_api.py during build"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From 1620e90a153a6cd284a03903abfd9710a2357335 Mon Sep 17 00:00:00 2001
From: Kamil Páral <kparal(a)redhat.com>
Date: Jun 26 2018 10:36:26 +0000
Subject: fix traceback in test_api.py during build
---
diff --git a/0003-Fix-tests_api-list-traceback.patch b/0003-Fix-tests_api-list-traceback.patch
new file mode 100644
index 0000000..77cc629
--- /dev/null
+++ b/0003-Fix-tests_api-list-traceback.patch
@@ -0,0 +1,27 @@
+commit dfd60ce7c656d95afc2e7c4c1e03be2982cc9a9d
+Author: Kamil Páral <kparal(a)redhat.com>
+Date: Tue Jun 26 12:06:37 2018 +0200
+
+ test_api: fix traceback
+
+ This is fixed:
+ ```
+ Traceback (most recent call last):
+ File "/builddir/build/BUILD/flask-restful-0.3.6/tests/test_api.py", line 787, in test_fr_405
+ set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
+ TypeError: can only concatenate list (not "set") to list
+ ```
+
+diff --git a/tests/test_api.py b/tests/test_api.py
+index 26447ae..f34b3f6 100644
+--- a/tests/test_api.py
++++ b/tests/test_api.py
+@@ -784,7 +784,7 @@ class APITestCase(unittest.TestCase):
+ allow = ', '.join(set(resp.headers.get_all('Allow')))
+ allow = set(method.strip() for method in allow.split(','))
+ self.assertEquals(allow,
+- set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
++ set(['HEAD', 'OPTIONS'] + list(HelloWorld.methods)))
+
+ def test_exception_header_forwarded(self):
+ """Test that HTTPException's headers are extended properly"""
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index fc666cf..4da7480 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -13,7 +13,7 @@
Name: python-%{srcname}
Version: 0.3.6
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: %{sum}
Group: Development/Languages
@@ -23,6 +23,9 @@ Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}.tar.
Patch0: python-flask-restful.remove_q0_testcase.patch
Patch1: 0001-Fix-arguments-with-type-list-705.patch
Patch2: 0002-Support-aniso8601-3.0-in-tests.patch
+# https://github.com/flask-restful/flask-restful/pull/762
+# should be hopefully merged into release > 0.3.6
+Patch3: 0003-Fix-tests_api-list-traceback.patch
BuildArch: noarch
# those are needed for tests:
@@ -112,6 +115,7 @@ rm -rf docs/_themes/.gitignore
%patch0
%patch1
%patch2
+%patch3 -p1
%build
%py2_build
@@ -144,6 +148,9 @@ rm -rf docs/_themes/.gitignore
%endif
%changelog
+* Tue Jun 26 2018 Kamil Páral <kparal(a)redhat.com> - 0.3.6-7
+- Add Patch3 to fix tests
+
* Tue Jun 19 2018 Miro Hrončok <mhroncok(a)redhat.com> - 0.3.6-6
- Rebuilt for Python 3.7
https://src.fedoraproject.org/rpms/python-flask-restful/c/1620e90a153a6cd...
1 year, 10 months
ignatenkobrain pushed to python-flask-restful (epel8). "Rebuilt for
Python 3.7"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From a23fc551ad92ba0628593e09e505dfdd3dac5607 Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro(a)hroncok.cz>
Date: Jun 19 2018 09:43:53 +0000
Subject: Rebuilt for Python 3.7
---
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index cff8499..fc666cf 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -13,7 +13,7 @@
Name: python-%{srcname}
Version: 0.3.6
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: %{sum}
Group: Development/Languages
@@ -144,6 +144,9 @@ rm -rf docs/_themes/.gitignore
%endif
%changelog
+* Tue Jun 19 2018 Miro Hrončok <mhroncok(a)redhat.com> - 0.3.6-6
+- Rebuilt for Python 3.7
+
* Tue Jun 19 2018 Miro Hrončok <mhroncok(a)redhat.com> - 0.3.6-5
- Rebuilt for Python 3.7
https://src.fedoraproject.org/rpms/python-flask-restful/c/a23fc551ad92ba0...
1 year, 10 months
ignatenkobrain pushed to python-flask-restful (epel8). "Rebuilt for
Python 3.7"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From 3c8f3ce7b2d0a938622a352347dd5c02d7e5a383 Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro(a)hroncok.cz>
Date: Jun 19 2018 09:02:28 +0000
Subject: Rebuilt for Python 3.7
---
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index 9e4df58..cff8499 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -13,7 +13,7 @@
Name: python-%{srcname}
Version: 0.3.6
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: %{sum}
Group: Development/Languages
@@ -144,6 +144,9 @@ rm -rf docs/_themes/.gitignore
%endif
%changelog
+* Tue Jun 19 2018 Miro Hrončok <mhroncok(a)redhat.com> - 0.3.6-5
+- Rebuilt for Python 3.7
+
* Mon Jun 04 2018 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 0.3.6-4
- Backport upstream fix: Support-aniso8601-3.0-in-tests
https://src.fedoraproject.org/rpms/python-flask-restful/c/3c8f3ce7b2d0a93...
1 year, 10 months
ignatenkobrain pushed to python-flask-restful (epel8).
"Support-aniso8601-3.0-in-tests"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From 19b62a28cd0120f11aec448acbe28b208450e10f Mon Sep 17 00:00:00 2001
From: František Zatloukal <fzatlouk(a)redhat.com>
Date: Jun 04 2018 11:30:15 +0000
Subject: Support-aniso8601-3.0-in-tests
---
diff --git a/0002-Support-aniso8601-3.0-in-tests.patch b/0002-Support-aniso8601-3.0-in-tests.patch
new file mode 100644
index 0000000..832bce9
--- /dev/null
+++ b/0002-Support-aniso8601-3.0-in-tests.patch
@@ -0,0 +1,25 @@
+From 54979f0a49b2217babc53c5b65b5df10b6de8e05 Mon Sep 17 00:00:00 2001
+From: Josh Friend <josh(a)fueledbycaffeine.com>
+Date: Thu, 29 Mar 2018 14:55:35 -0400
+Subject: [PATCH] Support aniso8601 >3.0 in tests
+
+---
+ tests/test_inputs.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/test_inputs.py b/tests/test_inputs.py
+index 90a2fb0..6cb9e9b 100644
+--- tests/test_inputs.py
++++ tests/test_inputs.py
+@@ -417,7 +417,7 @@ def test_bad_isointervals():
+ for bad_interval in bad_intervals:
+ yield (
+ assert_raises,
+- ValueError,
++ Exception,
+ inputs.iso8601interval,
+ bad_interval,
+ )
+--
+2.17.0
+
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index eec5398..9e4df58 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -13,7 +13,7 @@
Name: python-%{srcname}
Version: 0.3.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: %{sum}
Group: Development/Languages
@@ -22,6 +22,7 @@ URL: https://www.github.com/%{srcname}/%{srcname}/
Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}.tar.gz
Patch0: python-flask-restful.remove_q0_testcase.patch
Patch1: 0001-Fix-arguments-with-type-list-705.patch
+Patch2: 0002-Support-aniso8601-3.0-in-tests.patch
BuildArch: noarch
# those are needed for tests:
@@ -110,6 +111,7 @@ that works with your existing ORM/libraries.
rm -rf docs/_themes/.gitignore
%patch0
%patch1
+%patch2
%build
%py2_build
@@ -142,6 +144,9 @@ rm -rf docs/_themes/.gitignore
%endif
%changelog
+* Mon Jun 04 2018 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 0.3.6-4
+- Backport upstream fix: Support-aniso8601-3.0-in-tests
+
* Thu Mar 29 2018 Frantisek Zatloukal <fzatlouk(a)redhat.com> - 0.3.6-3
- Backport upstream fix: Fix-arguments-with-type-list-705
https://src.fedoraproject.org/rpms/python-flask-restful/c/19b62a28cd0120f...
1 year, 10 months
ignatenkobrain pushed to python-flask-restful (epel8). "Whoops,
remove patch file from sources, fix build"
by notifications@fedoraproject.org
Notification time stamped 2021-03-31 17:01:14 UTC
From 0aaae70337f7c0ebc56d7827da228e7010ec03a7 Mon Sep 17 00:00:00 2001
From: František Zatloukal <fzatlouk(a)redhat.com>
Date: Mar 29 2018 11:11:29 +0000
Subject: Whoops, remove patch file from sources, fix build
---
diff --git a/.gitignore b/.gitignore
index 02dc4fe..159afee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
/0.3.4.tar.gz
/0.3.5.tar.gz
/0.3.6.tar.gz
-/0001-Fix-arguments-with-type-list-705.patch
diff --git a/0001-Fix-arguments-with-type-list-705.patch b/0001-Fix-arguments-with-type-list-705.patch
new file mode 100644
index 0000000..5f39816
--- /dev/null
+++ b/0001-Fix-arguments-with-type-list-705.patch
@@ -0,0 +1,62 @@
+From f71b4f61d96c43748ca1cb9002f874a8d8276312 Mon Sep 17 00:00:00 2001
+From: Stephen Pascoe <stephen.pascoe(a)lirico.co.uk>
+Date: Wed, 4 Oct 2017 01:01:47 +0100
+Subject: [PATCH] Fix arguments with type=list (#705)
+
+Closes #681
+---
+ flask_restful/reqparse.py | 2 +-
+ tests/test_reqparse.py | 25 +++++++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 1 deletion(-)
+
+diff --git a/flask_restful/reqparse.py b/flask_restful/reqparse.py
+index 8fe142e..527bc94 100644
+--- flask_restful/reqparse.py
++++ flask_restful/reqparse.py
+@@ -176,7 +176,7 @@ class Argument(object):
+ values = source.getlist(name)
+ else:
+ values = source.get(name)
+- if not isinstance(values, collections.MutableSequence):
++ if not (isinstance(values, collections.MutableSequence) and self.action == 'append'):
+ values = [values]
+
+ for value in values:
+diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
+index ce9ce30..df18ead 100644
+--- tests/test_reqparse.py
++++ tests/test_reqparse.py
+@@ -891,5 +891,30 @@ class ReqParseTestCase(unittest.TestCase):
+ self.assertEquals(args['int1'], 1)
+ self.assertEquals(args['int2'], 2)
+
++ def test_list_argument(self):
++ app = Flask(__name__)
++
++ parser = RequestParser()
++ parser.add_argument('arg1', location='json', type=list)
++
++ with app.test_request_context('/bubble', method="post",
++ data=json.dumps({'arg1': ['foo', 'bar']}),
++ content_type='application/json'):
++ args = parser.parse_args()
++ self.assertEquals(args['arg1'], ['foo', 'bar'])
++
++ def test_list_argument_dict(self):
++ app = Flask(__name__)
++
++ parser = RequestParser()
++ parser.add_argument('arg1', location='json', type=list)
++
++ with app.test_request_context('/bubble', method="post",
++ data=json.dumps({'arg1': [{'foo': 1, 'bar': 2}]}),
++ content_type='application/json'):
++ args = parser.parse_args()
++ self.assertEquals(args['arg1'], [{'foo': 1, 'bar': 2}])
++
++
+ if __name__ == '__main__':
+ unittest.main()
+--
+2.17.0.rc1
+
diff --git a/sources b/sources
index bac41ea..cf99200 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (0001-Fix-arguments-with-type-list-705.patch) = 8e5982644007fddbf9f73af916ea23d26225a940b2c46663cffc2694ba5c81172d1f39c9bd7efb5157f76bb929e5d8120b6623e1898c9aac340876542044d3c6
+SHA512 (0.3.6.tar.gz) = c5136302111e6c8953e038d31b42b029744111bb916dea7ec8bd5fac2de5e17a86d30a7d04a7335cdc5da25ee13f35ad9a6d284166e11cca0c6fec96d23fd977
https://src.fedoraproject.org/rpms/python-flask-restful/c/0aaae70337f7c0e...
1 year, 10 months