Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 03a73c8

Browse filesBrowse files
authored
Merge pull request #28332 from ianthomas23/28324_ipython_show_block_False
Call IPython.enable_gui when install repl displayhook
2 parents 6221736 + 1531850 commit 03a73c8
Copy full SHA for 03a73c8

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,12 @@ def install_repl_displayhook() -> None:
304304
# This code can be removed when Python 3.12, the latest version supported by
305305
# IPython < 8.24, reaches end-of-life in late 2028.
306306
from IPython.core.pylabtools import backend2gui
307-
# trigger IPython's eventloop integration, if available
308307
ipython_gui_name = backend2gui.get(get_backend())
309-
if ipython_gui_name:
310-
ip.enable_gui(ipython_gui_name)
308+
else:
309+
_, ipython_gui_name = backend_registry.resolve_backend(get_backend())
310+
# trigger IPython's eventloop integration, if available
311+
if ipython_gui_name:
312+
ip.enable_gui(ipython_gui_name)
311313

312314

313315
def uninstall_repl_displayhook() -> None:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.