diff --git a/IPython/external/qt_for_kernel.py b/IPython/external/qt_for_kernel.py index f883a85..86c0101 100644 --- a/IPython/external/qt_for_kernel.py +++ b/IPython/external/qt_for_kernel.py @@ -95,6 +95,7 @@ def matplotlib_options(mpl): mpqt) def get_options(): + print(f'`get_options` called with {os.environ.get("QT_API", None)=}') """Return a list of acceptable QT APIs, in decreasing order of preference.""" #already imported Qt somewhere. Use that loaded = loaded_api() @@ -129,5 +130,7 @@ def get_options(): api_opts = get_options() +print(f'Importing `IPython.terminal.pt_inputhooks.qt` with {api_opts=}') QtCore, QtGui, QtSvg, QT_API = load_qt(api_opts) +print(f'Loaded Qt with {QT_API=}') enum_helper = enum_factory(QT_API, QtCore) diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 31ef868..ef12546 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -711,6 +711,7 @@ class TerminalInteractiveShell(InteractiveShell): active_eventloop = None def enable_gui(self, gui=None): + print(f'Someone called `enable_gui` with {gui=}.') if gui and (gui not in {"inline", "webagg"}): # This hook runs with each cycle of the `prompt_toolkit`'s event loop. self.active_eventloop, self._inputhook = get_inputhook_name_and_func(gui) diff --git a/IPython/terminal/pt_inputhooks/__init__.py b/IPython/terminal/pt_inputhooks/__init__.py index 3095e99..8ae82f1 100644 --- a/IPython/terminal/pt_inputhooks/__init__.py +++ b/IPython/terminal/pt_inputhooks/__init__.py @@ -41,6 +41,7 @@ class UnknownBackend(KeyError): def get_inputhook_name_and_func(gui): + print(f'`get_inputhook_name_and_func` called with {gui=}') if gui in registered: return gui, registered[gui] diff --git a/IPython/terminal/pt_inputhooks/qt.py b/IPython/terminal/pt_inputhooks/qt.py index bed1e62..d18a339 100644 --- a/IPython/terminal/pt_inputhooks/qt.py +++ b/IPython/terminal/pt_inputhooks/qt.py @@ -57,7 +57,7 @@ def inputhook(context): QtCore.QTimer.singleShot(0, _reclaim_excepthook) event_loop = QtCore.QEventLoop(app) - + print(f'`inputhook` running Qt {QtCore.qVersion()} event loop.\r') if sys.platform == 'win32': # The QSocketNotifier method doesn't appear to work on Windows. # Use polling instead.