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 2088794

Browse filesBrowse files
committed
Remove functions/methods deprecated in 3.1.
1 parent 7381561 commit 2088794
Copy full SHA for 2088794

File tree

Expand file treeCollapse file tree

8 files changed

+16
-58
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+16
-58
lines changed

‎doc/api/api_changes_3.3/removals.rst

Copy file name to clipboardExpand all lines: doc/api/api_changes_3.3/removals.rst
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ Classes, methods and attributes
8787

8888
- ``path.get_paths_extents()``
8989
(use ``path.get_path_collection_extents()`` instead)
90+
- ``path.Path.has_nonfinite()`` (use ``not np.isfinite(self.vertices).all()``
91+
instead)
9092

9193
- ``projections.process_projection_requirements()`` (no replacement)
9294

@@ -111,6 +113,7 @@ Classes, methods and attributes
111113
- ``scale.InvertedLog2Transform`` (use ``scale.InvertedLogTransform`` instead)
112114
- ``scale.NaturalLogTransform`` (use ``scale.LogTransform`` instead)
113115
- ``scale.InvertedNaturalLogTransform`` (use ``scale.InvertedLogTransform`` instead)
116+
- ``scale.get_scale_docs()`` (no replacement)
114117

115118
- ``sphinxext.plot_directive.plot_directive()``
116119
(use the class ``PlotDirective`` instead)
@@ -119,12 +122,18 @@ Classes, methods and attributes
119122

120123
- ``spines.Spine.is_frame_like()`` (no replacement)
121124

125+
- ``testing.decorators.switch_backend()`` (use ``@pytest.mark.backend``
126+
decorator instead)
127+
122128
- ``text.Text.is_math_text()`` (use ``cbook.is_math_text()`` instead)
123129
- ``text.TextWithDash()`` (use ``text.Annotation`` instead)
124130
- ``textpath.TextPath.is_math_text()`` (use ``cbook.is_math_text()`` instead)
125131
- ``textpath.TextPath.text_get_vertices_codes()``
126132
(use ``textpath.text_to_path.get_text_path()`` instead)
127133

134+
- ``textpath.TextToPath.glyph_to_path()`` (use ``font.get_path()`` and manual
135+
translation of the vertices instead)
136+
128137
- ``ticker.OldScalarFormatter.pprint_val()`` (no replacement)
129138
- ``ticker.ScalarFormatter.pprint_val()`` (no replacement)
130139
- ``ticker.LogFormatter.pprint_val()`` (no replacement)

‎doc/api/prev_api_changes/api_changes_3.1.0.rst

Copy file name to clipboardExpand all lines: doc/api/prev_api_changes/api_changes_3.1.0.rst
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,8 @@ Use the standard library's docstring manipulation tools instead, such as
849849

850850

851851

852-
- `matplotlib.scale.get_scale_docs()`
853-
- `matplotlib.pyplot.get_scale_docs()`
852+
- ``matplotlib.scale.get_scale_docs()``
853+
- ``matplotlib.pyplot.get_scale_docs()``
854854

855855
These are considered internal and will be removed from the public API in a
856856
future version.
@@ -905,7 +905,8 @@ Font Handling
905905
- ``backend_pdf.RendererPdf.afm_font_cache``
906906
- ``backend_ps.RendererPS.afmfontd``
907907
- ``font_manager.OSXInstalledFonts``
908-
- `.TextToPath.glyph_to_path` (Instead call ``font.get_path()`` and manually transform the path.)
908+
- ``.TextToPath.glyph_to_path`` (Instead call ``font.get_path()`` and manually
909+
transform the path.)
909910

910911

911912
Date related functions
@@ -1011,7 +1012,7 @@ Path tools
10111012

10121013
Use `~.path.get_path_collection_extents` instead.
10131014

1014-
- `.Path.has_nonfinite` attribute
1015+
- ``.Path.has_nonfinite`` attribute
10151016

10161017
Use ``not np.isfinite(path.vertices).all()`` instead.
10171018

‎doc/missing-references.json

