From 931de7512b0c8446f1b40f4660074e0af03bf7a24d54471758d648138ad8031c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 28 May 2019 11:14:01 +0000 Subject: [PATCH] - Add patch to fix new werkzeug build, atm PR upstream: * werkzeug.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpbin?expand=0&rev=15 --- python-httpbin.changes | 6 ++++++ python-httpbin.spec | 3 +++ werkzeug.patch | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 werkzeug.patch diff --git a/python-httpbin.changes b/python-httpbin.changes index 38ea6be..06fbbc7 100644 --- a/python-httpbin.changes +++ b/python-httpbin.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue May 28 11:12:45 UTC 2019 - Tomáš Chvátal + +- Add patch to fix new werkzeug build, atm PR upstream: + * werkzeug.patch + ------------------------------------------------------------------- Thu Mar 14 11:53:37 UTC 2019 - tchvatal@suse.com diff --git a/python-httpbin.spec b/python-httpbin.spec index 512d67c..7f313f3 100644 --- a/python-httpbin.spec +++ b/python-httpbin.spec @@ -25,6 +25,8 @@ 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 +Patch0: werkzeug.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Flask} BuildRequires: %{python_module MarkupSafe} @@ -65,6 +67,7 @@ All endpoint responses are JSON-encoded. %prep %setup -q +%patch0 -p1 # use normal Brotli google module not wrapper sed -i -e 's:brotlipy:brotli:' setup.py diff --git a/werkzeug.patch b/werkzeug.patch new file mode 100644 index 0000000..1eba5c6 --- /dev/null +++ b/werkzeug.patch @@ -0,0 +1,34 @@ +From b6cb2b47a3813da5df8dbffada284b72d7fe099e Mon Sep 17 00:00:00 2001 +From: Simon Kowallik +Date: Sat, 18 May 2019 13:10:08 +0200 +Subject: [PATCH] fix #554: update tests, Pipfile, Pipfile.lock for + werkzeug>=0.15.1 + +- update test_httpbin.py to reflect new behaviour of werkzeug +- require werkzeug>=0.15.1 +--- + Pipfile | 2 +- + Pipfile.lock | 6 +++--- + test_httpbin.py | 2 -- + 3 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/test_httpbin.py b/test_httpbin.py +index b7104ffc..ea51ae81 100755 +--- a/test_httpbin.py ++++ b/test_httpbin.py +@@ -148,7 +148,6 @@ def test_get(self): + data = json.loads(response.data.decode('utf-8')) + self.assertEqual(data['args'], {}) + self.assertEqual(data['headers']['Host'], 'localhost') +- self.assertEqual(data['headers']['Content-Length'], '0') + self.assertEqual(data['headers']['User-Agent'], 'test') + # self.assertEqual(data['origin'], None) + self.assertEqual(data['url'], 'http://localhost/get') +@@ -162,7 +161,6 @@ def test_anything(self): + data = json.loads(response.data.decode('utf-8')) + self.assertEqual(data['args'], {}) + self.assertEqual(data['headers']['Host'], 'localhost') +- self.assertEqual(data['headers']['Content-Length'], '0') + self.assertEqual(data['url'], 'http://localhost/anything/foo/bar') + self.assertEqual(data['method'], 'GET') + self.assertTrue(response.data.endswith(b'\n'))