Bug 2466677

Summary: rpm-spec-language-server fails to build with Python 3.15: TypeError: cache_from_source() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: rpm-spec-language-serverAssignee: Jakub Kadlčík <jkadlcik>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 45CC: jkadlcik, ksurma, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434    

Description Karolina Surma 2026-05-05 09:26:16 UTC
rpm-spec-language-server fails to build with Python 3.15.0a8.


+ /usr/bin/pytest --deselect tests/test_extract_docs.py::test_fetch_upstream_spec_md --deselect tests/test_extract_docs.py::test_parse_upstream_spec_md --deselect tests/test_extract_docs.py::test_cache_creation --deselect tests/test_extract_docs.py::test_spec_md_fetched_from_upstream_if_not_in_rpm_package
ImportError while loading conftest '/builddir/build/BUILD/rpm-spec-language-server-0.0.2-build/rpm-spec-language-server-0.0.2/tests/conftest.py'.
tests/conftest.py:22: in <module>
    from rpm_spec_language_server.server import (  # noqa: E402
/usr/lib/python3.15/site-packages/typeguard/_importhook.py:98: in exec_module
    super().exec_module(module)
/usr/lib/python3.15/site-packages/typeguard/_importhook.py:51: in optimized_cache_from_source
    return cache_from_source(path, debug_override, optimization=OPTIMIZATION)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   TypeError: cache_from_source() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10398344-rpm-spec-language-server/

For all our attempts to build rpm-spec-language-server with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/rpm-spec-language-server/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Aoife Moloney 2026-08-17 14:37:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.