From 132523128a022d765dcb1cf4ff5e077a9500fea5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Mon, 27 Apr 2020 14:17:37 +0200 Subject: [PATCH] dev-python/flask-restful: Bump to 0.3.8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/719740 Signed-off-by: Michał Górny --- dev-python/flask-restful/Manifest | 1 + .../files/flask-restful-0.3.8-werkzeug.patch | 41 ++++++++++++++++++ .../flask-restful/flask-restful-0.3.8.ebuild | 42 +++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch create mode 100644 dev-python/flask-restful/flask-restful-0.3.8.ebuild 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 +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 +} -- 2.26.2