py-httpbin: update to 0.10.2

This commit is contained in:
Renee Otten
2025-06-02 11:57:57 -04:00
parent a6a7ebf3fd
commit 38900700fe
3 changed files with 10 additions and 54 deletions
+10 -13
View File
@@ -4,8 +4,8 @@ PortSystem 1.0
PortGroup python 1.0
name py-httpbin
version 0.7.0
revision 2
version 0.10.2
revision 0
supported_archs noarch
platforms {darwin any}
@@ -17,26 +17,23 @@ long_description {*}${description}
homepage https://github.com/requests/httpbin
checksums sha256 cbb37790c91575f4f15757f42ad41d9f729eb227d5edbe89e4ec175486db8dfa \
rmd160 22b1bb0151212aa71aaa8cb8fb1aec7e1e9c0b5a \
size 92613
checksums sha256 632148698261c8684ea2d2b624cdea845b402b1fe91736e89df886408c6317a9 \
rmd160 566c64fafe394ae73bf5dc958a6da004b7d31752 \
size 107327
python.versions 39 310 311 312
python.versions 39 310 311 312 313
if {${name} ne ${subport}} {
depends_lib-append \
port:py${python.version}-blinker \
port:py${python.version}-brotlicffi \
port:py${python.version}-decorator \
port:py${python.version}-flasgger \
port:py${python.version}-flask \
port:py${python.version}-itsdangerous \
port:py${python.version}-markupsafe \
port:py${python.version}-raven \
port:py${python.version}-greenlet \
port:py${python.version}-importlib-metadata \
port:py${python.version}-six \
port:py${python.version}-werkzeug
patchfiles patch-test_httpbin.py.diff \
patch-werkzeug-BaseResponse.diff
test.run yes
test.env-append PYTHONPATH=${destroot}${python.pkgd}
}
@@ -1,21 +0,0 @@
# https://github.com/postmanlabs/httpbin/issues/554
--- test_httpbin.py
+++ test_httpbin.py
@@ -144,7 +144,7 @@ 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']['Content-Length'], '0')
self.assertEqual(data['headers']['User-Agent'], 'test')
# self.assertEqual(data['origin'], None)
self.assertEqual(data['url'], 'http://localhost/get')
@@ -158,7 +158,7 @@ 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']['Content-Length'], '0')
self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
self.assertEqual(data['method'], 'GET')
self.assertTrue(response.data.endswith(b'\n'))
@@ -1,20 +0,0 @@
--- httpbin/core.py.orig 2018-05-08 07:41:03.000000000 -0400
+++ httpbin/core.py 2022-05-31 11:07:42.000000000 -0400
@@ -19,7 +19,7 @@
from six.moves import range as xrange
from werkzeug.datastructures import WWWAuthenticate, MultiDict
from werkzeug.http import http_date
-from werkzeug.wrappers import BaseResponse
+from werkzeug.wrappers import Response
from werkzeug.http import parse_authorization_header
from raven.contrib.flask import Sentry
@@ -48,7 +48,7 @@
return response
# Prevent WSGI from correcting the casing of the Location header
-BaseResponse.autocorrect_location_header = False
+Response.autocorrect_location_header = False
# Find the correct template folder when running from a different location
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')