1 |
commit: 132523128a022d765dcb1cf4ff5e077a9500fea5 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 27 12:17:37 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 27 12:19:06 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13252312 |
7 |
|
8 |
dev-python/flask-restful: Bump to 0.3.8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/719740 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-python/flask-restful/Manifest | 1 + |
14 |
.../files/flask-restful-0.3.8-werkzeug.patch | 41 +++++++++++++++++++++ |
15 |
.../flask-restful/flask-restful-0.3.8.ebuild | 42 ++++++++++++++++++++++ |
16 |
3 files changed, 84 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/flask-restful/Manifest b/dev-python/flask-restful/Manifest |
19 |
index 91f525f45a6..8e2a4ed1803 100644 |
20 |
--- a/dev-python/flask-restful/Manifest |
21 |
+++ b/dev-python/flask-restful/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST flask-restful-0.3.7.tar.gz 114238 BLAKE2B ec960f060b3a1a36e538606d710a57e9d9fb3b1c2c1ee1874c5f7592e9ad8a9a2af4716f820f27ec1a9e55fcb0505ca711c6e045e6cb0ef8c9c64de339871710 SHA512 1d1d066dec5f39af3197b680f791d83df686602b703efe874ea0e81d7f3b65f605dbdb63f84fdd07e469c6824d52571e195ae70f58e1543b53f13a81e1cd8543 |
24 |
+DIST flask-restful-0.3.8.tar.gz 114588 BLAKE2B a18eac613300102bb5a5ca78cea1e6f81f3de21d8bd2e6c72f2f1a559e8b4228175cc7d372b68f131267cd8bc759e354e5782e527d1e992579210348cd2b78dd SHA512 15172114fcedc2f4286cf5f583d95e42c8c8ce6553f9a44e57124f2b1417bf9f094dcb5154a6933ebebc8022f39d4d7969d29d38576111f9d5b45f630b36a66c |
25 |
|
26 |
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 |
27 |
new file mode 100644 |
28 |
index 00000000000..32b0b7b2b46 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/flask-restful/files/flask-restful-0.3.8-werkzeug.patch |
31 |
@@ -0,0 +1,41 @@ |
32 |
+From 73376a488907af3042b52678ac4c23f8a8911e5b Mon Sep 17 00:00:00 2001 |
33 |
+From: Anthony Sottile <asottile@×××××.edu> |
34 |
+Date: Fri, 7 Feb 2020 11:06:15 -0800 |
35 |
+Subject: [PATCH] Fix testsuite for werkzeug 1.x (#862) |
36 |
+ |
37 |
+--- |
38 |
+ tests/test_api.py | 4 +++- |
39 |
+ tests/test_reqparse.py | 4 ++-- |
40 |
+ 2 files changed, 5 insertions(+), 3 deletions(-) |
41 |
+ |
42 |
+diff --git a/tests/test_api.py b/tests/test_api.py |
43 |
+index f7f8e661..6795d362 100644 |
44 |
+--- a/tests/test_api.py |
45 |
++++ b/tests/test_api.py |
46 |
+@@ -445,7 +445,9 @@ def test_handle_non_api_error(self): |
47 |
+ |
48 |
+ resp = app.get("/foo") |
49 |
+ self.assertEquals(resp.status_code, 404) |
50 |
+- self.assertEquals('text/html', resp.headers['Content-Type']) |
51 |
++ # in newer versions of werkzeug this is `text/html; charset=utf8` |
52 |
++ content_type, _, _ = resp.headers['Content-Type'].partition(';') |
53 |
++ self.assertEquals('text/html', content_type) |
54 |
+ |
55 |
+ def test_non_api_error_404_catchall(self): |
56 |
+ app = Flask(__name__) |
57 |
+diff --git a/tests/test_reqparse.py b/tests/test_reqparse.py |
58 |
+index 2f1fbedf..9776f17c 100644 |
59 |
+--- a/tests/test_reqparse.py |
60 |
++++ b/tests/test_reqparse.py |
61 |
+@@ -2,9 +2,9 @@ |
62 |
+ import unittest |
63 |
+ from mock import Mock, patch |
64 |
+ from flask import Flask |
65 |
+-from werkzeug import exceptions, MultiDict |
66 |
++from werkzeug import exceptions |
67 |
+ from werkzeug.wrappers import Request |
68 |
+-from werkzeug.datastructures import FileStorage |
69 |
++from werkzeug.datastructures import FileStorage, MultiDict |
70 |
+ from flask_restful.reqparse import Argument, RequestParser, Namespace |
71 |
+ import six |
72 |
+ import decimal |
73 |
|
74 |
diff --git a/dev-python/flask-restful/flask-restful-0.3.8.ebuild b/dev-python/flask-restful/flask-restful-0.3.8.ebuild |
75 |
new file mode 100644 |
76 |
index 00000000000..6c63dc0f595 |
77 |
--- /dev/null |
78 |
+++ b/dev-python/flask-restful/flask-restful-0.3.8.ebuild |
79 |
@@ -0,0 +1,42 @@ |
80 |
+# Copyright 1999-2020 Gentoo Authors |
81 |
+# Distributed under the terms of the GNU General Public License v2 |
82 |
+ |
83 |
+EAPI=7 |
84 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
85 |
+ |
86 |
+inherit distutils-r1 |
87 |
+ |
88 |
+DESCRIPTION="Simple framework for creating REST APIs" |
89 |
+HOMEPAGE="https://flask-restful.readthedocs.io/en/latest/ https://github.com/twilio/flask-restful/" |
90 |
+SRC_URI="https://github.com/twilio/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="BSD" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~arm64 ~x86" |
95 |
+IUSE="examples" |
96 |
+ |
97 |
+RDEPEND=" |
98 |
+ >=dev-python/aniso8601-0.82[${PYTHON_USEDEP}] |
99 |
+ >=dev-python/flask-0.8[${PYTHON_USEDEP}] |
100 |
+ >=dev-python/six-1.3.0[${PYTHON_USEDEP}] |
101 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
102 |
+" |
103 |
+DEPEND=" |
104 |
+ test? ( |
105 |
+ dev-python/mock[${PYTHON_USEDEP}] |
106 |
+ ) |
107 |
+" |
108 |
+ |
109 |
+distutils_enable_sphinx docs |
110 |
+distutils_enable_tests nose |
111 |
+ |
112 |
+PATCHES=( |
113 |
+ "${FILESDIR}"/flask-restful-0.3.8-werkzeug.patch |
114 |
+) |
115 |
+ |
116 |
+python_install_all() { |
117 |
+ use examples && dodoc -r examples |
118 |
+ local DOCS=( AUTHORS.md CHANGES.md CONTRIBUTING.md README.md ) |
119 |
+ |
120 |
+ distutils-r1_python_install_all |
121 |
+} |