From 3a514142a2747f2b9430df00bfe6ef39b76c668b579e67e45f05877ee687a08d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 23 Apr 2022 09:31:42 +0000 Subject: [PATCH] Accepting request 972239 from home:bnavigator:branches:devel:languages:python - add httpbin-pr674-wekzeug2.1.patch for Werkzeug 2.1 compatibility gh#postmanlabs/httpbin#674 OBS-URL: https://build.opensuse.org/request/show/972239 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpbin?expand=0&rev=21 --- httpbin-pr674-wekzeug2.1.patch | 32 ++++++++++++++++++++++++++++++++ python-httpbin.changes | 6 ++++++ python-httpbin.spec | 6 ++++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 httpbin-pr674-wekzeug2.1.patch diff --git a/httpbin-pr674-wekzeug2.1.patch b/httpbin-pr674-wekzeug2.1.patch new file mode 100644 index 0000000..5696f4c --- /dev/null +++ b/httpbin-pr674-wekzeug2.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/python-httpbin.changes b/python-httpbin.changes index a2025f0..c09b088 100644 --- a/python-httpbin.changes +++ b/python-httpbin.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 22 19:17:15 UTC 2022 - Ben Greiner + +- add httpbin-pr674-wekzeug2.1.patch for Werkzeug 2.1 compatibility + gh#postmanlabs/httpbin#674 + ------------------------------------------------------------------- Tue Apr 12 20:36:37 UTC 2022 - Ben Greiner diff --git a/python-httpbin.spec b/python-httpbin.spec index 2b15714..c5db519 100644 --- a/python-httpbin.spec +++ b/python-httpbin.spec @@ -27,10 +27,12 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/Runscope/httpbin Source: python-httpbin-%{version}.tar.xz -# https://github.com/postmanlabs/httpbin/pull/555 +# PATCH-FIX-UPSTREAM werkzeug.patch -- gh#postmanlabs/httpbin#555 Patch0: werkzeug.patch -# Based on https://github.com/postmanlabs/httpbin/pull/553 +# PATCH-FIX-UPSTREAM fix-setup-py.patch -- gh#postmanlabs/httpbin#553 Patch1: fix-setup-py.patch +# PATCH-FIX-UPSTREAM httpbin-pr674-wekzeug2.1.patch -- gh#postmanlabs/httpbin#674 +Patch2: httpbin-pr674-wekzeug2.1.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Flask >= 2.1} BuildRequires: %{python_module MarkupSafe}