Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925283 - media-sound/quodlibet-4.6.0-r1 doesn't run in python 3.12
Summary: media-sound/quodlibet-4.6.0-r1 doesn't run in python 3.12
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
Keywords: PATCH, PullRequest
: 929667 (view as bug list)
Depends on:
Blocks: 921826
  Show dependency tree
Reported: 2024-02-22 19:53 UTC by glyphimor
Modified: 2024-07-04 14:00 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---

emerge --info (file_925283.txt,6.90 KB, text/plain)
2024-02-22 19:54 UTC, glyphimor

Note You need to log in before you can comment on or make changes to this bug.
Description glyphimor 2024-02-22 19:53:19 UTC
Many packages recently received python 3.12 use flags. Quodlibet is one of them. I enabled the python_targets_python3_12 flag and compiled it. First attempt:

$ EPYTHON=python3.12 quodlibet

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/quodlibet", line 11, in <module>
    from quodlibet.main import main
  File "/usr/lib/python3.12/site-packages/quodlibet/", line 21, in <module>
    from .util.i18n import _, C_, N_, ngettext, npgettext
  File "/usr/lib/python3.12/site-packages/quodlibet/util/", line 28, in <module>
    from senf import fsnative
ModuleNotFoundError: No module named 'senf'

Senf is some sort of string library that appears to be related to python2/python3 issues. Not sure why this dependency has suddenly appeared. It's not in portage, and I didn't have it installed from PyPI. But after installing senf-1.5.0 successfully, tried quodlibet again:

$ pip install senf --user

$ EPYTHON=python3.12 quodlibet
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/quodlibet", line 14, in <module>
  File "/usr/lib/python3.12/site-packages/quodlibet/", line 25, in main
  File "/usr/lib/python3.12/site-packages/quodlibet/", line 135, in init_cli
  File "/usr/lib/python3.12/site-packages/quodlibet/", line 387, in init
  File "/usr/lib/python3.12/site-packages/quodlibet/util/", line 380, in read
    self._config.readfp(fileobj, filename)
AttributeError: 'RawConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

Quodlibet continues to work in python 3.11:

$ EPYTHON=python3.11 quodlibet

Reproducible: Always

Steps to Reproduce:
1. EPYTHON=python3.12 quodlibet

Actual Results:  
quodlibet crashes

Expected Results:  
quodlibet runs
Comment 1 glyphimor 2024-02-22 19:54:20 UTC
Created attachment 885755 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-27 23:38:52 UTC

I'll let maintainer apply it, but I'll drive-by drop 3.12 for now as it's broken.
Comment 3 Larry the Git Cow gentoo-dev 2024-02-27 23:42:13 UTC
The bug has been referenced in the following commit(s):

commit 7efb87fa077e54211ab63af1333184849e443db2
Author:     Sam James <>
AuthorDate: 2024-02-27 23:39:11 +0000
Commit:     Sam James <>
CommitDate: 2024-02-27 23:39:26 +0000

    media-sound/quodlibet: disable py3.12
    Broken on startup, see bug.
    Signed-off-by: Sam James <>

 media-sound/quodlibet/quodlibet-4.6.0-r1.ebuild | 2 +-
 media-sound/quodlibet/quodlibet-4.6.0.ebuild    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 4 Bernd Feige 2024-03-09 12:18:26 UTC
Just for the record - that patch fixes all python 3.12 problems for me, including the 'senf' import issue (it's included in quodlibet/packages but just not found due to the changed import machinery).

Only other fix necessary for me in the ebuild is to depend upon media-libs/libmodplug .
Comment 5 Eli Schwartz gentoo-dev 2024-06-05 20:25:24 UTC
*** Bug 929667 has been marked as a duplicate of this bug. ***
Comment 6 Larry the Git Cow gentoo-dev 2024-07-04 14:00:01 UTC
The bug has been closed via the following commit(s):

commit 2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d
Author:     Alan Swanson <>
AuthorDate: 2024-07-04 12:51:39 +0000
Commit:     Miroslav Šulc <>
CommitDate: 2024-07-04 13:55:58 +0000

    media-sound/quodlibet: add python3_12 support
    Signed-off-by: Alan Swanson <>
    Signed-off-by: Miroslav Šulc <>

 .../files/quodlibet-4.6.0-python312.patch          | 60 +++++++++++++++++++++
 media-sound/quodlibet/quodlibet-4.6.0-r2.ebuild    | 62 ++++++++++++++++++++++
 2 files changed, 122 insertions(+)