Bug 2447916

Summary: subunit fails to build with Python 3.15: ModuleNotFoundError: No module named 'testtools.tests.test_testresult'
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: subunitAssignee: Jerry James <loganjerry>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, epel-packagers-sig, ksurma, loganjerry, mhroncok
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subunit-1.4.5-5.fc44 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-03-25 00:56:05 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-03-16 10:43:47 UTC
subunit fails to build with Python 3.15.0a7.

SHELL_SHARE='./shell/share/' \
PYTHONPATH='/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5/python':'/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5':${PYTHONPATH} \
/usr/bin/python3 -m testtools.run all_tests.test_suite
Traceback (most recent call last):
  File "<frozen runpy>", line 196, in _run_module_as_main
  File "<frozen runpy>", line 87, in _run_code
  File "/usr/lib/python3.15/site-packages/testtools/run.py", line 339, in <module>
    main(sys.argv, sys.stdout)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.15/site-packages/testtools/run.py", line 333, in main
    TestProgram(
    ~~~~~~~~~~~^
        argv=argv, testRunner=partial(TestToolsTestRunner, stdout=stdout), stdout=stdout
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.15/site-packages/testtools/run.py", line 223, in __init__
    self.parseArgs(argv)
    ~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib64/python3.15/unittest/main.py", line 142, in parseArgs
    self.createTests()
    ~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.15/unittest/main.py", line 153, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
                                                   self.module)
                                                   ^^^^^^^^^^^^
  File "/usr/lib64/python3.15/unittest/loader.py", line 207, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
              ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/unittest/loader.py", line 192, in loadTestsFromName
    test = obj()
  File "/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5/all_tests.py", line 32, in test_suite
    result.addTest(subunit.test_suite())
                   ~~~~~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5/python/subunit/__init__.py", line 179, in test_suite
    import subunit.tests
  File "/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5/python/subunit/tests/__init__.py", line 29, in <module>
    from subunit.tests import (  # noqa: E402
    ...<14 lines>...
    )
  File "/builddir/build/BUILD/subunit-1.4.5-build/subunit-1.4.5/python/subunit/tests/test_test_protocol2.py", line 33, in <module>
    from testtools.tests.test_testresult import TestStreamResultContract
ModuleNotFoundError: No module named 'testtools.tests.test_testresult'

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/10222518-subunit/

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

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 2026-03-16 15:52:45 UTC
FEDORA-2026-c9f78b9a79 (subunit-1.4.5-5.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-c9f78b9a79

Comment 2 Fedora Update System 2026-03-17 02:05:37 UTC
FEDORA-2026-c9f78b9a79 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-c9f78b9a79`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-c9f78b9a79

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2026-03-25 00:56:05 UTC
FEDORA-2026-c9f78b9a79 (subunit-1.4.5-5.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.