commit python-httpbin for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-httpbin for openSUSE:Factory checked in at 2024-10-02 21:32:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-httpbin (Old) and /work/SRC/openSUSE:Factory/.python-httpbin.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-httpbin" Wed Oct 2 21:32:49 2024 rev:10 rq:1204968 version:0.10.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-httpbin/python-httpbin.changes 2023-10-26 17:12:16.727552730 +0200 +++ /work/SRC/openSUSE:Factory/.python-httpbin.new.19354/python-httpbin.changes 2024-10-02 21:33:12.721951388 +0200 @@ -1,0 +2,8 @@ +Tue Oct 1 14:35:38 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> + +- Update to 0.10.2 + * Added support for Flask 3.0 +- Drop flask3.patch, merged upstream +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- flask3.patch httpbin-0.10.1.tar.gz New: ---- httpbin-0.10.2.tar.gz BETA DEBUG BEGIN: Old: * Added support for Flask 3.0 - Drop flask3.patch, merged upstream - Update Requires from setup.py BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-httpbin.spec ++++++ --- /var/tmp/diff_new_pack.OKhcQI/_old 2024-10-02 21:33:13.221972176 +0200 +++ /var/tmp/diff_new_pack.OKhcQI/_new 2024-10-02 21:33:13.221972176 +0200 @@ -19,14 +19,12 @@ %define modname httpbin %{?sle15_python_module_pythons} Name: python-httpbin -Version: 0.10.1 +Version: 0.10.2 Release: 0 Summary: HTTP Request and Response Service License: MIT URL: https://github.com/psf/httpbin Source: https://files.pythonhosted.org/packages/source/h/%{modname}/%{modname}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM https://github.com/psf/httpbin/pull/29 Support Flask 3.0 -Patch: flask3.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Flask >= 2.2.4} BuildRequires: %{python_module Werkzeug >= 2.0} @@ -41,7 +39,7 @@ BuildRequires: python-rpm-macros Requires: python-Brotli Requires: python-Flask >= 2.2.4 -Requires: python-Werkzeug >= 2.0 +Requires: python-Werkzeug >= 2.2.2 Requires: python-decorator Requires: python-flasgger Requires: python-gevent ++++++ httpbin-0.10.1.tar.gz -> httpbin-0.10.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/PKG-INFO new/httpbin-0.10.2/PKG-INFO --- old/httpbin-0.10.1/PKG-INFO 2023-08-29 00:56:26.236757000 +0200 +++ new/httpbin-0.10.2/PKG-INFO 2024-02-20 22:30:02.681246300 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: httpbin -Version: 0.10.1 +Version: 0.10.2 Summary: HTTP Request and Response Service Author-email: Kenneth Reitz <me@kennethreitz.org> License: MIT or ISC @@ -20,12 +20,25 @@ Classifier: Programming Language :: Python :: 3.12 Requires-Python: >=3.7 Description-Content-Type: text/markdown -Provides-Extra: test -Provides-Extra: mainapp License-File: LICENSE License-File: LICENSE.ISC License-File: LICENSE.MIT License-File: AUTHORS +Requires-Dist: brotlicffi +Requires-Dist: decorator +Requires-Dist: flasgger +Requires-Dist: flask>=2.2.4 +Requires-Dist: greenlet<3.0; python_version < "3.12" +Requires-Dist: greenlet>=3.0.0a1; python_version >= "3.12.0rc0" +Requires-Dist: importlib-metadata; python_version < "3.8" +Requires-Dist: six +Requires-Dist: werkzeug>=2.2.2 +Provides-Extra: test +Requires-Dist: pytest; extra == "test" +Requires-Dist: tox; extra == "test" +Provides-Extra: mainapp +Requires-Dist: gunicorn; extra == "mainapp" +Requires-Dist: gevent; extra == "mainapp" # httpbin(1): HTTP Request & Response Service @@ -104,6 +117,8 @@ ## Changelog +* 0.10.2: + - Added support for Flask 3.0 * 0.10.1: - Substantial housekeeping, dependency cleanup, image building, and packaging revamp, thanks to @exhuma and @mgorny * 0.10.0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/README.md new/httpbin-0.10.2/README.md --- old/httpbin-0.10.1/README.md 2023-08-29 00:56:17.000000000 +0200 +++ new/httpbin-0.10.2/README.md 2024-02-20 22:29:51.000000000 +0100 @@ -75,6 +75,8 @@ ## Changelog +* 0.10.2: + - Added support for Flask 3.0 * 0.10.1: - Substantial housekeeping, dependency cleanup, image building, and packaging revamp, thanks to @exhuma and @mgorny * 0.10.0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/httpbin/core.py new/httpbin-0.10.2/httpbin/core.py --- old/httpbin-0.10.1/httpbin/core.py 2023-08-29 00:56:17.000000000 +0200 +++ new/httpbin-0.10.2/httpbin/core.py 2024-02-20 22:29:51.000000000 +0100 @@ -32,7 +32,7 @@ from werkzeug.wrappers import Response except ImportError: # werkzeug < 2.1 from werkzeug.wrappers import BaseResponse as Response -from werkzeug.http import parse_authorization_header + from flasgger import Swagger, NO_SANITIZER from . import filters @@ -47,6 +47,7 @@ H, ROBOT_TXT, ANGRY_ASCII, + parse_authorization_header, parse_multi_value_header, next_stale_after_value, digest_challenge_response, @@ -636,16 +637,13 @@ args_dict = request.args.items() args = CaseInsensitiveDict(args_dict) - # We need to build the response manually and convert to UTF-8 to prevent - # werkzeug from "fixing" the URL. This endpoint should set the Location - # header to the exact string supplied. response = app.make_response("") response.status_code = 302 if "status_code" in args: status_code = int(args["status_code"]) if status_code >= 300 and status_code < 400: response.status_code = status_code - response.headers["Location"] = args["url"].encode("utf-8") + response.headers["Location"] = args["url"] return response diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/httpbin/helpers.py new/httpbin-0.10.2/httpbin/helpers.py --- old/httpbin-0.10.1/httpbin/helpers.py 2023-08-29 00:56:17.000000000 +0200 +++ new/httpbin-0.10.2/httpbin/helpers.py 2024-02-20 22:29:51.000000000 +0100 @@ -13,8 +13,14 @@ import time import os from hashlib import md5, sha256, sha512 -from werkzeug.http import parse_authorization_header from werkzeug.datastructures import WWWAuthenticate +from werkzeug.http import dump_header + +try: + from werkzeug.http import parse_authorization_header +except ImportError: # werkzeug < 2.3 + from werkzeug.datastructures import Authorization + parse_authorization_header = Authorization.from_header from flask import request, make_response from six.moves.urllib.parse import urlparse, urlunparse @@ -466,9 +472,14 @@ ]), algorithm) opaque = H(os.urandom(10), algorithm) - auth = WWWAuthenticate("digest") - auth.set_digest('me@kennethreitz.com', nonce, opaque=opaque, - qop=('auth', 'auth-int') if qop is None else (qop,), algorithm=algorithm) - auth.stale = stale + values = { + 'realm': 'me@kennethreitz.com', + 'nonce': nonce, + 'opaque': opaque, + 'qop': dump_header(('auth', 'auth-int') if qop is None else (qop,)), + 'algorithm': algorithm, + 'stale': stale, + } + auth = WWWAuthenticate("digest", values=values) response.headers['WWW-Authenticate'] = auth.to_header() return response diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/httpbin.egg-info/PKG-INFO new/httpbin-0.10.2/httpbin.egg-info/PKG-INFO --- old/httpbin-0.10.1/httpbin.egg-info/PKG-INFO 2023-08-29 00:56:26.000000000 +0200 +++ new/httpbin-0.10.2/httpbin.egg-info/PKG-INFO 2024-02-20 22:30:02.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: httpbin -Version: 0.10.1 +Version: 0.10.2 Summary: HTTP Request and Response Service Author-email: Kenneth Reitz <me@kennethreitz.org> License: MIT or ISC @@ -20,12 +20,25 @@ Classifier: Programming Language :: Python :: 3.12 Requires-Python: >=3.7 Description-Content-Type: text/markdown -Provides-Extra: test -Provides-Extra: mainapp License-File: LICENSE License-File: LICENSE.ISC License-File: LICENSE.MIT License-File: AUTHORS +Requires-Dist: brotlicffi +Requires-Dist: decorator +Requires-Dist: flasgger +Requires-Dist: flask>=2.2.4 +Requires-Dist: greenlet<3.0; python_version < "3.12" +Requires-Dist: greenlet>=3.0.0a1; python_version >= "3.12.0rc0" +Requires-Dist: importlib-metadata; python_version < "3.8" +Requires-Dist: six +Requires-Dist: werkzeug>=2.2.2 +Provides-Extra: test +Requires-Dist: pytest; extra == "test" +Requires-Dist: tox; extra == "test" +Provides-Extra: mainapp +Requires-Dist: gunicorn; extra == "mainapp" +Requires-Dist: gevent; extra == "mainapp" # httpbin(1): HTTP Request & Response Service @@ -104,6 +117,8 @@ ## Changelog +* 0.10.2: + - Added support for Flask 3.0 * 0.10.1: - Substantial housekeeping, dependency cleanup, image building, and packaging revamp, thanks to @exhuma and @mgorny * 0.10.0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/httpbin.egg-info/requires.txt new/httpbin-0.10.2/httpbin.egg-info/requires.txt --- old/httpbin-0.10.1/httpbin.egg-info/requires.txt 2023-08-29 00:56:26.000000000 +0200 +++ new/httpbin-0.10.2/httpbin.egg-info/requires.txt 2024-02-20 22:30:02.000000000 +0100 @@ -1,9 +1,9 @@ -Flask brotlicffi decorator flasgger -werkzeug>=0.14.1 +flask>=2.2.4 six +werkzeug>=2.2.2 [:python_version < "3.12"] greenlet<3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/pyproject.toml new/httpbin-0.10.2/pyproject.toml --- old/httpbin-0.10.1/pyproject.toml 2023-08-29 00:56:17.000000000 +0200 +++ new/httpbin-0.10.2/pyproject.toml 2024-02-20 22:29:51.000000000 +0100 @@ -8,7 +8,7 @@ [project] name = "httpbin" -version = "0.10.1" +version = "0.10.2" requires-python = ">=3.7" description = "HTTP Request and Response Service" readme = "README.md" @@ -31,15 +31,15 @@ "Programming Language :: Python :: 3.12", ] dependencies = [ - "Flask", "brotlicffi", "decorator", "flasgger", + "flask >= 2.2.4", 'greenlet < 3.0; python_version<"3.12"', 'greenlet >= 3.0.0a1; python_version>="3.12.0rc0"', 'importlib-metadata; python_version<"3.8"', - "werkzeug >= 0.14.1", "six", + "werkzeug >= 2.2.2", ] [project.optional-dependencies] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/httpbin-0.10.1/tests/test_httpbin.py new/httpbin-0.10.2/tests/test_httpbin.py --- old/httpbin-0.10.1/tests/test_httpbin.py 2023-08-29 00:56:17.000000000 +0200 +++ new/httpbin-0.10.2/tests/test_httpbin.py 2024-02-20 22:29:51.000000000 +0100 @@ -146,10 +146,9 @@ self.assertEqual(response.status_code, 200) data = json.loads(response.data.decode('utf-8')) self.assertEqual(data['args'], {}) - self.assertEqual(data['headers']['Host'], 'localhost') self.assertEqual(data['headers']['User-Agent'], 'test') # self.assertEqual(data['origin'], None) - self.assertEqual(data['url'], 'http://localhost/get') + self.assertRegex(data['url'], '^http://[^/]*/get$') self.assertTrue(response.data.endswith(b'\n')) def test_anything(self): @@ -159,8 +158,7 @@ self.assertEqual(response.status_code, 200) data = json.loads(response.data.decode('utf-8')) self.assertEqual(data['args'], {}) - self.assertEqual(data['headers']['Host'], 'localhost') - self.assertEqual(data['url'], 'http://localhost/anything/foo/bar') + self.assertRegex(data['url'], '^http://[^/]*/anything/foo/bar$') self.assertEqual(data['method'], 'GET') self.assertTrue(response.data.endswith(b'\n')) @@ -581,8 +579,8 @@ def test_redirect_absolute_param_n_higher_than_1(self): response = self.app.get('/redirect/5?absolute=true') - self.assertEqual( - response.headers.get('Location'), 'http://localhost/absolute-redirect/4' + self.assertRegex( + response.headers.get('Location'), '^http://[^/]*/absolute-redirect/4$' ) def test_redirect_n_equals_to_1(self): @@ -607,15 +605,15 @@ def test_absolute_redirect_n_higher_than_1(self): response = self.app.get('/absolute-redirect/5') - self.assertEqual( - response.headers.get('Location'), 'http://localhost/absolute-redirect/4' + self.assertRegex( + response.headers.get('Location'), '^http://[^/]*/absolute-redirect/4$' ) def test_absolute_redirect_n_equals_to_1(self): response = self.app.get('/absolute-redirect/1') self.assertEqual(response.status_code, 302) - self.assertEqual( - response.headers.get('Location'), 'http://localhost/get' + self.assertRegex( + response.headers.get('Location'), '^http://[^/]*/get$' ) def test_request_range(self):
participants (1)
-
Source-Sync