mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-python/flask-restful: Bump to 0.3.8
Closes: https://bugs.gentoo.org/719740 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
42
dev-python/flask-restful/flask-restful-0.3.8.ebuild
Normal file
42
dev-python/flask-restful/flask-restful-0.3.8.ebuild
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user