python-authlib-1.3.1-4.fc41 fails to build in Fedora rawhide with Python 3.13 with tests enabled. I believe this is due to https://peps.python.org/pep-0667/ =================================== FAILURES =================================== ____________ JWTAccessTokenResourceServerTest.test_access_resource _____________ self = <tests.flask.test_oauth2.test_jwt_access_token.JWTAccessTokenResourceServerTest testMethod=test_access_resource> def test_access_resource(self): headers = {'Authorization': f'Bearer {self.access_token}'} > rv = self.client.get('/protected', headers=headers) tests/flask/test_oauth2/test_jwt_access_token.py:400: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/werkzeug/test.py:1162: in get return self.open(*args, **kw) /usr/lib/python3.13/site-packages/flask/testing.py:235: in open response = super().open( /usr/lib/python3.13/site-packages/werkzeug/test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1498: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1476: in wsgi_app response = self.handle_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:1473: in wsgi_app response = self.full_dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:882: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:880: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:865: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] authlib/integrations/flask_oauth2/resource_protector.py:105: in decorated return f(*args, **kwargs) tests/flask/test_oauth2/test_jwt_access_token.py:52: in protected return jsonify(id=user.id, username=user.username, token=current_token) /usr/lib/python3.13/site-packages/flask/json/__init__.py:170: in jsonify return current_app.json.response(*args, **kwargs) # type: ignore[return-value] /usr/lib/python3.13/site-packages/flask/json/provider.py:214: in response f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype /usr/lib/python3.13/site-packages/flask/json/provider.py:179: in dumps return json.dumps(obj, **kwargs) /usr/lib64/python3.13/json/__init__.py:238: in dumps **kw).encode(obj) /usr/lib64/python3.13/json/encoder.py:200: in encode chunks = self.iterencode(o, _one_shot=True) /usr/lib64/python3.13/json/encoder.py:261: in iterencode return _iterencode(o, 0) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ o = <LocalProxy unbound> def _default(o: t.Any) -> t.Any: if isinstance(o, date): return http_date(o) if isinstance(o, (decimal.Decimal, uuid.UUID)): return str(o) if dataclasses and dataclasses.is_dataclass(o): return dataclasses.asdict(o) if hasattr(o, "__html__"): return str(o.__html__()) > raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") E TypeError: Object of type LocalProxy is not JSON serializable /usr/lib/python3.13/site-packages/flask/json/provider.py:121: TypeError ________ JWTAccessTokenResourceServerTest.test_entitlements_restriction ________ self = <tests.flask.test_oauth2.test_jwt_access_token.JWTAccessTokenResourceServerTest testMethod=test_entitlements_restriction> def test_entitlements_restriction(self): ''' Many authorization servers embed authorization attributes that go beyond the delegated scenarios described by [RFC7519] in the access tokens they issue. Typical examples include resource owner memberships in roles and groups that are relevant to the resource being accessed, entitlements assigned to the resource owner for the targeted resource that the authorization server knows about, and so on. An authorization server wanting to include such attributes in a JWT access token SHOULD use the 'groups', 'roles', and 'entitlements' attributes of the 'User' resource schema defined by Section 4.1.2 of [RFC7643]) as claim types. ''' for claim in ['groups', 'roles', 'entitlements']: claims = create_access_token_claims( self.oauth_client, self.user, self.issuer ) claims[claim] = ['invalid'] access_token = create_access_token(claims, self.jwks) headers = {'Authorization': f'Bearer {access_token}'} > rv = self.client.get('/protected', headers=headers) tests/flask/test_oauth2/test_jwt_access_token.py:551: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/werkzeug/test.py:1162: in get return self.open(*args, **kw) /usr/lib/python3.13/site-packages/flask/testing.py:235: in open response = super().open( /usr/lib/python3.13/site-packages/werkzeug/test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1498: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1476: in wsgi_app response = self.handle_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:1473: in wsgi_app response = self.full_dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:882: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:880: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:865: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] authlib/integrations/flask_oauth2/resource_protector.py:105: in decorated return f(*args, **kwargs) tests/flask/test_oauth2/test_jwt_access_token.py:52: in protected return jsonify(id=user.id, username=user.username, token=current_token) /usr/lib/python3.13/site-packages/flask/json/__init__.py:170: in jsonify return current_app.json.response(*args, **kwargs) # type: ignore[return-value] /usr/lib/python3.13/site-packages/flask/json/provider.py:214: in response f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype /usr/lib/python3.13/site-packages/flask/json/provider.py:179: in dumps return json.dumps(obj, **kwargs) /usr/lib64/python3.13/json/__init__.py:238: in dumps **kw).encode(obj) /usr/lib64/python3.13/json/encoder.py:200: in encode chunks = self.iterencode(o, _one_shot=True) /usr/lib64/python3.13/json/encoder.py:261: in iterencode return _iterencode(o, 0) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ o = <LocalProxy unbound> def _default(o: t.Any) -> t.Any: if isinstance(o, date): return http_date(o) if isinstance(o, (decimal.Decimal, uuid.UUID)): return str(o) if dataclasses and dataclasses.is_dataclass(o): return dataclasses.asdict(o) if hasattr(o, "__html__"): return str(o.__html__()) > raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") E TypeError: Object of type LocalProxy is not JSON serializable /usr/lib/python3.13/site-packages/flask/json/provider.py:121: TypeError ____________ JWTAccessTokenResourceServerTest.test_extra_attributes ____________ self = <tests.flask.test_oauth2.test_jwt_access_token.JWTAccessTokenResourceServerTest testMethod=test_extra_attributes> def test_extra_attributes(self): ''' Authorization servers MAY return arbitrary attributes not defined in any existing specification, as long as the corresponding claim names are collision resistant or the access tokens are meant to be used only within a private subsystem. Please refer to Sections 4.2 and 4.3 of [RFC7519] for details. ''' self.claims['email'] = 'user' access_token = create_access_token(self.claims, self.jwks) headers = {'Authorization': f'Bearer {access_token}'} > rv = self.client.get('/protected', headers=headers) tests/flask/test_oauth2/test_jwt_access_token.py:571: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/werkzeug/test.py:1162: in get return self.open(*args, **kw) /usr/lib/python3.13/site-packages/flask/testing.py:235: in open response = super().open( /usr/lib/python3.13/site-packages/werkzeug/test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1498: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1476: in wsgi_app response = self.handle_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:1473: in wsgi_app response = self.full_dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:882: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:880: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:865: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] authlib/integrations/flask_oauth2/resource_protector.py:105: in decorated return f(*args, **kwargs) tests/flask/test_oauth2/test_jwt_access_token.py:52: in protected return jsonify(id=user.id, username=user.username, token=current_token) /usr/lib/python3.13/site-packages/flask/json/__init__.py:170: in jsonify return current_app.json.response(*args, **kwargs) # type: ignore[return-value] /usr/lib/python3.13/site-packages/flask/json/provider.py:214: in response f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype /usr/lib/python3.13/site-packages/flask/json/provider.py:179: in dumps return json.dumps(obj, **kwargs) /usr/lib64/python3.13/json/__init__.py:238: in dumps **kw).encode(obj) /usr/lib64/python3.13/json/encoder.py:200: in encode chunks = self.iterencode(o, _one_shot=True) /usr/lib64/python3.13/json/encoder.py:261: in iterencode return _iterencode(o, 0) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ o = <LocalProxy unbound> def _default(o: t.Any) -> t.Any: if isinstance(o, date): return http_date(o) if isinstance(o, (decimal.Decimal, uuid.UUID)): return str(o) if dataclasses and dataclasses.is_dataclass(o): return dataclasses.asdict(o) if hasattr(o, "__html__"): return str(o.__html__()) > raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") E TypeError: Object of type LocalProxy is not JSON serializable /usr/lib/python3.13/site-packages/flask/json/provider.py:121: TypeError ___________ JWTAccessTokenResourceServerTest.test_scope_restriction ____________ self = <tests.flask.test_oauth2.test_jwt_access_token.JWTAccessTokenResourceServerTest testMethod=test_scope_restriction> def test_scope_restriction(self): ''' If an authorization request includes a scope parameter, the corresponding issued JWT access token SHOULD include a 'scope' claim as defined in Section 4.2 of [RFC8693]. All the individual scope strings in the 'scope' claim MUST have meaning for the resources indicated in the 'aud' claim. See Section 5 for more considerations about the relationship between scope strings and resources indicated by the 'aud' claim. ''' self.claims['scope'] = ['invalid-scope'] access_token = create_access_token(self.claims, self.jwks) headers = {'Authorization': f'Bearer {access_token}'} > rv = self.client.get('/protected', headers=headers) tests/flask/test_oauth2/test_jwt_access_token.py:522: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/werkzeug/test.py:1162: in get return self.open(*args, **kw) /usr/lib/python3.13/site-packages/flask/testing.py:235: in open response = super().open( /usr/lib/python3.13/site-packages/werkzeug/test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1498: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1476: in wsgi_app response = self.handle_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:1473: in wsgi_app response = self.full_dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:882: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:880: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:865: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] authlib/integrations/flask_oauth2/resource_protector.py:105: in decorated return f(*args, **kwargs) tests/flask/test_oauth2/test_jwt_access_token.py:52: in protected return jsonify(id=user.id, username=user.username, token=current_token) /usr/lib/python3.13/site-packages/flask/json/__init__.py:170: in jsonify return current_app.json.response(*args, **kwargs) # type: ignore[return-value] /usr/lib/python3.13/site-packages/flask/json/provider.py:214: in response f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype /usr/lib/python3.13/site-packages/flask/json/provider.py:179: in dumps return json.dumps(obj, **kwargs) /usr/lib64/python3.13/json/__init__.py:238: in dumps **kw).encode(obj) /usr/lib64/python3.13/json/encoder.py:200: in encode chunks = self.iterencode(o, _one_shot=True) /usr/lib64/python3.13/json/encoder.py:261: in iterencode return _iterencode(o, 0) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ o = <LocalProxy unbound> def _default(o: t.Any) -> t.Any: if isinstance(o, date): return http_date(o) if isinstance(o, (decimal.Decimal, uuid.UUID)): return str(o) if dataclasses and dataclasses.is_dataclass(o): return dataclasses.asdict(o) if hasattr(o, "__html__"): return str(o.__html__()) > raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") E TypeError: Object of type LocalProxy is not JSON serializable /usr/lib/python3.13/site-packages/flask/json/provider.py:121: TypeError __________________ JWTAccessTokenResourceServerTest.test_typ ___________________ self = <tests.flask.test_oauth2.test_jwt_access_token.JWTAccessTokenResourceServerTest testMethod=test_typ> def test_typ(self): ''' The resource server MUST verify that the 'typ' header value is 'at+jwt' or 'application/at+jwt' and reject tokens carrying any other value. ''' access_token = create_access_token(self.claims, self.jwks, typ='at+jwt') headers = {'Authorization': f'Bearer {access_token}'} > rv = self.client.get('/protected', headers=headers) tests/flask/test_oauth2/test_jwt_access_token.py:432: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.13/site-packages/werkzeug/test.py:1162: in get return self.open(*args, **kw) /usr/lib/python3.13/site-packages/flask/testing.py:235: in open response = super().open( /usr/lib/python3.13/site-packages/werkzeug/test.py:1116: in open response_parts = self.run_wsgi_app(request.environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:988: in run_wsgi_app rv = run_wsgi_app(self.application, environ, buffered=buffered) /usr/lib/python3.13/site-packages/werkzeug/test.py:1264: in run_wsgi_app app_rv = app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1498: in __call__ return self.wsgi_app(environ, start_response) /usr/lib/python3.13/site-packages/flask/app.py:1476: in wsgi_app response = self.handle_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:1473: in wsgi_app response = self.full_dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:882: in full_dispatch_request rv = self.handle_user_exception(e) /usr/lib/python3.13/site-packages/flask/app.py:880: in full_dispatch_request rv = self.dispatch_request() /usr/lib/python3.13/site-packages/flask/app.py:865: in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] authlib/integrations/flask_oauth2/resource_protector.py:105: in decorated return f(*args, **kwargs) tests/flask/test_oauth2/test_jwt_access_token.py:52: in protected return jsonify(id=user.id, username=user.username, token=current_token) /usr/lib/python3.13/site-packages/flask/json/__init__.py:170: in jsonify return current_app.json.response(*args, **kwargs) # type: ignore[return-value] /usr/lib/python3.13/site-packages/flask/json/provider.py:214: in response f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype /usr/lib/python3.13/site-packages/flask/json/provider.py:179: in dumps return json.dumps(obj, **kwargs) /usr/lib64/python3.13/json/__init__.py:238: in dumps **kw).encode(obj) /usr/lib64/python3.13/json/encoder.py:200: in encode chunks = self.iterencode(o, _one_shot=True) /usr/lib64/python3.13/json/encoder.py:261: in iterencode return _iterencode(o, 0) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ o = <LocalProxy unbound> def _default(o: t.Any) -> t.Any: if isinstance(o, date): return http_date(o) if isinstance(o, (decimal.Decimal, uuid.UUID)): return str(o) if dataclasses and dataclasses.is_dataclass(o): return dataclasses.asdict(o) if hasattr(o, "__html__"): return str(o.__html__()) > raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable") E TypeError: Object of type LocalProxy is not JSON serializable /usr/lib/python3.13/site-packages/flask/json/provider.py:121: TypeError =========================== short test summary info ============================ FAILED tests/flask/test_oauth2/test_jwt_access_token.py::JWTAccessTokenResourceServerTest::test_access_resource FAILED tests/flask/test_oauth2/test_jwt_access_token.py::JWTAccessTokenResourceServerTest::test_entitlements_restriction FAILED tests/flask/test_oauth2/test_jwt_access_token.py::JWTAccessTokenResourceServerTest::test_extra_attributes FAILED tests/flask/test_oauth2/test_jwt_access_token.py::JWTAccessTokenResourceServerTest::test_scope_restriction FAILED tests/flask/test_oauth2/test_jwt_access_token.py::JWTAccessTokenResourceServerTest::test_typ ================== 5 failed, 203 passed, 1 skipped in 29.37s ===================
Dear Maintainer, your package has an open Fails To Build From Source bug for Fedora 41. Action is required from you. If you can fix your package to build, perform a build in koji, and either create an update in bodhi, or close this bug without creating an update, if updating is not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to acknowledge this. If you have already fixed this issue, please close this Bugzilla report. Following the policy for such packages [2], your package will be orphaned if this bug remains in NEW state more than 8 weeks (not sooner than 2024-08-28). A week before the mass branching of Fedora 42 according to the schedule [3], any packages not successfully rebuilt at least on Fedora 40 will be retired regardless of the status of this bug. [1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/ [2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/ [3] https://fedorapeople.org/groups/schedule/f-42/f-42-key-tasks.html
Upstream bug: https://github.com/lepture/authlib/issues/679
This was built successfully for Python 3.13 with tests disabled as python-authlib-1.3.1-3.fc41. This is the build that was released in F41. https://koji.fedoraproject.org/koji/buildinfo?buildID=2468397 The rawhide branch successfully scratch builds for F41, and can probably be merged back to resolve this bug.
FEDORA-2024-329decf0b6 (python-authlib-1.3.2-5.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-329decf0b6
FEDORA-2024-329decf0b6 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-329decf0b6` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-329decf0b6 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-329decf0b6 (python-authlib-1.3.2-5.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.