From 8b8cef81033a7e7076dccc1463632ff906b3c1d0 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Fri, 27 Sep 2024 18:01:20 -0500 Subject: [PATCH] Backport PR #22594: PR: Set shell banner attribute to be the one computed by us (IPython console) --- spyder/plugins/ipythonconsole/widgets/shell.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spyder/plugins/ipythonconsole/widgets/shell.py b/spyder/plugins/ipythonconsole/widgets/shell.py index 3c4bae540d7..21f805adde4 100644 --- a/spyder/plugins/ipythonconsole/widgets/shell.py +++ b/spyder/plugins/ipythonconsole/widgets/shell.py @@ -1207,6 +1207,11 @@ def _show_banner(self): cursor.setPosition(0) self._insert_plain_text(cursor, banner) + # We need to do this so the banner is available to other QtConsole + # methods (e.g. console resets). + # Fixes spyder-ide/spyder#22593 + self.banner = banner + # Only do this once self._is_banner_shown = True