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
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')
-rw-r--r--dev-python/flask-restful/Manifest1
-rw-r--r--dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch41
-rw-r--r--dev-python/flask-restful/flask-restful-0.3.8.ebuild42
3 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/flask-restful/Manifest b/dev-python/flask-restful/Manifest
index 91f525f45a67..8e2a4ed18038 100644
--- a/dev-python/flask-restful/Manifest
+++ b/dev-python/flask-restful/Manifest
@@ -1 +1,2 @@
DIST flask-restful-0.3.7.tar.gz 114238 BLAKE2B ec960f060b3a1a36e538606d710a57e9d9fb3b1c2c1ee1874c5f7592e9ad8a9a2af4716f820f27ec1a9e55fcb0505ca711c6e045e6cb0ef8c9c64de339871710 SHA512 1d1d066dec5f39af3197b680f791d83df686602b703efe874ea0e81d7f3b65f605dbdb63f84fdd07e469c6824d52571e195ae70f58e1543b53f13a81e1cd8543
+DIST flask-restful-0.3.8.tar.gz 114588 BLAKE2B a18eac613300102bb5a5ca78cea1e6f81f3de21d8bd2e6c72f2f1a559e8b4228175cc7d372b68f131267cd8bc759e354e5782e527d1e992579210348cd2b78dd SHA512 15172114fcedc2f4286cf5f583d95e42c8c8ce6553f9a44e57124f2b1417bf9f094dcb5154a6933ebebc8022f39d4d7969d29d38576111f9d5b45f630b36a66c
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
diff --git a/dev-python/flask-restful/flask-restful-0.3.8.ebuild b/dev-python/flask-restful/flask-restful-0.3.8.ebuild
new file mode 100644
index 000000000000..6c63dc0f5957
--- /dev/null
+++ b/dev-python/flask-restful/flask-restful-0.3.8.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Simple framework for creating REST APIs"
+HOMEPAGE="https://flask-restful.readthedocs.io/en/latest/ https://github.com/twilio/flask-restful/"
+SRC_URI="https://github.com/twilio/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="examples"
+
+RDEPEND="
+ >=dev-python/aniso8601-0.82[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.8[${PYTHON_USEDEP}]
+ >=dev-python/six-1.3.0[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+"
+DEPEND="
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_sphinx docs
+distutils_enable_tests nose
+
+PATCHES=(
+ "${FILESDIR}"/flask-restful-0.3.8-werkzeug.patch
+)
+
+python_install_all() {
+ use examples && dodoc -r examples
+ local DOCS=( AUTHORS.md CHANGES.md CONTRIBUTING.md README.md )
+
+ distutils-r1_python_install_all
+}