File: python314.patch

package info (click to toggle)
beets 2.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,016 kB
  • sloc: python: 46,429; javascript: 8,018; xml: 334; sh: 261; makefile: 125
file content (26 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Pieter Lenaerts <plenae@disroot.org>
Forwarded: https://github.com/beetbox/beets/issues/6230#issuecomment-3696044895
Description: Patch out python 3.14 incompatibility issues
Last-Update: 2025-12-29
--- a/beets/ui/__init__.py
+++ b/beets/ui/__init__.py
@@ -712,7 +712,7 @@
         return fallback

     try:
-        buf = fcntl.ioctl(0, termios.TIOCGWINSZ, " " * 4)
+        buf = fcntl.ioctl(0, termios.TIOCGWINSZ, b'\x00' * 8)
     except OSError:
         return fallback
     try:
--- a/beetsplug/lyrics.py
+++ b/beetsplug/lyrics.py
@@ -745,7 +745,7 @@
     TRANSLATE_URL = "https://api.cognitive.microsofttranslator.com/translate"
     LINE_PARTS_RE = re.compile(r"^(\[\d\d:\d\d.\d\d\]|) *(.*)$")
     SEPARATOR = " | "
-    remove_translations = partial(re.compile(r" / [^\n]+").sub, "")
+    remove_translations = staticmethod(partial(re.compile(r" / [^\n]+").sub, ""))

     _log: Logger
     api_key: str