From bce18f25da9def0bc03a6c5a354c85c3badd6e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 7 Apr 2022 11:09:55 +0200 Subject: [PATCH] dev-python/httpbin: Fix compat with werkzeug-2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../files/httpbin-0.7.0-werkzeug-2.1.patch | 32 +++++++++++ dev-python/httpbin/httpbin-0.7.0-r4.ebuild | 9 ++- dev-python/httpbin/httpbin-0.7.0-r5.ebuild | 56 +++++++++++++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch create mode 100644 dev-python/httpbin/httpbin-0.7.0-r5.ebuild diff --git a/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch new file mode 100644 index 0000000000000..cf7871268d999 --- /dev/null +++ b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch @@ -0,0 +1,32 @@ +From 5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b Mon Sep 17 00:00:00 2001 +From: Maximino BOGADO +Date: Wed, 30 Mar 2022 16:26:31 +0200 +Subject: [PATCH] Replace BaseResponse to Response class (new werkzeug version + 2.1.0) + +--- + httpbin/core.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/httpbin/core.py b/httpbin/core.py +index 305c9882..2bad408e 100644 +--- a/httpbin/core.py ++++ b/httpbin/core.py +@@ -29,7 +29,7 @@ + from six.moves import range as xrange + from werkzeug.datastructures import WWWAuthenticate, MultiDict + from werkzeug.http import http_date +-from werkzeug.wrappers import BaseResponse ++from werkzeug.wrappers import Response + from werkzeug.http import parse_authorization_header + from flasgger import Swagger, NO_SANITIZER + +@@ -77,7 +77,7 @@ def jsonify(*args, **kwargs): + + + # Prevent WSGI from correcting the casing of the Location header +-BaseResponse.autocorrect_location_header = False ++Response.autocorrect_location_header = False + + # Find the correct template folder when running from a different location + tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates") diff --git a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild index df999b5429a08..7750896348d1c 100644 --- a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild +++ b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild @@ -9,8 +9,10 @@ PYTHON_COMPAT=( python3_{8..10} pypy3 ) inherit distutils-r1 DESCRIPTION="HTTP Request and Response Service" -HOMEPAGE="https://github.com/postmanlabs/httpbin - https://pypi.org/project/httpbin/" +HOMEPAGE=" + https://github.com/postmanlabs/httpbin/ + https://pypi.org/project/httpbin/ +" SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" @@ -24,7 +26,8 @@ RDEPEND=" dev-python/itsdangerous[${PYTHON_USEDEP}] dev-python/markupsafe[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] - >=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]" +