From 17ffafc757dcab0dca634121c70510b1bd5dd5db Mon Sep 17 00:00:00 2001 From: Aleksei Stepanov Date: Wed, 14 Oct 2026 10:40:31 +0200 Subject: [PATCH] Compatibility with urwid 5.0 - Scrollable: use Pile.focus instead of Pile.get_focus(), which urwid 5.0 removes. - ImageScreen: subclass urwid.display.raw.Screen instead of the urwid.raw_display path, deprecated since urwid 2.4.0 and to be removed in urwid 7.0. Both replacements work with urwid 3.0.5, the declared minimum. --- nomadnet/ui/textui/images/screen.py | 2 +- nomadnet/vendor/Scrollable.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nomadnet/ui/textui/images/screen.py b/nomadnet/ui/textui/images/screen.py index c7a9f59..7935d2a 100644 --- a/nomadnet/ui/textui/images/screen.py +++ b/nomadnet/ui/textui/images/screen.py @@ -6,7 +6,7 @@ from ._termlib import is_kitty_supported from .widget import ImageWidget # A raw display screen subclass with Kitty TGP side-channel support -class ImageScreen(urwid.raw_display.Screen): +class ImageScreen(urwid.display.raw.Screen): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._ti_images = {} diff --git a/nomadnet/vendor/Scrollable.py b/nomadnet/vendor/Scrollable.py index 45ea781..2cfbc05 100644 --- a/nomadnet/vendor/Scrollable.py +++ b/nomadnet/vendor/Scrollable.py @@ -146,7 +146,7 @@ class Scrollable(urwid.WidgetDecoration): ow.focus = pwi st = None - nf = ow.get_focus() + nf = ow.focus if hasattr(nf, "key_timeout"): st = nf elif hasattr(nf, "original_widget"):