Bug 2447916 - subunit fails to build with Python 3.15: ModuleNotFoundError: No module named 'testtools.tests.test_testresult'
Summary: subunit fails to build with Python 3.15: ModuleNotFoundError: No module named...
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: subunit
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-03-16 10:43 UTC by Karolina Surma
Modified: 2026-03-17 02:05 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.