From 8b9c4f0c8375318c88e21c44cacbb2b5bf5515f5 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Thu, 16 Jan 2025 21:25:14 -0500 Subject: [PATCH] Kernel: Fix showing tracebacks in Python 3.8 --- spyder_kernels/console/kernel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spyder_kernels/console/kernel.py b/spyder_kernels/console/kernel.py index 391c7392..477fcd95 100644 --- a/spyder_kernels/console/kernel.py +++ b/spyder_kernels/console/kernel.py @@ -641,7 +641,12 @@ def set_configuration(self, conf): elif key == "color scheme": self.set_color_scheme(value) elif key == "traceback_highlight_style": - self.set_traceback_syntax_highlighting(value) + # This doesn't work in Python 3.8 because the last IPython + # version compatible with it doesn't allow to customize the + # syntax highlighting scheme used for tracebacks. + # Fixes spyder-ide/spyder#23484 + if sys.version_info >= (3, 9): + self.set_traceback_syntax_highlighting(value) elif key == "jedi_completer": self.set_jedi_completer(value) elif key == "greedy_completer":