Accepting request 1094317 from devel:languages:python
- 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/request/show/1094317 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-httpbin?expand=0&rev=8
This commit is contained in:
commit
61394b7e50
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 21 08:35:31 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
40
support-werkzeug-2.3.patch
Normal file
40
support-werkzeug-2.3.patch
Normal file
@ -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')
|
Loading…
Reference in New Issue
Block a user