summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-11-22 15:22:10 +0100
committerMichał Górny <mgorny@gentoo.org>2019-11-22 17:21:03 +0100
commitac751645b3013c63a4778351144538e0edcde9e7 (patch)
treee626d9f91058aeacbea6da716f594ba388e503ab /dev-python/httpbin/files
parentnet-analyzer/icinga2: 2.11.2 stable amd64/x86 with cleanup (diff)
downloadgentoo-ac751645b3013c63a4778351144538e0edcde9e7.tar.gz
gentoo-ac751645b3013c63a4778351144538e0edcde9e7.tar.bz2
gentoo-ac751645b3013c63a4778351144538e0edcde9e7.zip
dev-python/httpbin: Bump to 0.7.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/httpbin/files')
-rw-r--r--dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch19
-rw-r--r--dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch19
2 files changed, 38 insertions, 0 deletions
diff --git a/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
new file mode 100644
index 000000000000..8602ed7641be
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
@@ -0,0 +1,19 @@
+diff -dupr a/httpbin/core.py b/httpbin/core.py
+--- a/httpbin/core.py 2018-05-08 13:41:03.000000000 +0200
++++ b/httpbin/core.py 2019-11-22 15:07:27.516500217 +0100
+@@ -21,7 +21,6 @@ from werkzeug.datastructures import WWWA
+ from werkzeug.http import http_date
+ from werkzeug.wrappers import BaseResponse
+ from werkzeug.http import parse_authorization_header
+-from raven.contrib.flask import Sentry
+
+ from . import filters
+ from .helpers import get_headers, status_code, get_dict, get_request_range, check_basic_auth, check_digest_auth, \
+@@ -58,6 +57,7 @@ app.debug = bool(os.environ.get('DEBUG')
+
+ # Send app errors to Sentry.
+ if 'SENTRY_DSN' in os.environ:
++ from raven.contrib.flask import Sentry
+ sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
+
+ # Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the
diff --git a/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
new file mode 100644
index 000000000000..956a2f5235ca
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
@@ -0,0 +1,19 @@
+diff -dupr a/test_httpbin.py b/test_httpbin.py
+--- a/test_httpbin.py 2019-11-22 15:06:56.199774070 +0100
++++ b/test_httpbin.py 2019-11-22 15:18:58.010069445 +0100
+@@ -144,7 +144,6 @@ class HttpbinTestCase(unittest.TestCase)
+ 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')
+@@ -158,7 +157,6 @@ class HttpbinTestCase(unittest.TestCase)
+ 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'))