[packages/python-httpbin] - patches to update brotli dependency and disable sentry support (raven adds lots of dependencies)
qboosh
qboosh at pld-linux.org
Wed Dec 31 22:42:00 CET 2025
commit 97e04cdf9f7321bd76c19790da493a3550a0cf38
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Dec 31 22:42:34 2025 +0100
- patches to update brotli dependency and disable sentry support (raven adds lots of dependencies)
httpbin-brotli.patch | 54 +++++++++++++++++++
httpbin-disable-sentry.patch | 122 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 176 insertions(+)
---
diff --git a/httpbin-brotli.patch b/httpbin-brotli.patch
new file mode 100644
index 0000000..336c33a
--- /dev/null
+++ b/httpbin-brotli.patch
@@ -0,0 +1,54 @@
+From 592d403a9b36d556e1c9a305ddc81a2477385cac Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
+Date: Wed, 2 Dec 2020 10:42:52 +0100
+Subject: [PATCH] Replace brotlipy with brotlicffi
+
+The brotlipy package has been renamed to brotlicffi. Update the imports
+and dependencies accordingly. The major advanage of the new package
+is that it no longer collides with the Python bindings provided
+by brotli itself.
+---
+ Pipfile | 2 +-
+ httpbin/filters.py | 2 +-
+ setup.py | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+#diff --git a/Pipfile b/Pipfile
+#index 8ad29bb8..c63b526b 100644
+#--- a/Pipfile
+#+++ b/Pipfile
+#@@ -5,7 +5,7 @@ verify_ssl = true
+# [packages]
+# gunicorn = "*"
+# decorator = "*"
+#-brotlipy = "*"
+#+brotlicffi = "*"
+# gevent = "*"
+# Flask = "*"
+# meinheld = "*"
+diff --git a/httpbin/filters.py b/httpbin/filters.py
+index c6268b6a..4deeaaad 100644
+--- a/httpbin/filters.py
++++ b/httpbin/filters.py
+@@ -10,7 +10,7 @@
+ import gzip as gzip2
+ import zlib
+
+-import brotli as _brotli
++import brotlicffi as _brotli
+
+ from six import BytesIO
+ from decimal import Decimal
+diff --git a/setup.py b/setup.py
+index 32858e38..3f8700e2 100644
+--- a/setup.py
++++ b/setup.py
+@@ -34,7 +34,7 @@ setup(
+ packages=find_packages(),
+ include_package_data = True, # include files listed in MANIFEST.in
+ install_requires=[
+- 'Flask', 'MarkupSafe', 'decorator', 'itsdangerous', 'six', 'brotlipy',
++ 'Flask', 'MarkupSafe', 'decorator', 'itsdangerous', 'six', 'brotlicffi',
+ 'raven[flask]', 'werkzeug>=0.14.1'
+ ],
+ )
diff --git a/httpbin-disable-sentry.patch b/httpbin-disable-sentry.patch
new file mode 100644
index 0000000..db9aa7b
--- /dev/null
+++ b/httpbin-disable-sentry.patch
@@ -0,0 +1,122 @@
+From d99bb0d267c0021ba2bd5e98af61c40566e2fa58 Mon Sep 17 00:00:00 2001
+From: Kenneth Reitz <me at kennethreitz.org>
+Date: Wed, 9 May 2018 06:29:58 -0400
+Subject: [PATCH] remove sentry support
+
+Signed-off-by: Kenneth Reitz <me at kennethreitz.org>
+---
+ httpbin/core.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/httpbin/core.py b/httpbin/core.py
+index 66a2ed64..e22fea50 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -56,10 +56,6 @@ def jsonify(*args, **kwargs):
+ app = Flask(__name__, template_folder=tmpl_dir)
+ app.debug = bool(os.environ.get('DEBUG'))
+
+-# Send app errors to Sentry.
+-if 'SENTRY_DSN' in os.environ:
+- sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
+-
+ # Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the
+ # Bugsnag Python client with the command "pip install bugsnag", and set the
+ # environment variable BUGSNAG_API_KEY. You can also optionally set
+From e5433806757a09d58e48935c081db80170296ab5 Mon Sep 17 00:00:00 2001
+From: Kenneth Reitz <me at kennethreitz.org>
+Date: Wed, 9 May 2018 06:30:24 -0400
+Subject: [PATCH] remove raven
+
+Signed-off-by: Kenneth Reitz <me at kennethreitz.org>
+---
+ Pipfile | 1 -
+ Pipfile.lock | 15 +--------------
+ httpbin/core.py | 1 -
+ 3 files changed, 1 insertion(+), 16 deletions(-)
+
+#diff --git a/Pipfile b/Pipfile
+#index 48ce10f3..b9069470 100644
+#--- a/Pipfile
+#+++ b/Pipfile
+#@@ -10,5 +10,4 @@ gevent = "*"
+# Flask = "*"
+# meinheld = "*"
+# werkzeug = ">=0.14.1"
+#-raven = { extras = [ "flask",] }
+# six = "*"
+#diff --git a/Pipfile.lock b/Pipfile.lock
+#index 784d45eb..a178eec0 100644
+#--- a/Pipfile.lock
+#+++ b/Pipfile.lock
+#@@ -1,7 +1,7 @@
+# {
+# "_meta": {
+# "hash": {
+#- "sha256": "4275c4555f82cc2b654d2c9720a4f9ad7e381fabb363d765531c09dd6dc8c652"
+#+ "sha256": "3294384315916c188615fb3c83ad7050095c8b17428b6301314184c572245ba1"
+# },
+# "pipfile-spec": 6,
+# "requires": {},
+#@@ -13,12 +13,6 @@
+# ]
+# },
+# "default": {
+#- "blinker": {
+#- "hashes": [
+#- "sha256:471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"
+#- ],
+#- "version": "==1.4"
+#- },
+# "brotlipy": {
+# "hashes": [
+# "sha256:07194f4768eb62a4f4ea76b6d0df6ade185e24ebd85877c351daa0a069f1111a",
+#@@ -201,13 +195,6 @@
+# ],
+# "version": "==2.18"
+# },
+#- "raven": {
+#- "hashes": [
+#- "sha256:e4edf648829a64234800a10ed94ca08e0b38592f7449fa5e70931db62f5cd851",
+#- "sha256:f908e9b39f02580e7f822030d119ed3b2e8d32300a2fec6373e5827d588bbae7"
+#- ],
+#- "version": "==6.7.0"
+#- },
+# "six": {
+# "hashes": [
+# "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
+diff --git a/httpbin/core.py b/httpbin/core.py
+index e22fea50..14f2d06e 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -21,7 +21,6 @@
+ 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, \
+From 47b73ca00439160430b6f08e6582bcda5871f413 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
+Date: Tue, 1 Aug 2023 14:04:13 +0200
+Subject: [PATCH] Remove the obsolete dep on raven
+
+Remove the dependency on raven, as the code using it has been removed
+in e5433806757a09d58e48935c081db80170296ab5.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index a850002d..32858e38 100644
+--- a/setup.py
++++ b/setup.py
+@@ -35,6 +35,6 @@ setup(
+ include_package_data = True, # include files listed in MANIFEST.in
+ install_requires=[
+ 'Flask', 'MarkupSafe', 'decorator', 'itsdangerous', 'six', 'brotlicffi',
+- 'raven[flask]', 'werkzeug>=0.14.1'
++ 'werkzeug>=0.14.1'
+ ],
+ )
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-httpbin.git/commitdiff/97e04cdf9f7321bd76c19790da493a3550a0cf38
More information about the pld-cvs-commit
mailing list