FTBFS against python 3.11.7 due to use of module "meant for internal use by Python only"

Bug #2046363 reported by Dan Bungert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Undecided
Dan Bungert

Bug Description

Attempting to build ubiquity on noble fails like so:

+======================================================================
+ERROR: test_ubi_partman (unittest.loader._FailedTest.test_ubi_partman)
+----------------------------------------------------------------------
+ImportError: Failed to import test module: test_ubi_partman
+Traceback (most recent call last):
+ File "/usr/lib/python3.11/unittest/loader.py", line 162, in loadTestsFromName
+ module = __import__(module_name)
+ ^^^^^^^^^^^^^^^^^^^^^^^
+ File "/tmp/autopkgtest.NpvRQz/build.mFW/src/tests/test_ubi_partman.py", line 5, in <module>
+ from test.support import run_unittest
+ImportError: cannot import name 'run_unittest' from 'test.support' (/usr/lib/python3.11/test/support/__init__.py)

The test module has the following note:

Note
The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python.

run_unittest is no longer offered by test.support, so this is a Ubiquity bug for using this internal-use only module.

For the purposes of Ubuntu Noble, this change appears as of python 3.11.7.

Dan Bungert (dbungert)
description: updated
Changed in ubiquity (Ubuntu):
assignee: nobody → Dan Bungert (dbungert)
Dan Bungert (dbungert)
Changed in ubiquity (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 24.04.1

---------------
ubiquity (24.04.1) noble; urgency=medium

  * Fix unit tests by discontinuing use of the internal-to-python `test`
    module. (LP: #2046363)

 -- Dan Bungert <email address hidden> Wed, 13 Dec 2023 11:12:46 -0700

Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.