summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-04-27 14:17:37 +0200
committerMichał Górny <mgorny@gentoo.org>2020-04-27 14:19:06 +0200
commit132523128a022d765dcb1cf4ff5e077a9500fea5 (patch)
tree94f1fb1f0cee15b0abc4d4f2a768b899f88a2636 /dev-python/flask-restful/files
parentdev-perl/Apache-LogFormat-Compiler: Bump to version 0.360.0 (diff)
downloadgentoo-132523128a022d765dcb1cf4ff5e077a9500fea5.tar.gz
gentoo-132523128a022d765dcb1cf4ff5e077a9500fea5.tar.bz2
gentoo-132523128a022d765dcb1cf4ff5e077a9500fea5.zip
dev-python/flask-restful: Bump to 0.3.8
Closes: https://bugs.gentoo.org/719740 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/flask-restful/files')
-rw-r--r--dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch b/dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch
new file mode 100644
index 000000000000..32b0b7b2b460
--- /dev/null
+++ b/dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch
@@ -0,0 +1,41 @@
+From 73376a488907af3042b52678ac4c23f8a8911e5b Mon Sep 17 00:00:00 2001
+From: Anthony Sottile <asottile@umich.edu>
+Date: Fri, 7 Feb 2020 11:06:15 -0800
+Subject: [PATCH] Fix testsuite for werkzeug 1.x (#862)
+
+---
+ tests/test_api.py | 4 +++-
+ tests/test_reqparse.py | 4 ++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+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