** Description changed: + [ Impact ] + + * osc package does not launch on Noble as Python 3.12 has removed the + imp module + + [ Test Plan ] + + * Launching osc with any (or no) arguments on Ubuntu Noble crashes with + ModuleNotFoundError + + * Launching osc with proposed patch starts successfully + + [ Where problems could occur ] + + * This patch cherry-picks the upstream commit which seems to make + slightly more changes than what is advertised in the commit message. + + [ Other Info ] + + * I am not a maintainer of osc upstream, nor am I too familiar with its + codebase. This patch is simply to replace a removed library with the + suggested alternative as was done upstream. This issue is already + patched in all future versions of Ubuntu and does not apply to previous + versions as Python 3.12 did not ship with them. + + [Original bug report] + For `osc` in Ubuntu Noble, the program crashes at startup with the following error: ``` $ osc Traceback (most recent call last): - File "/usr/bin/osc", line 10, in <module> - from osc import commandline, babysitter - File "/usr/lib/python3/dist-packages/osc/commandline.py", line 14, in <module> - import imp + File "/usr/bin/osc", line 10, in <module> + from osc import commandline, babysitter + File "/usr/lib/python3/dist-packages/osc/commandline.py", line 14, in <module> + import imp ModuleNotFoundError: No module named 'imp' ``` This is due to the `imp` module being deprecated with Python 3.4 and removed in Python 3.12. https://docs.python.org/3.11/library/imp.html --- ``` $ lsb_release -rd No LSB modules are available. Description: Ubuntu 24.04.2 LTS Release: 24.04 ``` ``` $ apt-cache policy osc osc: - Installed: 0.169.1-2 - Candidate: 0.169.1-2 - Version table: - *** 0.169.1-2 500 - 500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages - 100 /var/lib/dpkg/status + Installed: 0.169.1-2 + Candidate: 0.169.1-2 + Version table: + *** 0.169.1-2 500 + 500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages + 100 /var/lib/dpkg/status ``` Expected: `osc` run with no arguments should not crash. Reality: `osc` crashes on startup.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2122165 Title: Crashes at boot: "ModuleNotFoundError: No module named 'imp'" To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/osc/+bug/2122165/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
