beets: update to 2.6.1.

This commit is contained in:
Joel Beckmeyer
2026-02-07 02:12:29 -05:00
committed by classabbyamp
parent 6f8057fb83
commit d70cfb1cee
2 changed files with 8 additions and 62 deletions
@@ -1,54 +0,0 @@
From 3eb68ef830447d91b10a928823edb3c50cf73f48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= <snejus@protonmail.com>
Date: Sun, 26 Oct 2025 20:37:08 +0000
Subject: [PATCH] Use cross-platform shutil.get_terminal_size to get term_width
This fixes Python 3.14 incompatibility.
---
beets/ui/__init__.py | 26 +++++---------------------
3 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py
index 60e2014485..fe980bb5cf 100644
--- a/beets/ui/__init__.py
+++ b/beets/ui/__init__.py
@@ -23,8 +23,8 @@
import optparse
import os.path
import re
+import shutil
import sqlite3
-import struct
import sys
import textwrap
import traceback
@@ -699,27 +699,11 @@ def get_replacements():
return replacements
-def term_width():
+@cache
+def term_width() -> int:
"""Get the width (columns) of the terminal."""
- fallback = config["ui"]["terminal_width"].get(int)
-
- # The fcntl and termios modules are not available on non-Unix
- # platforms, so we fall back to a constant.
- try:
- import fcntl
- import termios
- except ImportError:
- return fallback
-
- try:
- buf = fcntl.ioctl(0, termios.TIOCGWINSZ, " " * 4)
- except OSError:
- return fallback
- try:
- height, width = struct.unpack("hh", buf)
- except struct.error:
- return fallback
- return width
+ columns, _ = shutil.get_terminal_size(fallback=(0, 0))
+ return columns if columns else config["ui"]["terminal_width"].get(int)
+8 -8
View File
@@ -1,18 +1,18 @@
# Template file for 'beets'
pkgname=beets
version=2.5.1
version=2.6.1
revision=1
build_style=python3-pep517
# tests requires unpackaged librosa, pytest-flask
make_check_args="--ignore=test/plugins/test_autobpm.py
--ignore=test/plugins/test_aura.py"
hostmakedepends="python3-poetry-core python3-Sphinx"
depends="python3-lap python3-musicbrainzngs python3-Unidecode python3-yaml
python3-jellyfish python3-mediafile python3-confuse python3-platformdirs
python3-numpy python3-typing_extensions"
checkdepends="$depends python3-BeautifulSoup4 python3-Flask python3-mock
python3-pylast python3-pytest python3-pytest-cov python3-mpd2 python3-xdg
python3-responses python3-requests-oauthlib python3-reflink python3-rarfile
depends="python3-lap python3-Unidecode python3-yaml python3-jellyfish
python3-mediafile python3-confuse python3-platformdirs python3-numpy
python3-typing_extensions python3-packaging python3-requests-ratelimiter"
checkdepends="$depends python3-BeautifulSoup4 python3-Flask python3-pylast
python3-pytest python3-pytest-cov python3-mpd2 python3-xdg python3-responses
python3-requests-oauthlib python3-reflink python3-rarfile
python3-discogs_client python3-py7zr python3-dateutil python3-gobject
gstreamer1 ffmpeg"
short_desc="Media library management system for obsessive-compulsive music geeks"
@@ -21,7 +21,7 @@ license="MIT"
homepage="https://beets.io"
changelog="https://raw.githubusercontent.com/beetbox/beets/master/docs/changelog.rst"
distfiles="${PYPI_SITE}/b/${pkgname}/${pkgname}-${version}.tar.gz"
checksum=7feefd70804fbcf26516089f472bac34c6a77e8e20ec539252fd1bafc91de9a2
checksum=1376b992ee18ee1b5de08d3586625e78d4338edb6b47e24f8e74932d8551f672
post_install() {
vman man/beet.1