crmsh fails its autopkgtests with Python 3.12

Bug #2052018 reported by Shengjing Zhu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
booth (Ubuntu)
Fix Released
Undecided
Unassigned
crmsh (Debian)
Fix Released
Unknown
crmsh (Ubuntu)
Fix Released
Undecided
Skia

Bug Description

Imported from Debian bug http://bugs.debian.org/1061794:

Package: src:crmsh
Version: 4.5.0-1
Severity: important
Tags: sid trixie ftbfs
User: <email address hidden>
Usertags: python3.12

With python3-defaults from experimental, the package fails its autopkg
tests:

[...]
1370s ==================================== ERRORS
====================================
1370s ______________________ ERROR collecting test_bootstrap.py
______________________
1370s ImportError while importing test module
'/usr/share/crmsh/tests/unittests/test_bootstrap.py'.
1370s Hint: make sure your test modules/packages have valid Python names.
1370s Traceback:
1370s /usr/lib/python3/dist-packages/_pytest/python.py:617: in
_importtestmodule
1370s mod = import_path(self.path, mode=importmode,
root=self.config.rootpath)
1370s /usr/lib/python3/dist-packages/_pytest/pathlib.py:567: in import_path
1370s importlib.import_module(module_name)
1370s /usr/lib/python3.12/importlib/__init__.py:90: in import_module
1370s return _bootstrap._gcd_import(name[level:], package, level)
1370s <frozen importlib._bootstrap>:1387: in _gcd_import
1370s ???
1370s <frozen importlib._bootstrap>:1360: in _find_and_load
1370s ???
1370s <frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
1370s ???
1370s <frozen importlib._bootstrap>:488: in _call_with_frames_removed
1370s ???
1370s <frozen importlib._bootstrap>:1387: in _gcd_import
1370s ???
1370s <frozen importlib._bootstrap>:1360: in _find_and_load
1370s ???
1370s <frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
1370s ???
1370s <frozen importlib._bootstrap>:935: in _load_unlocked
1370s ???
1370s <frozen importlib._bootstrap_external>:994: in exec_module
1370s ???
1370s <frozen importlib._bootstrap>:488: in _call_with_frames_removed
1370s ???
1370s __init__.py:22: in <module>
1370s from crmsh import cibconfig
1370s /usr/lib/python3/dist-packages/crmsh/cibconfig.py:15: in <module>
1370s from . import tmpfiles
1370s /usr/lib/python3/dist-packages/crmsh/tmpfiles.py:13: in <module>
1370s from . import utils
1370s /usr/lib/python3/dist-packages/crmsh/utils.py:37: in <module>
1370s from distutils.version import LooseVersion
1370s E ModuleNotFoundError: No module named 'distutils'
1370s ________________________ ERROR collecting test_bugs.py
_________________________
1370s ImportError while importing test module
'/usr/share/crmsh/tests/unittests/test_bugs.py'.
1370s Hint: make sure your test modules/packages have valid Python names.

Revision history for this message
Shengjing Zhu (zhsj) wrote (last edit ):

The crmsh failure also affects booth autopkgtest, which uses crmsh in the tests.

1174s autopkgtest [14:31:49]: test pacemaker: -----------------------]
1175s autopkgtest [14:31:50]: test pacemaker: - - - - - - - - - - results - - - - - - - - - -
1175s pacemaker FAIL non-zero exit status 1
1175s autopkgtest [14:31:50]: test pacemaker: - - - - - - - - - - stderr - - - - - - - - - -
1175s Fatal error:
1175s No module named 'distutils'
1175s
1175s Failed to start crmsh! This is likely due to:
1175s - A missing dependency (eg. corresponding python3 version)
1175s - A broken installation

tags: added: update-excuse
Changed in crmsh (Debian):
importance: Undecided → Unknown
Revision history for this message
Skia (hyask) wrote :

I've opened an upstream bug for that issue: https://github.com/ClusterLabs/crmsh/issues/1324

Revision history for this message
Skia (hyask) wrote :

Here is a debdiff that should fix the tests against Python 3.12

Changed in crmsh (Ubuntu):
assignee: nobody → Skia (hyask)
Paride Legovini (paride)
summary: - crmsh fails its autopkg tests with Python 3.12
+ crmsh fails its autopkgtests with Python 3.12
Changed in crmsh (Debian):
status: New → Fix Released
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Hi Skia! Thanks for the patch. It was accepted in Debian and already merged in noble.

It seems upstream is suggesting a different approach (using the packaging package) for the LooseVersion replacement instead.

Changed in crmsh (Ubuntu):
status: New → Fix Released
tags: removed: update-excuse
Changed in booth (Ubuntu):
status: New → Fix Released
Revision history for this message
Skia (hyask) wrote :

Just to provide some details on the status of this bug:
- Debian pushed another patch here: https://salsa.debian.org/ha-team/crmsh/-/commit/ccfc10a7450c68db47d241c793a162ba10568b77
- Everything is fixed for both Debian and Ubuntu thanks to that patch, released in crmsh/4.6.0-1
- Upstream is still discussing on the solution to adopt here: https://github.com/ClusterLabs/crmsh/pull/1325

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.