Bug 2424322

Summary: python-reportlab 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-reportlabAssignee: Antonio T. sagitter <trpost>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: i, ksurma, mhroncok, trpost
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-reportlab-4.4.7-2.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-12-25 09:11:23 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-22 16:16:48 UTC
python-reportlab fails to build with Python 3.15.0a3.

ERROR: test15 (test_lib_utils.ImporterTestCase.test15)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-reportlab-4.4.5-build/reportlab-4.4.5/tests/reportlab/lib/utils.py", line 595, in rl_get_module
    return __rl_get_module__(name,dir)
  File "/builddir/build/BUILD/python-reportlab-4.4.5-build/reportlab-4.4.5/tests/reportlab/lib/utils.py", line 584, in __rl_get_module__
    return spec.loader.load_module()
           ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'SourceFileLoader' object has no attribute 'load_module'. Did you mean: 'exec_module'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/python-reportlab-4.4.5-build/reportlab-4.4.5/tests/test_lib_utils.py", line 206, in test15
    m = rl_get_module(self._testmodulename,self._tempdir)
  File "/builddir/build/BUILD/python-reportlab-4.4.5-build/reportlab-4.4.5/tests/reportlab/lib/utils.py", line 604, in rl_get_module
    raise ImportError('%s[%s]' % (name,dir))
ImportError: test_module_1766151361[/tmp/ReportLab_tmp1000/reportlab_test/tmp_1766151361]

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/09935413-python-reportlab/

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

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 Fedora Update System 2025-12-25 09:09:02 UTC
FEDORA-2025-a05a24c77c (python-reportlab-4.4.7-2.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-a05a24c77c

Comment 2 Fedora Update System 2025-12-25 09:11:23 UTC
FEDORA-2025-a05a24c77c (python-reportlab-4.4.7-2.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.