[SRU] Quod Libet fails to start with python 3.10, the default for Jammy

Bug #1964791 reported by Alexander Browne
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
quodlibet (Ubuntu)
Fix Released
Undecided
Graham Inggs
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

With Python 3.10 as default, Quod Libet 4.4.0 is completely broken for Ubuntu 22.04 users. It fails to start with the following error:

E: 0.321: errorreport.main.errorhook: collection.py:27:<module>: ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/quodlibet/errorreport/main.py", line 175, in errorhook
    sentry_error = sentry.capture(exc_info, fingerprint=fingerprint)
  File "/usr/lib/python3.10/site-packages/quodlibet/errorreport/sentrywrapper.py", line 247, in capture
    client = Client(
  File "/usr/lib/python3.10/site-packages/quodlibet/packages/raven/base.py", line 224, in __init__
    from raven.context import Context
  File "/usr/lib/python3.10/site-packages/quodlibet/_import.py", line 47, in load_module
    mod = importlib.import_module(loadname)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.10/site-packages/quodlibet/packages/raven/context.py", line 10, in <module>
    from collections import Mapping, Iterable
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

[Test Plan]

* Install quodlibet into Ubuntu Jammy: sudo apt-get install quodlibet
* Try to launch it: quodlibet
* Observe the above stack trace.

[Where problems could occur]

Quod Libet is a GUI application and, as such, should not break any software that could depend on it as a command line application or a library.

In the current Jammy archive, the following packages depend on quodlibet:

 |cairo-dock-musicplayer-plug-in
  task-xfce-desktop
  puddletag
  playerctl
  fvwm-crystal

All of them list quodlibet in the Recommends or Suggests section, not Depends. fvwm-crystal specifically recommends several music player alternatives, not necessarily quodlibet.

----------------------------------------------------------------------

Quod Libet fails to start with python 3.10, which is the default python version for Jammy. This is a known issue upstream (https://github.com/quodlibet/quodlibet/issues/3818). It has been fixed for the latest git version (https://github.com/quodlibet/quodlibet/pull/3800), but no new version has been released yet (https://github.com/quodlibet/quodlibet/issues/3808).

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: quodlibet 4.4.0-2
ProcVersionSignature: Ubuntu 5.15.0-22.22-generic 5.15.19
Uname: Linux 5.15.0-22-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.11-0ubuntu79
Architecture: amd64
CasperMD5CheckResult: pass
Date: Mon Mar 14 10:18:07 2022
InstallationDate: Installed on 2021-11-30 (103 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20211130)
PackageArchitecture: all
ProcEnviron:
 TERM=alacritty
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: quodlibet
UpgradeStatus: No upgrade log present (probably fresh install)

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in quodlibet (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Browne (elcste) wrote :

Quod Libet just released version 4.5, which includes this fix: https://quodlibet.readthedocs.io/en/latest/changelog.html#release-4-5-0

Revision history for this message
Jochen Sprickerhof (v-launchpad-jochen-sprickerhof-de) wrote :

I've uploaded a fixed version to Debian, can someone help with getting that into jammy?

Revision history for this message
Steve Langasek (vorlon) wrote :

There doesn't appear to be anything here which is a matter for the Ubuntu Release team, unsubscribing.

If you need sponsorship of these changes into Ubuntu, please subscribe ubuntu-sponsors.

Maia Everett (linneris)
summary: - Quod Libet fails to start with python 3.10, the default for Jammy
+ [SRU] Please sync quodlibet 4.5.0-1 from Debian unstable into jammy
+ (was: Quod Libet fails to start with python 3.10, the default for Jammy)
Revision history for this message
Maia Everett (linneris) wrote (last edit ): Re: [SRU] Please sync quodlibet 4.5.0-1 from Debian unstable into jammy (was: Quod Libet fails to start with python 3.10, the default for Jammy)

[Impact]

With Python 3.10 as default, Quod Libet 4.4.0 is completely broken for Ubuntu 22.04 users. It fails to start with the following error:

E: 0.321: errorreport.main.errorhook: collection.py:27:<module>: ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/quodlibet/errorreport/main.py", line 175, in errorhook
    sentry_error = sentry.capture(exc_info, fingerprint=fingerprint)
  File "/usr/lib/python3.10/site-packages/quodlibet/errorreport/sentrywrapper.py", line 247, in capture
    client = Client(
  File "/usr/lib/python3.10/site-packages/quodlibet/packages/raven/base.py", line 224, in __init__
    from raven.context import Context
  File "/usr/lib/python3.10/site-packages/quodlibet/_import.py", line 47, in load_module
    mod = importlib.import_module(loadname)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.10/site-packages/quodlibet/packages/raven/context.py", line 10, in <module>
    from collections import Mapping, Iterable
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)

The issue is fixed in Quod Libet 4.5.0, which made it into Debian but not the Jammy release. It should therefore be automatically fixed once the Debian package is autosynced into development version 22.10.

[Test Plan]

* Install quodlibet into Ubuntu Jammy: sudo apt-get install quodlibet
* Try to launch it: quodlibet
* Observe the above stack trace.
* Build and install quodlibet package version 4.5.0-1 from Debian.
* Observe that the application correctly starts and runs.

I myself have tested quodlibet 4.5.0-1 on my machine after doing a no-change Jammy build with pbuilder.

[Where problems could occur]

Quod Libet is a GUI application and, as such, should not break any software that could depend on it as a command line application or a library.

The changelog between 4.4.0 and 4.5.0 consists of minor quality of life features and bugfixes, so it is unlikely that anything will be broken. I myself use Quod Libet as my primary music player, and so far 4.5.0-1 from Debian works correctly for me.

In the current Jammy archive, the following packages depend on quodlibet:

 |cairo-dock-musicplayer-plug-in
  task-xfce-desktop
  puddletag
  playerctl
  fvwm-crystal

All of them list quodlibet in the Recommends or Suggests section, not Depends. fvwm-crystal specifically recommends several music player alternatives, not necessarily quodlibet. As the MPRIS functionality did not change in 4.5.0, it is unlikely that any applications using MPRIS to control Quod Libet would be affected.

An alternative to updating to stable release 4.5.0 would be cherry-picking the Python 3.10 incompatibility fix to version 4.4.0. If the SRU for 4.5.0 is denied, I will prepare a patched 4.4.0 package instead.

Revision history for this message
Graham Inggs (ginggs) wrote :

The diff from 4.4.0-2 to 4.5.0-1 is rather large (2.2 MiB) [1].

Please prepare a debdiff against quodlibet 4.4.0-2 in jammy, cherry-picking the Python 3.10 fix and subscribe ~ubuntu-sponsors to this bug again when ready.

[1] https://launchpad.net/ubuntu/+source/quodlibet/4.5.0-1

Revision history for this message
Maia Everett (linneris) wrote (last edit ):

Attaching debdiff with a minimal fix. Verified to fix the bug on my machine and to build correctly in pbuilder against current jammy.

In kinetic, 4.5.0-1, containing the fix, has been auto-synced from Debian, so nothing needs to be done there.

Maia Everett (linneris)
summary: - [SRU] Please sync quodlibet 4.5.0-1 from Debian unstable into jammy
- (was: Quod Libet fails to start with python 3.10, the default for Jammy)
+ [SRU] Quod Libet fails to start with python 3.10, the default for Jammy
Graham Inggs (ginggs)
Changed in quodlibet (Ubuntu):
assignee: nobody → Graham Inggs (ginggs)
status: Confirmed → In Progress
Graham Inggs (ginggs)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Alexander, or anyone else affected,

Accepted quodlibet into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/quodlibet/4.4.0-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in quodlibet (Ubuntu):
status: In Progress → Fix Released
Changed in quodlibet (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Steve Bamber (stevebamber00) wrote :

Tested version

quodlibet/jammy-proposed,jammy-proposed,now 4.4.0-2ubuntu0.1 all [installed]

Application now launches correctly, new music can be added and tags edited & updated using exfalso.

No new issues found - fix looks good.

Maia Everett (linneris)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
linux4me2 (linux4me2) wrote :

Tested version: quodlibet/jammy-proposed, 4.4.0-2ubuntu0.1

I had an issue with Quod Libet not recognizing two playlists, which were in the old format, not XPSF that 4.4.0 uses.

I installed the plugin "Export as M3U / PLS Playlist File" to try to import an M3U version of one of the two playlists I exported from another machine running the 20.04 version of Quod Libet, and once I installed the plugin, Quod Libet apparently converted the other old playlist I had left in my .config/quodlibet/playlists folder to XPSF format and recognized it. I was also able to import the other playlist from the M3U file (after modifying the paths of each entry to fit the new machine).

Other than that, I didn't find any issues, and the fix appears to work. Thanks!

Graham Inggs (ginggs)
tags: added: verification-done
removed: verification-needed
Revision history for this message
linux4me2 (linux4me2) wrote :

I did a clean minimal install of Ubuntu 22.04 on another machine, then added the jammy-proposed repo and installed Quod Libet 4.4.0-2ubuntu0.1 on it. It added all the necessary dependencies, Quod Libet starts normally, imports playlists, manages playlists, adds/deletes/scans libraries, and resumes playback on startup as it should. Looks good.

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

This bug was fixed in the package quodlibet - 4.4.0-2ubuntu0.1

---------------
quodlibet (4.4.0-2ubuntu0.1) jammy; urgency=medium

  * Added python-3.10.patch, fixing compatibility with Python 3.10.
    Cherry-picked from upstream release 4.5.0. (LP: #1964791)

 -- Maia Everett <email address hidden> Sat, 07 May 2022 17:32:15 +0700

Changed in quodlibet (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for quodlibet has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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