Skip to content

Commit

Permalink
Add compatibility for latest Textual (#7130)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Aug 11, 2024
1 parent 395dbce commit 2a53e2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion panel/pane/_textual.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 2a53e2a

Please sign in to comment.