Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Authlib for openSUSE:Factory checked in at 2024-10-31 16:10:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Authlib (Old) and /work/SRC/openSUSE:Factory/.python-Authlib.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Authlib" Thu Oct 31 16:10:05 2024 rev:16 rq:1219795 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Authlib/python-Authlib.changes 2024-09-30 15:38:54.521291952 +0200 +++ /work/SRC/openSUSE:Factory/.python-Authlib.new.2020/python-Authlib.changes 2024-10-31 16:10:24.937705092 +0100 @@ -1,0 +2,6 @@ +Thu Oct 31 09:13:27 UTC 2024 - Dirk Müller <dmueller@suse.com> + +- add py313-tests.patch +- modernize spec file + +------------------------------------------------------------------- New: ---- py313-tests.patch BETA DEBUG BEGIN: New: - add py313-tests.patch - modernize spec file BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Authlib.spec ++++++ --- /var/tmp/diff_new_pack.jH98Vl/_old 2024-10-31 16:10:25.393724229 +0100 +++ /var/tmp/diff_new_pack.jH98Vl/_new 2024-10-31 16:10:25.393724229 +0100 @@ -25,7 +25,10 @@ License: BSD-3-Clause URL: https://authlib.org/ Source: https://github.com/lepture/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz +Patch1: https://github.com/lepture/authlib/commit/d282c1afad676cf8ed3670e60fd43516fc... +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: python-rpm-macros # SECTION test requirements BuildRequires: %{python_module anyio} @@ -53,16 +56,16 @@ A Python library for building OAuth and OpenID Connect servers. %prep -%setup -q -n %{modname}-%{version} +%autosetup -p1 -n %{modname}-%{version} # Remove the file containing the commercial license so licensedigger # doesn't complain about the dual license rm COMMERCIAL-LICENSE %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -81,5 +84,5 @@ %doc README.rst %license LICENSE %{python_sitelib}/%{modname} -%{python_sitelib}/Authlib-%{version}*-info +%{python_sitelib}/Authlib-%{version}.dist-info ++++++ py313-tests.patch ++++++ From d282c1afad676cf8ed3670e60fd43516fc9615de Mon Sep 17 00:00:00 2001 From: "Kai A. Hiller" <git@kaialexhiller.de> Date: Sun, 20 Oct 2024 16:56:25 +0200 Subject: [PATCH] tests: Dereference LocalProxy before serialization --- .../test_oauth2/test_jwt_access_token.py | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/flask/test_oauth2/test_jwt_access_token.py b/tests/flask/test_oauth2/test_jwt_access_token.py index f4b8cf99..20feb1bb 100644 --- a/tests/flask/test_oauth2/test_jwt_access_token.py +++ b/tests/flask/test_oauth2/test_jwt_access_token.py @@ -49,31 +49,51 @@ def create_resource_protector(app, validator): @require_oauth() def protected(): user = db.session.get(User, current_token['sub']) - return jsonify(id=user.id, username=user.username, token=current_token) + return jsonify( + id=user.id, + username=user.username, + token=current_token._get_current_object(), + ) @app.route('/protected-by-scope') @require_oauth('profile') def protected_by_scope(): user = db.session.get(User, current_token['sub']) - return jsonify(id=user.id, username=user.username, token=current_token) + return jsonify( + id=user.id, + username=user.username, + token=current_token._get_current_object(), + ) @app.route('/protected-by-groups') @require_oauth(groups=['admins']) def protected_by_groups(): user = db.session.get(User, current_token['sub']) - return jsonify(id=user.id, username=user.username, token=current_token) + return jsonify( + id=user.id, + username=user.username, + token=current_token._get_current_object(), + ) @app.route('/protected-by-roles') @require_oauth(roles=['student']) def protected_by_roles(): user = db.session.get(User, current_token['sub']) - return jsonify(id=user.id, username=user.username, token=current_token) + return jsonify( + id=user.id, + username=user.username, + token=current_token._get_current_object(), + ) @app.route('/protected-by-entitlements') @require_oauth(entitlements=['captain']) def protected_by_entitlements(): user = db.session.get(User, current_token['sub']) - return jsonify(id=user.id, username=user.username, token=current_token) + return jsonify( + id=user.id, + username=user.username, + token=current_token._get_current_object(), + ) return require_oauth