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 af63f1c

Browse filesBrowse files
committed
Remove unneeded cutout for webagg in show().
_Backend.show() is used to generate a backend_module.show() method (by wrapping _Backend.mainloop() with some boilerplate), which is then what pyplot.show() calls. Currently, it contains a cutout for webagg (wrt. `block` support), but that's not really needed: the webagg backend defines a show() function *directly*, without going through the mainloop helper (this was the case even before the introduction of the _Backend helper in 5141f80), and thus the `if get_backend() == "WebAgg"` check is never reached when using webagg (try adding a print there and running `MPLBACKEND=webagg python -c 'from pylab import *; plot(); show()'`). So we can just remove the cutout.
1 parent 037fcca commit af63f1c
Copy full SHA for af63f1c

File tree

Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-4
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3507,10 +3507,6 @@ def show(cls, *, block=None):
35073507
except AttributeError:
35083508
ipython_pylab = False
35093509
block = not ipython_pylab and not is_interactive()
3510-
# TODO: The above is a hack to get the WebAgg backend working with
3511-
# ipython's `%pylab` mode until proper integration is implemented.
3512-
if get_backend() == "WebAgg":
3513-
block = True
35143510
if block:
35153511
cls.mainloop()
35163512

0 commit comments

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