Copy file name to clipboardExpand all lines: doc/missing-references.json
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,9 +1369,6 @@
13691369
"matplotlib.patches.Patch.__init__": [
13701370
"doc/devel/documenting_mpl.rst:696"
13711371
],
1372-
"matplotlib.pyplot.get_scale_docs()": [
1373-
"doc/api/prev_api_changes/api_changes_3.1.0.rst:853"
1374-
],
13751372
"matplotlib.sphinxext.mathmpl": [
13761373
"doc/users/prev_whats_new/whats_new_3.0.rst:225"
13771374
],
@@ -1543,4 +1540,4 @@
15431540
"lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:24"
15441541
]
15451542
}
1546-
}
1543+
}

‎lib/matplotlib/path.py

Copy file name to clipboardExpand all lines: lib/matplotlib/path.py
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,15 +243,6 @@ def simplify_threshold(self):
243243
def simplify_threshold(self, threshold):
244244
self._simplify_threshold = threshold
245245

246-
@cbook.deprecated(
247-
"3.1", alternative="not np.isfinite(self.vertices).all()")
248-
@property
249-
def has_nonfinite(self):
250-
"""
251-
`True` if the vertices array has nonfinite values.
252-
"""
253-
return not np.isfinite(self._vertices).all()
254-
255246
@property
256247
def should_simplify(self):
257248
"""

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from matplotlib.axes import Axes, Subplot
4949
from matplotlib.projections import PolarAxes
5050
from matplotlib import mlab # for detrend_none, window_hanning
51-
from matplotlib.scale import get_scale_docs, get_scale_names
51+
from matplotlib.scale import get_scale_names
5252

5353
from matplotlib import cm
5454
from matplotlib.cm import get_cmap, register_cmap

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -667,16 +667,6 @@ def register_scale(scale_class):
667667
_scale_mapping[scale_class.name] = scale_class
668668

669669

670-
@cbook.deprecated(
671-
'3.1', message='get_scale_docs() is considered private API since '
672-
'3.1 and will be removed from the public API in 3.3.')
673-
def get_scale_docs():
674-
"""
675-
Helper function for generating docstrings related to scales.
676-
"""
677-
return _get_scale_docs()
678-
679-
680670
def _get_scale_docs():
681671
"""
682672
Helper function for generating docstrings related to scales.

‎lib/matplotlib/testing/decorators.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/decorators.py
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -459,23 +459,3 @@ def _image_directories(func):
459459
result_dir = Path().resolve() / "result_images" / module_path.stem
460460
result_dir.mkdir(parents=True, exist_ok=True)
461461
return baseline_dir, result_dir
462-
463-
464-
@cbook.deprecated("3.1", alternative="pytest.mark.backend")
465-
def switch_backend(backend):
466-
467-
def switch_backend_decorator(func):
468-
469-
@functools.wraps(func)
470-
def backend_switcher(*args, **kwargs):
471-
try:
472-
prev_backend = mpl.get_backend()
473-
matplotlib.testing.setup()
474-
plt.switch_backend(backend)
475-
return func(*args, **kwargs)
476-
finally:
477-
plt.switch_backend(prev_backend)
478-
479-
return backend_switcher
480-
481-
return switch_backend_decorator

‎lib/matplotlib/textpath.py

Copy file name to clipboardExpand all lines: lib/matplotlib/textpath.py
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,6 @@ def _get_char_id_ps(self, font, ccode):
5151
char_id = urllib.parse.quote('%s-%d' % (ps_name, ccode))
5252
return char_id
5353

54-
@cbook.deprecated(
55-
"3.1",
56-
alternative="font.get_path() and manual translation of the vertices")
57-
def glyph_to_path(self, font, currx=0.):
58-
"""Convert the *font*'s current glyph to a (vertices, codes) pair."""
59-
verts, codes = font.get_path()
60-
if currx != 0.0:
61-
verts[:, 0] += currx
62-
return verts, codes
63-
6454
def get_text_width_height_descent(self, s, prop, ismath):
6555
if rcParams['text.usetex']:
6656
texmanager = self.get_texmanager()

0 commit comments

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