mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: python-flask-restful: Update to 0.3.8.
* gnu/packages/patches/python-flask-restful-werkzeug-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-web.scm (python-flask-restful): Update to 0.3.8. [source](patches): New field. [native-inputs]: Remove PYTHON-SPHINX.
This commit is contained in:
parent
8f29817ed5
commit
0a044f75b5
3 changed files with 41 additions and 4 deletions
|
@ -1327,6 +1327,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
|
%D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
|
||||||
%D%/packages/patches/python-configobj-setuptools.patch \
|
%D%/packages/patches/python-configobj-setuptools.patch \
|
||||||
%D%/packages/patches/python-faker-fix-build-32bit.patch \
|
%D%/packages/patches/python-faker-fix-build-32bit.patch \
|
||||||
|
%D%/packages/patches/python-flask-restful-werkzeug-compat.patch \
|
||||||
%D%/packages/patches/python-keras-integration-test.patch \
|
%D%/packages/patches/python-keras-integration-test.patch \
|
||||||
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
|
%D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \
|
||||||
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
|
%D%/packages/patches/python-pyfakefs-remove-bad-test.patch \
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
We need one patch on top of 0.3.8 for compatibility with Werkzeug 1.0.
|
||||||
|
|
||||||
|
Taken from upstream:
|
||||||
|
https://github.com/flask-restful/flask-restful/commit/73376a488907af3042b52678ac4c23f8a8911e5b
|
||||||
|
|
||||||
|
diff --git a/tests/test_api.py b/tests/test_api.py
|
||||||
|
index f7f8e661..6795d362 100644
|
||||||
|
--- a/tests/test_api.py
|
||||||
|
+++ b/tests/test_api.py
|
||||||
|
@@ -445,7 +445,9 @@ def test_handle_non_api_error(self):
|
||||||
|
|
||||||
|
resp = app.get("/foo")
|
||||||
|
self.assertEquals(resp.status_code, 404)
|
||||||
|
- self.assertEquals('text/html', resp.headers['Content-Type'])
|
||||||
|
+ # in newer versions of werkzeug this is `text/html; charset=utf8`
|
||||||
|
+ content_type, _, _ = resp.headers['Content-Type'].partition(';')
|
||||||
|
+ self.assertEquals('text/html', content_type)
|
||||||
|
|
||||||
|
def test_non_api_error_404_catchall(self):
|
||||||
|
app = Flask(__name__)
|
||||||
|
diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py
|
||||||
|
index 2f1fbedf..9776f17c 100644
|
||||||
|
--- a/tests/test_reqparse.py
|
||||||
|
+++ b/tests/test_reqparse.py
|
||||||
|
@@ -2,9 +2,9 @@
|
||||||
|
import unittest
|
||||||
|
from mock import Mock, patch
|
||||||
|
from flask import Flask
|
||||||
|
-from werkzeug import exceptions, MultiDict
|
||||||
|
+from werkzeug import exceptions
|
||||||
|
from werkzeug.wrappers import Request
|
||||||
|
-from werkzeug.datastructures import FileStorage
|
||||||
|
+from werkzeug.datastructures import FileStorage, MultiDict
|
||||||
|
from flask_restful.reqparse import Argument, RequestParser, Namespace
|
||||||
|
import six
|
||||||
|
import decimal
|
|
@ -2173,14 +2173,15 @@ pretty printer and a tree visitor.")
|
||||||
(define-public python-flask-restful
|
(define-public python-flask-restful
|
||||||
(package
|
(package
|
||||||
(name "python-flask-restful")
|
(name "python-flask-restful")
|
||||||
(version "0.3.7")
|
(version "0.3.8")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "Flask-RESTful" version))
|
(uri (pypi-uri "Flask-RESTful" version))
|
||||||
|
(patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1a9cbwkr6krryyzq4sd3f415nkkc6dyfls5i3pgyibs94g0hw97q"))))
|
"05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-aniso8601" ,python-aniso8601)
|
`(("python-aniso8601" ,python-aniso8601)
|
||||||
|
@ -2191,8 +2192,7 @@ pretty printer and a tree visitor.")
|
||||||
`(;; Optional dependency of Flask. Tests need it.
|
`(;; Optional dependency of Flask. Tests need it.
|
||||||
("python-blinker" ,python-blinker)
|
("python-blinker" ,python-blinker)
|
||||||
("python-mock" ,python-mock) ; For tests
|
("python-mock" ,python-mock) ; For tests
|
||||||
("python-nose" ,python-nose) ; For tests
|
("python-nose" ,python-nose))) ;for tests
|
||||||
("python-sphinx" ,python-sphinx)))
|
|
||||||
(home-page
|
(home-page
|
||||||
"https://www.github.com/flask-restful/flask-restful/")
|
"https://www.github.com/flask-restful/flask-restful/")
|
||||||
(synopsis
|
(synopsis
|
||||||
|
|
Loading…
Reference in a new issue