[packages/python3-httpbin] - python-httpbin.spec updated to 0.10.2 for python 3.7+

qboosh qboosh at pld-linux.org
Wed Dec 31 23:10:05 CET 2025


commit 61ff126af10a8090b37d1dba88ebec2b195afb1e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Dec 31 23:10:37 2025 +0100

    - python-httpbin.spec updated to 0.10.2 for python 3.7+

 httpbin-brotli.patch         |  54 ------------------
 httpbin-disable-sentry.patch | 122 ---------------------------------------
 python-httpbin.spec          | 133 -------------------------------------------
 python3-httpbin.spec         |  70 +++++++++++++++++++++++
 4 files changed, 70 insertions(+), 309 deletions(-)
---
diff --git a/python-httpbin.spec b/python-httpbin.spec
deleted file mode 100644
index 10343b6..0000000
--- a/python-httpbin.spec
+++ /dev/null
@@ -1,133 +0,0 @@
-#
-# Conditional build:
-%bcond_with	tests	# unit tests (2 failures)
-%bcond_without	python2 # CPython 2.x module
-%bcond_with	python3 # CPython 3.x module (built from python3-httpbin.spec)
-%bcond_with	sentry	# Sentry support via raven
-
-Summary:	HTTP Request and Response Service
-Summary(pl.UTF-8):	Usługa żądań i odpowiedzi HTTP
-Name:		python-httpbin
-# keep 0.7.x here for python2 support
-Version:	0.7.0
-Release:	1
-License:	ISC
-Group:		Libraries/Python
-#Source0Download: https://pypi.python.org/simple/httpbin
-Source0:	https://files.pythonhosted.org/packages/source/h/httpbin/httpbin-%{version}.tar.gz
-# Source0-md5:	1629975ff6eeb1e5a72ce3deda88ef4e
-Patch0:		httpbin-brotli.patch
-Patch1:		httpbin-disable-sentry.patch
-URL:		https://github.com/Runscope/httpbin
-%if %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
-BuildRequires:	glibc-localedb-all
-%endif
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-brotlicffi
-BuildRequires:	python-decorator
-BuildRequires:	python-flask
-BuildRequires:	python-itsdangerous
-BuildRequires:	python-markupsafe
-%{?with_sentry:BuildRequires:	python-raven}
-BuildRequires:	python-six
-BuildRequires:	python-werkzeug >= 0.14.1
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.4
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-brotlicffi
-BuildRequires:	python3-decorator
-BuildRequires:	python3-flask
-BuildRequires:	python3-itsdangerous
-BuildRequires:	python3-markupsafe
-%{?with_sentry:BuildRequires:	python3-raven}
-BuildRequires:	python3-six
-BuildRequires:	python3-werkzeug >= 0.14.1
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-HTTP Request and Response Service.
-
-%description -l pl.UTF-8
-Usługa żądań i odpowiedzi HTTP.
-
-%package -n python3-httpbin
-Summary:	HTTP Request and Response Service
-Summary(pl.UTF-8):	Usługa żądań i odpowiedzi HTTP
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.4
-
-%description -n python3-httpbin
-HTTP Request and Response Service.
-
-%description -n python3-httpbin -l pl.UTF-8
-Usługa żądań i odpowiedzi HTTP.
-
-%prep
-%setup -q -n httpbin-%{version}
-%patch -P0 -p1
-%if %{without sentry}
-%patch -P1 -p1
-%endif
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} test_httpbin.py
-%endif
-%endif
-
-%if %{with python3}
-LC_ALL=C.UTF-8 \
-%py3_build
-
-%if %{with tests}
-%{__python3} test_httpbin.py
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-LC_ALL=C.UTF-8 \
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.md
-%{py_sitescriptdir}/httpbin
-%{py_sitescriptdir}/httpbin-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-httpbin
-%defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.md
-%{py3_sitescriptdir}/httpbin
-%{py3_sitescriptdir}/httpbin-%{version}-py*.egg-info
-%endif
diff --git a/python3-httpbin.spec b/python3-httpbin.spec
new file mode 100644
index 0000000..a1f1c08
--- /dev/null
+++ b/python3-httpbin.spec
@@ -0,0 +1,70 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+Summary:	HTTP Request and Response Service
+Summary(pl.UTF-8):	Usługa żądań i odpowiedzi HTTP
+Name:		python3-httpbin
+Version:	0.10.2
+Release:	1
+License:	ISC or MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.python.org/simple/httpbin
+Source0:	https://files.pythonhosted.org/packages/source/h/httpbin/httpbin-%{version}.tar.gz
+# Source0-md5:	f7eefe44907a031db3322832945c4349
+URL:		https://github.com/Runscope/httpbin
+%if %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
+BuildRequires:	glibc-localedb-all
+%endif
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.7
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-brotlicffi
+BuildRequires:	python3-decorator
+BuildRequires:	python3-flasgger
+BuildRequires:	python3-flask >= 2.2.4
+BuildRequires:	python3-greenlet
+%if "%{py3_ver}" == "3.7"
+BuildRequires:	python3-importlib_metadata
+%endif
+BuildRequires:	python3-six
+BuildRequires:	python3-werkzeug >= 2.2.2
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python3-modules >= 1:3.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+HTTP Request and Response Service.
+
+%description -l pl.UTF-8
+Usługa żądań i odpowiedzi HTTP.
+
+%prep
+%setup -q -n httpbin-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS LICENSE LICENSE.ISC LICENSE.MIT README.md
+%{py3_sitescriptdir}/httpbin
+%{py3_sitescriptdir}/httpbin-%{version}.dist-info
diff --git a/httpbin-brotli.patch b/httpbin-brotli.patch
deleted file mode 100644
index 336c33a..0000000
--- a/httpbin-brotli.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-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
deleted file mode 100644
index db9aa7b..0000000
--- a/httpbin-disable-sentry.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-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/python3-httpbin.git/commitdiff/61ff126af10a8090b37d1dba88ebec2b195afb1e



More information about the pld-cvs-commit mailing list