File tree Expand file tree Collapse file tree 9 files changed +17
-16
lines changed
api/next_api_changes/deprecations Expand file tree Collapse file tree 9 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 11``rcsetup.interactive_bk ``, ``rcsetup.non_interactive_bk `` and ``rcsetup.all_backends ``
22~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
4- ... are deprecated and replaced by
5- :meth: `matplotlib.backends.registry.BackendRegistry.list_builtin `
4+ ... are deprecated and replaced by ``matplotlib.backends.backend_registry.list_builtin ``
65with the following arguments
76
8- - `matplotlib.backends.registry. BackendFilter.INTERACTIVE `
9- - `matplotlib.backends.registry. BackendFilter.NON_INTERACTIVE `
7+ - `` matplotlib.backends.BackendFilter.INTERACTIVE ` `
8+ - `` matplotlib.backends.BackendFilter.NON_INTERACTIVE ` `
109- ``None ``
1110
1211respectively.
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ BackendRegistry
33
44New :class: `~matplotlib.backends.registry.BackendRegistry ` class is the single
55source of truth for available backends. The singleton instance is
6- ``matplotlib.backends.registry. backend_registry ``.
6+ ``matplotlib.backends.backend_registry ``.
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def _safe_pyplot_import():
105105 if current_framework is None :
106106 raise # No, something else went wrong, likely with the install...
107107
108- from matplotlib .backends . registry import backend_registry
108+ from matplotlib .backends import backend_registry
109109 backend = backend_registry .backend_for_gui_framework (current_framework )
110110 if backend is None :
111111 raise RuntimeError ("No suitable backend for the current GUI framework "
Original file line number Diff line number Diff line change 1+ from .registry import BackendFilter , backend_registry # noqa: F401
2+
13# NOTE: plt.switch_backend() (called at import time) will add a "backend"
24# attribute here for backcompat.
35_QT_FORCE_QT5_BINDING = False
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class BackendRegistry:
1818 This is the single source of truth for available backends.
1919
2020 All use of ``BackendRegistry`` should be via the singleton instance
21- ``backend_registry``.
21+ ``backend_registry`` which can be imported from ``matplotlib.backends`` .
2222
2323 .. versionadded:: 3.9
2424 """
Original file line number Diff line number Diff line change 6969from matplotlib .artist import Artist
7070from matplotlib .axes import Axes
7171from matplotlib .axes import Subplot # noqa: F401
72- from matplotlib .backends . registry import BackendFilter , backendRegistry
72+ from matplotlib .backends import BackendFilter , backend_registry
7373from matplotlib .projections import PolarAxes
7474from matplotlib import mlab # for detrend_none, window_hanning
7575from matplotlib .scale import get_scale_names # noqa: F401
Original file line number Diff line number Diff line change 2323import numpy as np
2424
2525from matplotlib import _api , cbook
26- from matplotlib .backends . registry import BackendFilter , backend_registry
26+ from matplotlib .backends import BackendFilter , backend_registry
2727from matplotlib .cbook import ls_mapper
2828from matplotlib .colors import Colormap , is_color_like
2929from matplotlib ._fontconfig_pattern import parse_fontconfig_pattern
3737class __getattr__ :
3838 @_api .deprecated (
3939 "3.9" ,
40- alternative = "``matplotlib.backends.registry. backend_registry.list_builtin"
41- "(matplotlib.backends.registry. BackendFilter.INTERACTIVE)``" )
40+ alternative = "``matplotlib.backends.backend_registry.list_builtin"
41+ "(matplotlib.backends.BackendFilter.INTERACTIVE)``" )
4242 @property
4343 def interactive_bk (self ):
4444 return backend_registry .list_builtin (BackendFilter .INTERACTIVE )
4545
4646 @_api .deprecated (
4747 "3.9" ,
48- alternative = "``matplotlib.backends.registry. backend_registry.list_builtin"
49- "(matplotlib.backends.registry. BackendFilter.NON_INTERACTIVE)``" )
48+ alternative = "``matplotlib.backends.backend_registry.list_builtin"
49+ "(matplotlib.backends.BackendFilter.NON_INTERACTIVE)``" )
5050 @property
5151 def non_interactive_bk (self ):
5252 return backend_registry .list_builtin (BackendFilter .NON_INTERACTIVE )
5353
5454 @_api .deprecated (
5555 "3.9" ,
56- alternative = "``matplotlib.backends.registry. backend_registry.list_builtin()``" )
56+ alternative = "``matplotlib.backends.backend_registry.list_builtin()``" )
5757 @property
5858 def all_backends (self ):
5959 return backend_registry .list_builtin ()
Original file line number Diff line number Diff line change 44import pytest
55
66import matplotlib as mpl
7- from matplotlib .backends . registry import BackendFilter , backend_registry
7+ from matplotlib .backends import BackendFilter , backend_registry
88
99
1010def has_duplicates (seq : Sequence [Any ]) -> bool :
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def parse(key):
5757 backends += [e .strip () for e in line .split (',' ) if e ]
5858 return backends
5959
60- from matplotlib .backends . registry import BackendFilter , backend_registry
60+ from matplotlib .backends import BackendFilter , backend_registry
6161
6262 assert (set (parse ('- interactive backends:\n ' )) ==
6363 set (backend_registry .list_builtin (BackendFilter .INTERACTIVE )))
You can’t perform that action at this time.
0 commit comments