dev-python/httpbin: Bump to 0.7.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2019-11-22 15:22:10 +01:00
parent c043d1afea
commit ac751645b3
4 changed files with 77 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST httpbin-0.4.1.tar.gz 88101 BLAKE2B 3df333ba92d50e065a598b2dc51ff3355eb94eb4b3a3094ba79cbe95fc11424e05f187e434ac299023dfbfd790b32db070a37e08a962ac19d803de4405603bb8 SHA512 feb519ee909c5115971f4bfd488ec0f9e987cd473464721f4e343e09b9d8fc592cf48b50ff3a2960bb67310521d865091cd766ed351ebfaa2dc8193115e9f052
DIST httpbin-0.7.0.tar.gz 92613 BLAKE2B 59252df1d4d0ef853ec65263b472d3ba6c597336d844f9b457f2d0a009048d4222f715a7f6fb120aca00fa641d1687e302036dc151bd2fd67ba98cf5fc47a63a SHA512 82e80058b58943637e9f8191764cea79bf7a6e40f36069f9b5d3f908585dbef20a03ef070d1f865d350920b6e874a93a48a544b05c14ff4911038ec2c20f6f63

View File

@@ -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

View File

@@ -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'))

View File

@@ -0,0 +1,38 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 )
inherit distutils-r1
DESCRIPTION="HTTP Request and Response Service"
HOMEPAGE="https://github.com/postmanlabs/httpbin
https://pypi.org/project/httpbin/"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
RDEPEND="
dev-python/brotlipy[${PYTHON_USEDEP}]
dev-python/decorator[${PYTHON_USEDEP}]
dev-python/flask[${PYTHON_USEDEP}]
dev-python/itsdangerous[${PYTHON_USEDEP}]
dev-python/markupsafe[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
>=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
BDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]"
PATCHES=(
# do not import raven if it's not going to be used
# (upstream removed it completely in git anyway)
"${FILESDIR}"/httpbin-0.7.0-optional-raven.patch
# fix tests with new versions of werkzeug
"${FILESDIR}"/httpbin-0.7.0-test-werkzeug.patch
)
distutils_enable_tests unittest