From 8999a4f3d51d6a805471fa25355b63e5ade3d8fcbf82e7ea7289d2e0b4a5d953 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 21 Jun 2023 08:36:08 +0000 Subject: [PATCH] - Add patch support-werkzeug-2.3.patch, support Werkzeug 2.3. (bsc#1212557) - Remove now unneeded blinker from {Build,}Requires. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpbin?expand=0&rev=25 --- python-httpbin.changes | 7 +++++++ python-httpbin.spec | 6 ++---- support-werkzeug-2.3.patch | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 support-werkzeug-2.3.patch diff --git a/python-httpbin.changes b/python-httpbin.changes index dfe3613..2e25630 100644 --- a/python-httpbin.changes +++ b/python-httpbin.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Jun 21 08:35:31 UTC 2023 - Steve Kowalik + +- Add patch support-werkzeug-2.3.patch, support Werkzeug 2.3. + (bsc#1212557) +- Remove now unneeded blinker from {Build,}Requires. + ------------------------------------------------------------------- Fri Apr 21 12:26:18 UTC 2023 - Dirk Müller diff --git a/python-httpbin.spec b/python-httpbin.spec index 9b6ff45..60bf3a3 100644 --- a/python-httpbin.spec +++ b/python-httpbin.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} # The PyPI version is 0.7.0 but the metadata reads an internal file with version 0.9.2 %define internalversion 0.9.2 %{?sle15_python_module_pythons} @@ -25,7 +24,6 @@ Version: 0.7.0+git20181107.f8ec666 Release: 0 Summary: HTTP Request and Response Service License: MIT -Group: Development/Languages/Python URL: https://github.com/Runscope/httpbin Source: python-httpbin-%{version}.tar.xz # PATCH-FIX-UPSTREAM werkzeug.patch -- gh#postmanlabs/httpbin#555 @@ -34,11 +32,12 @@ Patch0: werkzeug.patch Patch1: fix-setup-py.patch # PATCH-FIX-UPSTREAM httpbin-pr674-wekzeug2.1.patch -- gh#postmanlabs/httpbin#674 Patch2: httpbin-pr674-wekzeug2.1.patch +# PATCH-FIX-OPENSUSE Support Werkzeug >= 2.3 +Patch3: support-werkzeug-2.3.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Flask >= 2.1} BuildRequires: %{python_module MarkupSafe} BuildRequires: %{python_module Werkzeug >= 2.0} -BuildRequires: %{python_module blinker} BuildRequires: %{python_module decorator} BuildRequires: %{python_module flasgger} BuildRequires: %{python_module gevent} @@ -51,7 +50,6 @@ Requires: python-Brotli Requires: python-Flask >= 2.1 Requires: python-MarkupSafe Requires: python-Werkzeug >= 2.0 -Requires: python-blinker Requires: python-decorator Requires: python-flasgger Requires: python-gevent diff --git a/support-werkzeug-2.3.patch b/support-werkzeug-2.3.patch new file mode 100644 index 0000000..db72fdf --- /dev/null +++ b/support-werkzeug-2.3.patch @@ -0,0 +1,40 @@ +Index: python-httpbin-0.7.0+git20181107.f8ec666/test_httpbin.py +=================================================================== +--- python-httpbin-0.7.0+git20181107.f8ec666.orig/test_httpbin.py ++++ python-httpbin-0.7.0+git20181107.f8ec666/test_httpbin.py +@@ -167,8 +167,8 @@ class HttpbinTestCase(unittest.TestCase) + + def test_base64(self): + greeting = u'Здравствуй, мир!' +- b64_encoded = _string_to_base64(greeting) +- response = self.app.get(b'/base64/' + b64_encoded) ++ b64_encoded = _string_to_base64(greeting).decode('utf-8') ++ response = self.app.get('/base64/' + b64_encoded) + content = response.data.decode('utf-8') + self.assertEqual(greeting, content) + +@@ -422,7 +422,7 @@ class HttpbinTestCase(unittest.TestCase) + body, stale_after + 1) + self.assertEqual(stale_response.status_code, 401) + header = stale_response.headers.get('WWW-Authenticate') +- self.assertIn('stale=TRUE', header) ++ self.assertIn('stale=True', header) + + def _test_digest_response_for_auth_request(self, header, username, password, qop, uri, body, nc=1, nonce=None): + auth_type, auth_info = header.split(None, 1) +@@ -474,13 +474,13 @@ class HttpbinTestCase(unittest.TestCase) + wrong_pass_response, nonce = self._test_digest_response_for_auth_request(header, username, "wrongPassword", qop, uri, body) + self.assertEqual(wrong_pass_response.status_code, 401) + header = wrong_pass_response.headers.get('WWW-Authenticate') +- self.assertNotIn('stale=TRUE', header) ++ self.assertNotIn('stale=True', header) + + reused_nonce_response, nonce = self._test_digest_response_for_auth_request(header, username, password, qop, uri, \ + body, nonce=nonce) + self.assertEqual(reused_nonce_response.status_code, 401) + header = reused_nonce_response.headers.get('WWW-Authenticate') +- self.assertIn('stale=TRUE', header) ++ self.assertIn('stale=True', header) + + def test_drip(self): + response = self.app.get('/drip?numbytes=400&duration=2&delay=1')