FTBFS imp module not found

Bug #2044029 reported by Mitchell Dzurick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hibagent (Ubuntu)
Fix Released
Undecided
Mitchell Dzurick

Bug Description

In noble, python3.12 is the default python version, which deprecates the imp module. importlib should be used instead.

test/hibagent_test.py:10
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_hibagent/build/test/hibagent_test.py:10: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
    import imp

.pybuild/cpython3_3.11_hibagent/build/test/hibagent_test.py::TestSwapInitializer::test_background_run
.pybuild/cpython3_3.11_hibagent/build/test/hibagent_test.py::TestSwapInitializer::test_early_interrupt
.pybuild/cpython3_3.11_hibagent/build/test/hibagent_test.py::TestSwapInitializer::test_error
  /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_hibagent/build/test/../../../../agent/hibagent:263: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
    self.thread.setDaemon(True)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================== 8 passed, 1 skipped, 4 warnings in 1.05s ===================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 3.11" returned exit code 13
make: *** [debian/rules:5: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Related branches

Changed in hibagent (Ubuntu):
assignee: nobody → Mitchell Dzurick (mitchdz)
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Two nitpicks:

- the text '<YYYY-MM-DD, last update of the meta-information, optional>' accidentally made it into the patch
- it's more accurate to say that 'imp' was deprecated in 3.11 and *removed* in 3.12; "deprecated" implies that it still exists but it discouraged. Once it's gone, it's beyond deprecated.

Thanks

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thanks Seth, I'll fix those nits.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

nits fixed.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hibagent - 1.0.1+git20230216.9ac1209f7-0ubuntu3

---------------
hibagent (1.0.1+git20230216.9ac1209f7-0ubuntu3) noble; urgency=medium

  * d/p/hibagent-test-use-importlib.patch: use importlib in
    test/hibagent_test.py as imp was removed in python3.12 (LP: #2044029).

 -- Mitchell Dzurick <email address hidden> Mon, 20 Nov 2023 15:51:14 -0700

Changed in hibagent (Ubuntu):
status: New → 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.