public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-httpbin] rawhide: Update to 0.10.4, drop merged patches (all of them! yay!)
Date: Thu, 18 Jun 2026 07:20:50 GMT [thread overview]
Message-ID: <178176725062.1.5616142538586937505.rpms-python-httpbin-06347493e0f3@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-httpbin
Branch : rawhide
Commit : 06347493e0f366129ab245d442e8bc8d495ac81d
Author : Adam Williamson <awilliam@redhat.com>
Date : 2026-06-18T09:20:21+02:00
Stats : +3/-304 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/python-httpbin/c/06347493e0f366129ab245d442e8bc8d495ac81d?branch=rawhide
Log:
Update to 0.10.4, drop merged patches (all of them! yay!)
---
diff --git a/.gitignore b/.gitignore
index e2004fc..d9f11e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/httpbin-0.10.0.tar.gz
/httpbin-0.10.1.tar.gz
/httpbin-0.10.2.tar.gz
+/httpbin-0.10.4.tar.gz
diff --git a/0001-Fix-bytes-endpoint-with-newer-werkzeug-versions.patch b/0001-Fix-bytes-endpoint-with-newer-werkzeug-versions.patch
deleted file mode 100644
index be4e45d..0000000
--- a/0001-Fix-bytes-endpoint-with-newer-werkzeug-versions.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8b4bc05fd0b3b0ecd108fceca002934d9a2f0bd3 Mon Sep 17 00:00:00 2001
-From: Scott Talbert <swt@techie.net>
-Date: Wed, 10 Jan 2024 00:17:41 -0500
-Subject: [PATCH] Fix /bytes endpoint with newer werkzeug versions
-
-At some point, werkzeug starting checking the inputs to the write()
-method, which caused the following traceback:
-Traceback (most recent call last):
- File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 364, in run_wsgi
- execute(self.server.app)
- File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 328, in execute
- write(data)
- File "/usr/lib/python3/dist-packages/werkzeug/serving.py", line 296, in write
- assert isinstance(data, bytes), "applications must write bytes"
-AssertionError: applications must write bytes
-
-Fix this by using bytes instead of bytearray.
----
- httpbin/core.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/httpbin/core.py b/httpbin/core.py
-index a82c1b8..a282789 100644
---- a/httpbin/core.py
-+++ b/httpbin/core.py
-@@ -1449,7 +1449,7 @@ def random_bytes(n):
- response = make_response()
-
- # Note: can't just use os.urandom here because it ignores the seed
-- response.data = bytearray(random.randint(0, 255) for i in range(n))
-+ response.data = bytes(random.randint(0, 255) for i in range(n))
- response.content_type = "application/octet-stream"
- return response
-
---
-2.43.0
-
diff --git a/0001-Make-flasgger-dep-optional-26.patch b/0001-Make-flasgger-dep-optional-26.patch
deleted file mode 100644
index e7b81a5..0000000
--- a/0001-Make-flasgger-dep-optional-26.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 87ad6da574184608157e1a6abc8a66cdade8aef9 Mon Sep 17 00:00:00 2001
-From: Adam Williamson <awilliam@redhat.com>
-Date: Tue, 17 Oct 2023 17:17:16 -0700
-Subject: [PATCH] Make flasgger dep optional (#26)
-
-As discussed in the ticket, the flasgger dep is a pretty heavy
-one which is not needed when using httpbin as a library. It's
-only really needed to produce the fancy homepage and API docs
-for httpbin.org.
-
-This makes the dependency optional, and falls back to the old
-static HTML page for / if flasgger is not available. The flasgger
-dependency is moved from the main set of dependencies to the
-'mainapp' extras (to ensure we *do* get the shiny new homepage
-when we want it).
-
-Signed-off-by: Adam Williamson <awilliam@redhat.com>
----
- httpbin/core.py | 150 +++++++++++++++++++++++++-----------------------
- pyproject.toml | 2 +-
- 2 files changed, 80 insertions(+), 72 deletions(-)
-
-diff --git a/httpbin/core.py b/httpbin/core.py
-index a82c1b8..ca4a845 100644
---- a/httpbin/core.py
-+++ b/httpbin/core.py
-@@ -33,7 +33,10 @@ try:
- except ImportError: # werkzeug < 2.1
- from werkzeug.wrappers import BaseResponse as Response
-
--from flasgger import Swagger, NO_SANITIZER
-+try:
-+ from flasgger import Swagger, NO_SANITIZER
-+except ImportError:
-+ Swagger = False
-
- from . import filters
- from .helpers import (
-@@ -95,77 +98,78 @@ app.add_template_global("HTTPBIN_TRACKING" in os.environ, name="tracking_enabled
-
- app.config["SWAGGER"] = {"title": "httpbin.org", "uiversion": 3}
-
--template = {
-- "swagger": "2.0",
-- "info": {
-- "title": "httpbin.org",
-- "description": (
-- "A simple HTTP Request & Response Service."
-- "<br/> A <a href='http://kennethreitz.com/'>Kenneth Reitz</a> project."
-- "<br/> <br/> <b>Run locally: </b> <br/> "
-- "<code>$ docker pull ghcr.io/psf/httpbin</code> <br/>"
-- "<code>$ docker run -p 80:8080 ghcr.io/psf/httpbin</code>"
-- ),
-- "contact": {
-- "responsibleOrganization": "Python Software Foundation",
-- "responsibleDeveloper": "Kenneth Reitz",
-- "url": "https://github.com/psf/httpbin/",
-- },
-- # "termsOfService": "http://me.com/terms",
-- "version": version,
-- },
-- "host": "httpbin.org", # overrides localhost:5000
-- "basePath": "/", # base bash for blueprint registration
-- "schemes": ["https"],
-- "protocol": "https",
-- "tags": [
-- {
-- "name": "HTTP Methods",
-- "description": "Testing different HTTP verbs",
-- # 'externalDocs': {'description': 'Learn more', 'url': 'https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html'}
-- },
-- {"name": "Auth", "description": "Auth methods"},
-- {
-- "name": "Status codes",
-- "description": "Generates responses with given status code",
-- },
-- {"name": "Request inspection", "description": "Inspect the request data"},
-- {
-- "name": "Response inspection",
-- "description": "Inspect the response data like caching and headers",
-- },
-- {
-- "name": "Response formats",
-- "description": "Returns responses in different data formats",
-+if Swagger:
-+ template = {
-+ "swagger": "2.0",
-+ "info": {
-+ "title": "httpbin.org",
-+ "description": (
-+ "A simple HTTP Request & Response Service."
-+ "<br/> A <a href='http://kennethreitz.com/'>Kenneth Reitz</a> project."
-+ "<br/> <br/> <b>Run locally: </b> <br/> "
-+ "<code>$ docker pull ghcr.io/psf/httpbin</code> <br/>"
-+ "<code>$ docker run -p 80:8080 ghcr.io/psf/httpbin</code>"
-+ ),
-+ "contact": {
-+ "responsibleOrganization": "Python Software Foundation",
-+ "responsibleDeveloper": "Kenneth Reitz",
-+ "url": "https://github.com/psf/httpbin/",
-+ },
-+ # "termsOfService": "http://me.com/terms",
-+ "version": version,
- },
-- {"name": "Dynamic data", "description": "Generates random and dynamic data"},
-- {"name": "Cookies", "description": "Creates, reads and deletes Cookies"},
-- {"name": "Images", "description": "Returns different image formats"},
-- {"name": "Redirects", "description": "Returns different redirect responses"},
-- {
-- "name": "Anything",
-- "description": "Returns anything that is passed to request",
-- },
-- ],
--}
--
--swagger_config = {
-- "headers": [],
-- "specs": [
-- {
-- "endpoint": "spec",
-- "route": "/spec.json",
-- "rule_filter": lambda rule: True, # all in
-- "model_filter": lambda tag: True, # all in
-- }
-- ],
-- "static_url_path": "/flasgger_static",
-- # "static_folder": "static", # must be set by user
-- "swagger_ui": True,
-- "specs_route": "/",
--}
-+ "host": "httpbin.org", # overrides localhost:5000
-+ "basePath": "/", # base bash for blueprint registration
-+ "schemes": ["https"],
-+ "protocol": "https",
-+ "tags": [
-+ {
-+ "name": "HTTP Methods",
-+ "description": "Testing different HTTP verbs",
-+ # 'externalDocs': {'description': 'Learn more', 'url': 'https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html'}
-+ },
-+ {"name": "Auth", "description": "Auth methods"},
-+ {
-+ "name": "Status codes",
-+ "description": "Generates responses with given status code",
-+ },
-+ {"name": "Request inspection", "description": "Inspect the request data"},
-+ {
-+ "name": "Response inspection",
-+ "description": "Inspect the response data like caching and headers",
-+ },
-+ {
-+ "name": "Response formats",
-+ "description": "Returns responses in different data formats",
-+ },
-+ {"name": "Dynamic data", "description": "Generates random and dynamic data"},
-+ {"name": "Cookies", "description": "Creates, reads and deletes Cookies"},
-+ {"name": "Images", "description": "Returns different image formats"},
-+ {"name": "Redirects", "description": "Returns different redirect responses"},
-+ {
-+ "name": "Anything",
-+ "description": "Returns anything that is passed to request",
-+ },
-+ ],
-+ }
-+
-+ swagger_config = {
-+ "headers": [],
-+ "specs": [
-+ {
-+ "endpoint": "spec",
-+ "route": "/spec.json",
-+ "rule_filter": lambda rule: True, # all in
-+ "model_filter": lambda tag: True, # all in
-+ }
-+ ],
-+ "static_url_path": "/flasgger_static",
-+ # "static_folder": "static", # must be set by user
-+ "swagger_ui": True,
-+ "specs_route": "/",
-+ }
-
--swagger = Swagger(app, sanitizer=NO_SANITIZER, template=template, config=swagger_config)
-+ swagger = Swagger(app, sanitizer=NO_SANITIZER, template=template, config=swagger_config)
-
- # Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the
- # Bugsnag Python client with the command "pip install bugsnag", and set the
-@@ -243,8 +247,12 @@ def set_cors_headers(response):
- # Routes
- # ------
-
-+if Swagger:
-+ staticroute = "/legacy"
-+else:
-+ staticroute = "/"
-
--@app.route("/legacy")
-+@app.route(staticroute)
- def view_landing_page():
- """Generates Landing Page in legacy layout."""
- return render_template("index.html")
-diff --git a/pyproject.toml b/pyproject.toml
-index 43b6bfa..192fdab 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -33,7 +33,6 @@ classifiers = [
- dependencies = [
- "brotlicffi",
- "decorator",
-- "flasgger",
- "flask >= 2.2.4",
- 'greenlet < 3.0; python_version<"3.12"',
- 'greenlet >= 3.0.0a1; python_version>="3.12.0rc0"',
-@@ -45,6 +44,7 @@ dependencies = [
- [project.optional-dependencies]
- test = ["pytest", "tox"]
- mainapp = [
-+ "flasgger",
- "gunicorn",
- "gevent",
- ]
---
-2.44.0
-
diff --git a/0001-Replace-deprecated-JSONIFY_PRETTYPRINT_REGULAR-usage.patch b/0001-Replace-deprecated-JSONIFY_PRETTYPRINT_REGULAR-usage.patch
deleted file mode 100644
index 6d6e1d3..0000000
--- a/0001-Replace-deprecated-JSONIFY_PRETTYPRINT_REGULAR-usage.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a576ebe2a82d3bc5c8d4cf05d3f077e23f34c114 Mon Sep 17 00:00:00 2001
-From: Adam Williamson <awilliam@redhat.com>
-Date: Tue, 17 Oct 2023 18:42:22 -0700
-Subject: [PATCH] Replace deprecated JSONIFY_PRETTYPRINT_REGULAR usage
-
-This was deprecated in 2.2.0, and is gone in 2.3.0. We already
-require 2.2.4 or higher. The deprecation notice says to set
-`app.json.compact` instead, so we'll do that!
-
-Signed-off-by: Adam Williamson <awilliam@redhat.com>
----
- httpbin/core.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/httpbin/core.py b/httpbin/core.py
-index a82c1b8..aef8262 100644
---- a/httpbin/core.py
-+++ b/httpbin/core.py
-@@ -89,7 +89,7 @@ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")
-
- app = Flask(__name__, template_folder=tmpl_dir)
- app.debug = bool(os.environ.get("DEBUG"))
--app.config["JSONIFY_PRETTYPRINT_REGULAR"] = True
-+app.json.compact = False
-
- app.add_template_global("HTTPBIN_TRACKING" in os.environ, name="tracking_enabled")
-
---
-2.41.0
-
diff --git a/python-httpbin.spec b/python-httpbin.spec
index b701868..24d4940 100644
--- a/python-httpbin.spec
+++ b/python-httpbin.spec
@@ -8,25 +8,13 @@ This exists to cover all kinds of HTTP scenarios. Additional endpoints are \
being considered. All endpoint responses are JSON-encoded.
Name: python-%{modname}
-Version: 0.10.2
+Version: 0.10.4
Release: %autorelease
Summary: HTTP Request & Response Service, written in Python + Flask
License: MIT
URL: https://github.com/psf/httpbin
Source: https://files.pythonhosted.org/packages/source/h/%{modname}/%{modname}-%{version}.tar.gz
-# https://github.com/psf/httpbin/issues/26
-# https://github.com/psf/httpbin/pull/32
-# Make the dependency on flasgger optional - it has a heavy dep chain
-# of its own and is hard to package, and is not needed for using
-# httpbin as a library
-Patch: 0001-Make-flasgger-dep-optional-26.patch
-# https://github.com/psf/httpbin/pull/34
-# Replace use of a deprecated Flask config setting
-Patch: 0001-Replace-deprecated-JSONIFY_PRETTYPRINT_REGULAR-usage.patch
-# https://github.com/psf/httpbin/pull/41
-# Fix /bytes endpoint with newer werkzeug versions
-Patch: 0001-Fix-bytes-endpoint-with-newer-werkzeug-versions.patch
BuildArch: noarch
%description
diff --git a/sources b/sources
index 1dbc59a..263a2ff 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (httpbin-0.10.2.tar.gz) = 731b842090be516d9eccb1d2bb8303128d2b2e24b1ebf0b2018a2f0b8629b164c7de686e1775841cd57417ec89941d98fc81f878a284c7242bfef4db481a781b
+SHA512 (httpbin-0.10.4.tar.gz) = dab715d21a134bf3b3d4d929c5685041195d383a91ee2dae2bbe13dcc9fbe5f4d60dc8131438547a48606997437ea7f5e77e0ed3d3d34e358fea88283de54a37
reply other threads:[~2026-06-18 7:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178176725062.1.5616142538586937505.rpms-python-httpbin-06347493e0f3@fedoraproject.org \
--to=awilliam@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox