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
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-02-22 19:53 UTC by glyphimor
Modified: 2024-03-09 12:18 UTC (History)
3 users (show)

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


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

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/__init__.py", line 21, in <module>
    from .util.i18n import _, C_, N_, ngettext, npgettext
  File "/usr/lib/python3.12/site-packages/quodlibet/util/__init__.py", 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>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/quodlibet/main.py", line 25, in main
    quodlibet.init_cli(config_file=config_file)
  File "/usr/lib/python3.12/site-packages/quodlibet/_init.py", line 135, in init_cli
    config.init(config_file)
  File "/usr/lib/python3.12/site-packages/quodlibet/config.py", line 387, in init
    _config.read(filename)
  File "/usr/lib/python3.12/site-packages/quodlibet/util/config.py", 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
Patch: https://github.com/quodlibet/quodlibet/commit/a8b6f6bb34864a6821174edbf7802b689e440db3.

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):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7efb87fa077e54211ab63af1333184849e443db2

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

    media-sound/quodlibet: disable py3.12
    
    Broken on startup, see bug.
    
    Bug: https://bugs.gentoo.org/925283
    Signed-off-by: Sam James <sam@gentoo.org>

 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 .