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: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
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: ---


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

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d

commit 2ff43c35f7c0b91e2d1a2bb2c6ef3abfd349866d
Author:     Alan Swanson <reiver@improbability.net>
AuthorDate: 2024-07-04 12:51:39 +0000
Commit:     Miroslav Šulc <fordfrog@gentoo.org>
CommitDate: 2024-07-04 13:55:58 +0000

    media-sound/quodlibet: add python3_12 support
    
    Closes: https://bugs.gentoo.org/909994
    Closes: https://bugs.gentoo.org/925283
    
    Signed-off-by: Alan Swanson <reiver@improbability.net>
    Closes: https://github.com/gentoo/gentoo/pull/37428
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>

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