Show More
@@ -14,7 +14,7 b' from IPython.utils.decorators import flag_calls' | |||||
14 |
|
14 | |||
15 |
|
15 | |||
16 | # Matplotlib backend resolution functionality moved from IPython to Matplotlib |
|
16 | # Matplotlib backend resolution functionality moved from IPython to Matplotlib | |
17 |
# in IPython 8.2 |
|
17 | # in IPython 8.24 and Matplotlib 3.9.1. Need to keep `backends` and `backend2gui` | |
18 | # here for earlier Matplotlib and for external backend libraries such as |
|
18 | # here for earlier Matplotlib and for external backend libraries such as | |
19 | # mplcairo that might rely upon it. |
|
19 | # mplcairo that might rely upon it. | |
20 | _deprecated_backends = { |
|
20 | _deprecated_backends = { | |
@@ -74,7 +74,10 b' del _deprecated_backend2gui["module://ipympl.backend_nbagg"]' | |||||
74 | # Deprecated attributes backends and backend2gui mostly following PEP 562. |
|
74 | # Deprecated attributes backends and backend2gui mostly following PEP 562. | |
75 | def __getattr__(name): |
|
75 | def __getattr__(name): | |
76 | if name in ("backends", "backend2gui"): |
|
76 | if name in ("backends", "backend2gui"): | |
77 | warnings.warn(f"{name} is deprecated", DeprecationWarning) |
|
77 | warnings.warn( | |
|
78 | f"{name} is deprecated since IPython 8.24, backends are managed " | |||
|
79 | "in matplotlib and can be externally registered.", | |||
|
80 | DeprecationWarning) | |||
78 | return globals()[f"_deprecated_{name}"] |
|
81 | return globals()[f"_deprecated_{name}"] | |
79 | raise AttributeError(f"module {__name__!r} has no attribute {name!r}") |
|
82 | raise AttributeError(f"module {__name__!r} has no attribute {name!r}") | |
80 |
|
83 | |||
@@ -377,7 +380,8 b' def find_gui_and_backend(gui=None, gui_select=None):' | |||||
377 | gui = gui_select |
|
380 | gui = gui_select | |
378 | backend = backends_[gui] |
|
381 | backend = backends_[gui] | |
379 |
|
382 | |||
380 | # Since IPython 8.23.0 use None for no gui event loop rather than "inline". |
|
383 | # Matplotlib before _matplotlib_manages_backends() can return "inline" for | |
|
384 | # no gui event loop rather than the None that IPython >= 8.24.0 expects. | |||
381 | if gui == "inline": |
|
385 | if gui == "inline": | |
382 | gui = None |
|
386 | gui = None | |
383 |
|
387 |
General Comments 0
You need to be logged in to leave comments.
Login now