From 2a53e2a41709dc0d75398ad3b6ecd5de21006ede Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Sun, 11 Aug 2024 20:14:19 +0200 Subject: [PATCH] Add compatibility for latest Textual (#7130) --- panel/pane/_textual.py | 7 ++++++- pixi.toml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/panel/pane/_textual.py b/panel/pane/_textual.py index a1af9781a7..33e34c210f 100644 --- a/panel/pane/_textual.py +++ b/panel/pane/_textual.py @@ -77,7 +77,12 @@ def disable_input(self): def start_application_mode(self): self._size_watcher = self._terminal.param.watch(self._resize, ['nrows', 'ncols']) - self._parser = XTermParser(lambda: False, self._debug) + try: + # Textual < 0.76 + self._parser = XTermParser(lambda: False, debug=self._debug) + except TypeError: + # Textual >= 0.76 + self._parser = XTermParser(debug=self._debug) self._input_watcher = self._terminal.param.watch(self._process_input, 'value') def stop_application_mode(self): diff --git a/pixi.toml b/pixi.toml index cdf3b56d5d..6cbdb658cb 100644 --- a/pixi.toml +++ b/pixi.toml @@ -116,7 +116,7 @@ ipywidgets_bokeh = "*" numba = "*" reacton = "*" scipy = "*" -textual = "<0.76" # Temporary fix +textual = "*" [feature.test-unit-task.tasks] # So it is not showing up in the test-ui environment test-unit = 'pytest panel/tests -n logical --dist loadgroup'