quodlibet: update to 4.7.1

This commit is contained in:
Settyness
2026-06-14 05:19:36 +02:00
committed by Duncan Overbruck
parent d888f396cc
commit 529624ab18
2 changed files with 7 additions and 78 deletions
@@ -1,72 +0,0 @@
From a8b6f6bb34864a6821174edbf7802b689e440db3 Mon Sep 17 00:00:00 2001
From: LuK1337 <priv.luk@gmail.com>
Date: Wed, 23 Aug 2023 17:13:23 +0200
Subject: [PATCH] Fix startup on Python 3.12
---
quodlibet/_import.py | 6 ++++++
quodlibet/util/config.py | 2 +-
quodlibet/util/importhelper.py | 6 +++---
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/quodlibet/_import.py b/quodlibet/_import.py
index 5e76b67295..22bd5e3140 100644
--- a/quodlibet/_import.py
+++ b/quodlibet/_import.py
@@ -8,6 +8,7 @@
import sys
import importlib
+import importlib.util
class RedirectImportHook:
@@ -31,6 +32,11 @@ def __init__(self, name, packages):
self._name = name
self._packages = packages
+ def find_spec(self, fullname, path, target=None):
+ loader = self.find_module(fullname, path)
+ if loader is not None:
+ return importlib.util.spec_from_loader(fullname, loader)
+
def find_module(self, fullname, path=None):
package = fullname.split(".")[0]
if package in self._packages:
diff --git a/quodlibet/util/config.py b/quodlibet/util/config.py
index 1c214ac0b4..f0688f9bf9 100644
--- a/quodlibet/util/config.py
+++ b/quodlibet/util/config.py
@@ -377,7 +377,7 @@ def read(self, filename):
with open(filename, "rb") as fileobj:
fileobj = StringIO(
fileobj.read().decode("utf-8", "surrogateescape"))
- self._config.readfp(fileobj, filename)
+ self._config.read_file(fileobj, filename)
except (IOError, OSError):
return
diff --git a/quodlibet/util/importhelper.py b/quodlibet/util/importhelper.py
index f14b11f4b6..c82ded5878 100644
--- a/quodlibet/util/importhelper.py
+++ b/quodlibet/util/importhelper.py
@@ -92,8 +92,8 @@ def load_module(name, package, path):
except KeyError:
pass
- loader = importlib.find_loader(fullname, [path])
- if loader is None:
+ spec = importlib.machinery.PathFinder.find_spec(fullname, [path])
+ if spec is None:
return
# modules need a parent package
@@ -101,7 +101,7 @@ def load_module(name, package, path):
spec = importlib.machinery.ModuleSpec(package, None, is_package=True)
sys.modules[package] = importlib.util.module_from_spec(spec)
- mod = loader.load_module(fullname)
+ mod = spec.loader.load_module(fullname)
# make it accessible from the parent, like __import__ does
vars(sys.modules[package])[name] = mod
+7 -6
View File
@@ -1,16 +1,17 @@
# Template file for 'quodlibet'
pkgname=quodlibet
version=4.6.0
revision=4
version=4.7.1
revision=1
build_style=python3-module
hostmakedepends="intltool python3-devel python3-setuptools"
depends="desktop-file-utils gst-plugins-bad1 gst-plugins-base1 gst-plugins-good1
gst-plugins-ugly1 gtk+3 hicolor-icon-theme python3-dbus python3-feedparser
python3-gobject python3-mutagen libsoup3"
short_desc="Music Library/Editor/Player"
gst-plugins-ugly1 gtk+3 hicolor-icon-theme python3-cairo python3-dbus python3-feedparser
python3-gobject python3-mutagen libkeybinder3 libsoup3"
short_desc="Cross-platform audio and music management program"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://quodlibet.readthedocs.io/en/latest/"
changelog="https://quodlibet.readthedocs.io/en/latest/changelog.html"
distfiles="https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz"
checksum=5b5fe4b2662281897aaf34123dae61656dc0eea5f8186a5169db95a93a3efe29
checksum="b77ce02a3144133acc37489dc8cea2afc71a22ce0ed1e780fe92072012f03dd1"
make_check=no # requires X server