** Summary changed:

- Crashes at boot: "ModuleNotFoundError: No module named 'imp'"
+ osc uses removed modules/functions from Python 3.12, breaking on Noble

** Description changed:

  [ Impact ]
  
-  * osc package does not launch on Noble as Python 3.12 has removed the
- imp module
+  * osc package does not launch on Noble as Python 3.12 has removed the imp 
module
+  * osc cannot log in even if imp module replaced as deprecated 
configparser.read_fd() is used
  
  [ Test Plan ]
  
   * Launching osc with any (or no) arguments on Ubuntu Noble crashes with
  ModuleNotFoundError
  
-  * Launching osc with proposed patch starts successfully
+  * Launching osc with proposed patch starts successfully and is able to
+ log in. To test, create an account at https://openbuildservice.org,
+ attempt any command that requires signing in (e.g. osc whois
+ <youruser>), confirm that osc works as expected.
  
  [ 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.
+  * This patch was initially a cherry-pick of commits ddec088 and
+ 69a68b0; however, the former commit seemed to introduce some behavioral
+ changes outside of the needed patch and the latter added a test case to
+ a file that does not exist in this version.
  
  [ 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.
+ codebase. This patch is simply to replace a removed library and function
+ call with suggested alternatives 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
  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
  ```
  
  Expected: `osc` run with no arguments should not crash.
  
  Reality: `osc` crashes on startup.
+ 
+ [Addition to original bug report]
+ 
+ After the initial bug is patched, a new bug appears where the program
+ crashes due to `configparser.read_fd()` being called when the user signs
+ in to Open Build Service.

-- 
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:
  osc uses removed modules/functions from Python 3.12, breaking on Noble

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

Reply via email to