FreeBSD Bugzilla – Attachment 233577 Details for
Bug 263650
www/py-httpbin: Fix for newer Werkzeug versions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Support py-werkzeug>=2.1.0
0001-www-py-httpbin-Fix-port-with-py-werkzeug-2.1.0.patch (text/plain), 2.33 KB, created by
Evilham
on 2022-04-29 10:11:35 UTC
(
hide
)
Description:
Support py-werkzeug>=2.1.0
Filename:
MIME Type:
Creator:
Evilham
Created:
2022-04-29 10:11:35 UTC
Size:
2.33 KB
patch
obsolete
>From 0146610cefcec685b86c065804b7c789e7fae4ee Mon Sep 17 00:00:00 2001 >From: Evilham <contact@evilham.com> >Date: Fri, 29 Apr 2022 12:08:20 +0200 >Subject: [PATCH] www/py-httpbin: Fix port with py-werkzeug>=2.1.0 > >Upstream has a corresponding issue and PR still open: >https://github.com/kevin1024/pytest-httpbin/issues/64 >https://github.com/postmanlabs/httpbin/pull/674 > >Reported by: Sascha Biberhofer <ports@skyforge.at> >--- > www/py-httpbin/Makefile | 1 + > www/py-httpbin/files/patch-httpbin_core.py | 26 ++++++++++++++++++++++ > 2 files changed, 27 insertions(+) > create mode 100644 www/py-httpbin/files/patch-httpbin_core.py > >diff --git a/www/py-httpbin/Makefile b/www/py-httpbin/Makefile >index 13c34c7ba23a..d9610bd1b674 100644 >--- a/www/py-httpbin/Makefile >+++ b/www/py-httpbin/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= httpbin > PORTVERSION= 0.7.0 >+PORTREVISION= 1 > CATEGORIES= www python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >diff --git a/www/py-httpbin/files/patch-httpbin_core.py b/www/py-httpbin/files/patch-httpbin_core.py >new file mode 100644 >index 000000000000..ad131678e6fd >--- /dev/null >+++ b/www/py-httpbin/files/patch-httpbin_core.py >@@ -0,0 +1,26 @@ >+--- httpbin/core.py.orig 2022-04-29 09:53:39 UTC >++++ httpbin/core.py >+@@ -19,9 +19,13 @@ from werkzeug.http import http_date >+ 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.http import parse_authorization_header >+ from raven.contrib.flask import Sentry >++# https://github.com/postmanlabs/httpbin/pull/674 >++try: >++ from werkzeug.wrappers import BaseResponse as Response >++except ImportError: # werkzeug >= 2.1.0 >++ from werkzeug.wrappers import Response >+ >+ from . import filters >+ from .helpers import get_headers, status_code, get_dict, get_request_range, check_basic_auth, check_digest_auth, \ >+@@ -48,7 +52,7 @@ def jsonify(*args, **kwargs): >+ 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') >-- >2.36.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
contact
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 263650
: 233577