httpbin 0.10.2__tar.gz → 0.10.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. {httpbin-0.10.2 → httpbin-0.10.3}/PKG-INFO +10 -4
  2. {httpbin-0.10.2 → httpbin-0.10.3}/README.md +4 -0
  3. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/core.py +2 -2
  4. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin.egg-info/PKG-INFO +10 -4
  5. {httpbin-0.10.2 → httpbin-0.10.3}/pyproject.toml +4 -3
  6. {httpbin-0.10.2 → httpbin-0.10.3}/tests/test_httpbin.py +13 -0
  7. {httpbin-0.10.2 → httpbin-0.10.3}/AUTHORS +0 -0
  8. {httpbin-0.10.2 → httpbin-0.10.3}/LICENSE +0 -0
  9. {httpbin-0.10.2 → httpbin-0.10.3}/LICENSE.ISC +0 -0
  10. {httpbin-0.10.2 → httpbin-0.10.3}/LICENSE.MIT +0 -0
  11. {httpbin-0.10.2 → httpbin-0.10.3}/MANIFEST.in +0 -0
  12. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/__init__.py +0 -0
  13. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/filters.py +0 -0
  14. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/helpers.py +0 -0
  15. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/static/favicon.ico +0 -0
  16. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/structures.py +0 -0
  17. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/UTF-8-demo.txt +0 -0
  18. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/flasgger/index.html +0 -0
  19. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/footer.html +0 -0
  20. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/forms-post.html +0 -0
  21. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/httpbin.1.html +0 -0
  22. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/images/jackal.jpg +0 -0
  23. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/images/pig_icon.png +0 -0
  24. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/images/svg_logo.svg +0 -0
  25. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/images/wolf_1.webp +0 -0
  26. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/index.html +0 -0
  27. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/moby.html +0 -0
  28. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/sample.xml +0 -0
  29. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/templates/trackingscripts.html +0 -0
  30. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin/utils.py +0 -0
  31. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin.egg-info/SOURCES.txt +0 -0
  32. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin.egg-info/dependency_links.txt +0 -0
  33. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin.egg-info/requires.txt +0 -0
  34. {httpbin-0.10.2 → httpbin-0.10.3}/httpbin.egg-info/top_level.txt +0 -0
  35. {httpbin-0.10.2 → httpbin-0.10.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: httpbin
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: HTTP Request and Response Service
5
5
  Author-email: Kenneth Reitz <me@kennethreitz.org>
6
6
  License: MIT or ISC
@@ -12,13 +12,14 @@ Classifier: Natural Language :: English
12
12
  Classifier: License :: OSI Approved :: ISC License (ISCL)
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3.7
16
15
  Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
- Requires-Python: >=3.7
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Requires-Python: >=3.8
22
23
  Description-Content-Type: text/markdown
23
24
  License-File: LICENSE
24
25
  License-File: LICENSE.ISC
@@ -39,6 +40,7 @@ Requires-Dist: tox; extra == "test"
39
40
  Provides-Extra: mainapp
40
41
  Requires-Dist: gunicorn; extra == "mainapp"
41
42
  Requires-Dist: gevent; extra == "mainapp"
43
+ Dynamic: license-file
42
44
 
43
45
  # httpbin(1): HTTP Request & Response Service
44
46
 
@@ -117,6 +119,10 @@ Releases are triggered on commits tagged with `release-` (for example
117
119
 
118
120
 
119
121
  ## Changelog
122
+ * 0.10.3:
123
+ - Fixed the /bytes endpoint to return bytes (not bytearray) for WSGI compliance with newer Werkzeug, thanks @swt2c
124
+ - Dropped support for Python 3.7
125
+ - Build and publish arm64 Docker images
120
126
  * 0.10.2:
121
127
  - Added support for Flask 3.0
122
128
  * 0.10.1:
@@ -75,6 +75,10 @@ Releases are triggered on commits tagged with `release-` (for example
75
75
 
76
76
 
77
77
  ## Changelog
78
+ * 0.10.3:
79
+ - Fixed the /bytes endpoint to return bytes (not bytearray) for WSGI compliance with newer Werkzeug, thanks @swt2c
80
+ - Dropped support for Python 3.7
81
+ - Build and publish arm64 Docker images
78
82
  * 0.10.2:
79
83
  - Added support for Flask 3.0
80
84
  * 0.10.1:
@@ -89,7 +89,7 @@ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")
89
89
 
90
90
  app = Flask(__name__, template_folder=tmpl_dir)
91
91
  app.debug = bool(os.environ.get("DEBUG"))
92
- app.config["JSONIFY_PRETTYPRINT_REGULAR"] = True
92
+ app.json.compact = False
93
93
 
94
94
  app.add_template_global("HTTPBIN_TRACKING" in os.environ, name="tracking_enabled")
95
95
 
@@ -1449,7 +1449,7 @@ def random_bytes(n):
1449
1449
  response = make_response()
1450
1450
 
1451
1451
  # Note: can't just use os.urandom here because it ignores the seed
1452
- response.data = bytearray(random.randint(0, 255) for i in range(n))
1452
+ response.data = bytes(random.randint(0, 255) for i in range(n))
1453
1453
  response.content_type = "application/octet-stream"
1454
1454
  return response
1455
1455
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: httpbin
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: HTTP Request and Response Service
5
5
  Author-email: Kenneth Reitz <me@kennethreitz.org>
6
6
  License: MIT or ISC
@@ -12,13 +12,14 @@ Classifier: Natural Language :: English
12
12
  Classifier: License :: OSI Approved :: ISC License (ISCL)
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3.7
16
15
  Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
- Requires-Python: >=3.7
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Requires-Python: >=3.8
22
23
  Description-Content-Type: text/markdown
23
24
  License-File: LICENSE
24
25
  License-File: LICENSE.ISC
@@ -39,6 +40,7 @@ Requires-Dist: tox; extra == "test"
39
40
  Provides-Extra: mainapp
40
41
  Requires-Dist: gunicorn; extra == "mainapp"
41
42
  Requires-Dist: gevent; extra == "mainapp"
43
+ Dynamic: license-file
42
44
 
43
45
  # httpbin(1): HTTP Request & Response Service
44
46
 
@@ -117,6 +119,10 @@ Releases are triggered on commits tagged with `release-` (for example
117
119
 
118
120
 
119
121
  ## Changelog
122
+ * 0.10.3:
123
+ - Fixed the /bytes endpoint to return bytes (not bytearray) for WSGI compliance with newer Werkzeug, thanks @swt2c
124
+ - Dropped support for Python 3.7
125
+ - Build and publish arm64 Docker images
120
126
  * 0.10.2:
121
127
  - Added support for Flask 3.0
122
128
  * 0.10.1:
@@ -8,8 +8,8 @@ Repository = "https://github.com/psf/httpbin"
8
8
 
9
9
  [project]
10
10
  name = "httpbin"
11
- version = "0.10.2"
12
- requires-python = ">=3.7"
11
+ version = "0.10.3"
12
+ requires-python = ">=3.8"
13
13
  description = "HTTP Request and Response Service"
14
14
  readme = "README.md"
15
15
  license = {text = "MIT or ISC"}
@@ -23,12 +23,13 @@ classifiers = [
23
23
  "License :: OSI Approved :: ISC License (ISCL)",
24
24
  "License :: OSI Approved :: MIT License",
25
25
  "Programming Language :: Python",
26
- "Programming Language :: Python :: 3.7",
27
26
  "Programming Language :: Python :: 3.8",
28
27
  "Programming Language :: Python :: 3.9",
29
28
  "Programming Language :: Python :: 3.10",
30
29
  "Programming Language :: Python :: 3.11",
31
30
  "Programming Language :: Python :: 3.12",
31
+ "Programming Language :: Python :: 3.13",
32
+ "Programming Language :: Python :: 3.14",
32
33
  ]
33
34
  dependencies = [
34
35
  "brotlicffi",
@@ -519,6 +519,19 @@ class HttpbinTestCase(unittest.TestCase):
519
519
  response.data, b'\xc5\xd7\x14\x84\xf8\xcf\x9b\xf4\xb7o'
520
520
  )
521
521
 
522
+ def test_bytes_endpoint_yields_bytes(self):
523
+ """WSGI bodies must be bytes (not bytearray) so strict servers
524
+ (wsgiref / pytest-httpbin) don't 500. The test client coerces the
525
+ body, so we inspect the raw WSGI iterable. Regression for /bytes."""
526
+ from werkzeug.test import create_environ
527
+ env = create_environ('/bytes/64', 'http://localhost/')
528
+ chunks = list(httpbin.app(env, lambda *a, **k: None))
529
+ self.assertTrue(chunks, "no body produced")
530
+ self.assertTrue(
531
+ all(type(c) is bytes for c in chunks),
532
+ [type(c).__name__ for c in chunks]
533
+ )
534
+
522
535
  def test_delete_endpoint_returns_body(self):
523
536
  response = self.app.delete(
524
537
  '/delete',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes