Bug 2431588

Summary: python-hiredis fails to build with Python 3.15: AttributeError: 'SourceFileLoader' object has no attribute 'load_module'. Did you mean: 'exec_module'?
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-hiredisAssignee: Matteo <matteo.centenaro>
Status: CLOSED RAWHIDE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ksurma, matteo.centenaro, mhroncok, orange, paul.wouters, rj.layco
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-01-21 13:23:47 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 2026-01-21 11:51:36 UTC
python-hiredis fails to build with Python 3.15.0a5.
This was addressed upstream: github.com/redis/hiredis-py/pull/218 - opening a bugzilla to track the development.

+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-hiredis-3.3.0-build/pyproject-wheeldir --output /builddir/build/BUILD/python-hiredis-3.3.0-build/python-hiredis-3.3.0-2.fc44.x86_64-pyproject-buildrequires
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
   (installed: setuptools 80.9.0)
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 743, in main
    generate_requires(
    ~~~~~~~~~~~~~~~~~^
        include_runtime=args.runtime,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<11 lines>...
        config_settings=parse_config_settings_args(args.config_settings),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 626, in generate_requires
    generate_build_requirements(backend, requirements)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 313, in generate_build_requirements
    new_reqs = get_requires(requirements.config_settings)
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=[])
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
    self.run_setup()
    ~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 512, in run_setup
    super().run_setup(setup_script=setup_script)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/setuptools/build_meta.py", line 317, in run_setup
    exec(code, locals())
    ~~~~^^^^^^^^^^^^^^^^
  File "<string>", line 55, in <module>
  File "<string>", line 16, in version
AttributeError: 'SourceFileLoader' object has no attribute 'load_module'. Did you mean: 'exec_module'?

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/10038558-python-hiredis/

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

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 Matteo 2026-01-21 13:15:12 UTC
Patch from upsteram issue has been applied in https://src.fedoraproject.org/rpms/python-hiredis/pull-request/1

Comment 2 Matteo 2026-01-21 13:19:58 UTC
@ksurma this issue should have been fixed on rawhide branch, based on https://copr.fedorainfracloud.org/coprs/g/python/python3.15/build/10041880/.

Comment 3 Karolina Surma 2026-01-21 13:23:47 UTC
Thank you! Yes, it's solved now.