Bug 2424585

Summary: rpmlint fails to build with Python 3.15: AttributeError: 'NoneType' object has no attribute 'get_all'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: rpmlintAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: j, ksurma, mhroncok, spotrh, twoerner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-04-02 14:54:49 UTC 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 2025-12-23 13:13:30 UTC
rpmlint fails to build with Python 3.15.0a3.

_________________ test_python_dependencies_leftover[package0] __________________
[gw0] linux -- Python 3.15.0 /usr/bin/python3

package = <Testing.LazyMock object at 0x7fd20a494bb0>
test = <rpmlint.checks.PythonCheck.PythonCheck object at 0x7fd20858e990>
output = <rpmlint.filter.Filter object at 0x7fd20851e1a0>

    @pytest.mark.parametrize('package', [
        PythonIcecreamLeftoverRequirePackage,
        PythonFlitLeftoverRequirePackage,
    ])
    def test_python_dependencies_leftover(package, test, output):
>       test.check(package)

test/test_python.py:190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
rpmlint/checks/AbstractCheck.py:17: in check
    return self.check_binary(pkg)
           ^^^^^^^^^^^^^^^^^^^^^^
rpmlint/checks/PythonCheck.py:51: in check_binary
    super().check_binary(pkg)
rpmlint/checks/AbstractCheck.py:63: in check_binary
    self.check_file(pkg, filename)
rpmlint/checks/PythonCheck.py:59: in check_file
    self._check_requires(pkg, filename)
rpmlint/checks/PythonCheck.py:118: in _check_requires
    if not d.requires:
           ^^^^^^^^^^
/usr/lib64/python3.15/importlib/metadata/__init__.py:660: in requires
    reqs = self._read_dist_info_reqs() or self._read_egg_info_reqs()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <importlib.metadata.PathDistribution object at 0x7fd208597a70>

    def _read_dist_info_reqs(self):
>       return self.metadata.get_all('Requires-Dist')
               ^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'NoneType' object has no attribute 'get_all'

FAILED test/test_python.py::test_python_dependencies_ipython[package0] - AttributeError: 'NoneType' object has no attribute 'get_all'
FAILED test/test_python.py::test_python_dependencies_requires[package0] - AttributeError: 'NoneType' object has no attribute 'get_all'
FAILED test/test_python.py::test_python_dependencies_missing_requires[package0] - AttributeError: 'NoneType' object has no attribute 'get_all'
FAILED test/test_python.py::test_python_dependencies_leftover[package0] - AttributeError: 'NoneType' object has no attribute 'get_all'

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/09935479-rpmlint/

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

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 Miro Hrončok 2026-01-03 11:13:33 UTC
Reported as a regression in importlib.metadata: https://github.com/python/cpython/issues/143387

Comment 2 Miro Hrončok 2026-04-02 11:48:36 UTC
rpmlint upstream test fix: https://github.com/rpm-software-management/rpmlint/pull/1488