From 64417e5ba77e119525e905f12e41eacb8770ae9f Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Mon, 4 Dec 2023 15:41:21 +0000 Subject: [PATCH] tui: avoid deprecated import (#5858) --- cylc/flow/tui/app.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cylc/flow/tui/app.py b/cylc/flow/tui/app.py index 97abab94f81..fff634ea894 100644 --- a/cylc/flow/tui/app.py +++ b/cylc/flow/tui/app.py @@ -22,7 +22,13 @@ import re import urwid -from urwid.wimp import SelectableIcon +try: + from urwid.widget import SelectableIcon +except ImportError: + # BACK COMPAT: urwid.wimp + # From: urwid 2.0 + # To: urwid 2.2 + from urwid.wimp import SelectableIcon from cylc.flow.id import Tokens from cylc.flow.task_state import (