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 a7d1e01

Browse filesBrowse files
committed
Some more deprecations of old, old stuff.
(I think 2018 qualifies as beyond "the near future" of "sometime after 2008-08-01", but YMMV...)
1 parent 0722828 commit a7d1e01
Copy full SHA for a7d1e01

File tree

Expand file treeCollapse file tree

4 files changed

+13
-13
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+13
-13
lines changed

‎doc/api/next_api_changes/2018-02-15-AL-deprecations.rst

Copy file name to clipboardExpand all lines: doc/api/next_api_changes/2018-02-15-AL-deprecations.rst
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ The following classes, methods, functions, and attributes are deprecated:
1515
- ``backend_wx.FigureCanvasWx.macros``,
1616
- ``cbook.GetRealpathAndStat``, ``cbook.Locked``,
1717
- ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead),
18-
``cbook.listFiles``, ``cbook.unicode_safe``
18+
``cbook.listFiles``, ``cbook.unicode_safe``,
1919
- ``container.Container.set_remove_method``,
20+
- ``contour.ContourLabeler.cl``, ``.cl_xy``, and ``.cl_cvalues``,
2021
- ``dates.DateFormatter.strftime_pre_1900``, ``dates.DateFormatter.strftime``,
2122
- ``font_manager.TempCache``,
2223
- ``mathtext.unichr_safe`` (use ``chr`` instead),
24+
- ``table.Table.get_child_artists`` (use ``get_children`` instead),
2325
- ``testing.compare.ImageComparisonTest``, ``testing.compare.compare_float``,
2426
- ``testing.decorators.skip_if_command_unavailable``.
2527
- ``FigureCanvasQT.keyAutoRepeat`` (directly check

‎lib/matplotlib/contour.py

Copy file name to clipboardExpand all lines: lib/matplotlib/contour.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,16 +215,16 @@ def clabel(self, *args, **kwargs):
215215
else:
216216
self.labels(inline, inline_spacing)
217217

218-
# Hold on to some old attribute names. These are deprecated and will
219-
# be removed in the near future (sometime after 2008-08-01), but
220-
# keeping for now for backwards compatibility
221-
self.cl = self.labelTexts
222-
self.cl_xy = self.labelXYs
223-
self.cl_cvalues = self.labelCValues
224-
225218
self.labelTextsList = cbook.silent_list('text.Text', self.labelTexts)
226219
return self.labelTextsList
227220

221+
cl = property(cbook.deprecated("3.0", alternative="labelTexts")(
222+
lambda self: self.labelTexts))
223+
cl_xy = property(cbook.deprecated("3.0", alternative="labelXYs")(
224+
lambda self: self.labelXYs))
225+
cl_cvalues = property(cbook.deprecated("3.0", alternative="labelCValues")(
226+
lambda self: self.labelCValues))
227+
228228
def print_label(self, linecontour, labelwidth):
229229
"Return *False* if contours are too short for a label."
230230
return (len(linecontour) > 10 * labelwidth

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,6 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
13061306
pyplot.subplots : pyplot API; docstring includes examples.
13071307
"""
13081308

1309-
# for backwards compatibility
13101309
if isinstance(sharex, bool):
13111310
sharex = "all" if sharex else "none"
13121311
if isinstance(sharey, bool):

‎lib/matplotlib/table.py

Copy file name to clipboardExpand all lines: lib/matplotlib/table.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
"""
2222
import warnings
2323

24-
from . import artist
24+
from . import artist, cbook, docstring
2525
from .artist import Artist, allow_rasterization
2626
from .patches import Rectangle
27-
from matplotlib import docstring
2827
from .text import Text
2928
from .transforms import Bbox
30-
from matplotlib.path import Path
29+
from .path import Path
3130

3231

3332
class Cell(Rectangle):
@@ -382,7 +381,7 @@ def contains(self, mouseevent):
382381
def get_children(self):
383382
"""Return the Artists contained by the table."""
384383
return list(self._cells.values())
385-
get_child_artists = get_children # backward compatibility
384+
get_child_artists = cbook.deprecated("3.0")(get_children)
386385

387386
def get_window_extent(self, renderer):
388387
"""Return the bounding box of the table in window coords."""

0 commit comments

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