commit: 1c3ca9bc7074e6110c3a6c702893a29a4a1df4c4 Author: David Roman <davidroman96 <AT> gmail <DOT> com> AuthorDate: Tue Feb 3 11:53:57 2026 +0000 Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> CommitDate: Tue Feb 3 11:53:57 2026 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1c3ca9bc
net-misc/toot: fix >=urwid-3.0.4 compatibility Also: - disalbe py3.11 - add missing test dependencies Signed-off-by: David Roman <davidroman96 <AT> gmail.com> net-misc/toot/files/toot-0.51.0-urwid-compat.patch | 52 ++++++++++++++++++++++ net-misc/toot/toot-0.51.0-r1.ebuild | 30 +++++++++++++ 2 files changed, 82 insertions(+) diff --git a/net-misc/toot/files/toot-0.51.0-urwid-compat.patch b/net-misc/toot/files/toot-0.51.0-urwid-compat.patch new file mode 100644 index 0000000000..6ff6e66f9c --- /dev/null +++ b/net-misc/toot/files/toot-0.51.0-urwid-compat.patch @@ -0,0 +1,52 @@ +From 8c2025c054bf71e2dc24d57a9097299310a12ccc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= + <[email protected]> +Date: Sun, 21 Dec 2025 08:42:37 +0100 +Subject: [PATCH] Fix compatibility with urwid 3.0.4 + +Fixes https://github.com/ihabunek/toot/issues/558 +--- + toot/tui/images.py | 2 +- + toot/tui/timeline.py | 2 +- + toot/tui/utils.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/toot/tui/images.py b/toot/tui/images.py +index 9dfebec4..7a101f55 100644 +--- a/toot/tui/images.py ++++ b/toot/tui/images.py +@@ -94,7 +94,7 @@ def graphics_widget(img, image_format="block", corner_radius=0, colors=16777216) + # "<" means left-justify the image + + except ImportError: +- from urwid.raw_display import Screen ++ from urwid.display.raw import Screen + TuiScreen = Screen + + def image_support_enabled(): +diff --git a/toot/tui/timeline.py b/toot/tui/timeline.py +index 060fdd81..ccdb5513 100644 +--- a/toot/tui/timeline.py ++++ b/toot/tui/timeline.py +@@ -20,7 +20,7 @@ + + + logger = logging.getLogger("toot") +-screen = urwid.raw_display.Screen() ++screen = urwid.display.raw.Screen() + + + class Timeline(urwid.Columns): +diff --git a/toot/tui/utils.py b/toot/tui/utils.py +index c7df968a..b221a17f 100644 +--- a/toot/tui/utils.py ++++ b/toot/tui/utils.py +@@ -72,7 +72,7 @@ def parse_content_links(content): + return parser.links[:] + + +-def copy_to_clipboard(screen: urwid.raw_display.Screen, text: str): ++def copy_to_clipboard(screen: urwid.display.raw.Screen, text: str): + """ copy text to clipboard using OSC 52 + This escape sequence is documented + here https://iterm2.com/documentation-escape-codes.html diff --git a/net-misc/toot/toot-0.51.0-r1.ebuild b/net-misc/toot/toot-0.51.0-r1.ebuild new file mode 100644 index 0000000000..6f76174842 --- /dev/null +++ b/net-misc/toot/toot-0.51.0-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{12..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="toot - Mastodon CLI & TUI" +HOMEPAGE="https://github.com/ihabunek/toot" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-python/urwid[${PYTHON_USEDEP}] + dev-python/wcwidth[${PYTHON_USEDEP}] + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/tomlkit[${PYTHON_USEDEP}] + test? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-urwid-compat.patch" ) + +EPYTEST_PLUGINS=( pytest-click python-dateutil pillow ) +distutils_enable_tests pytest
