Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Some more deprecations of old, old stuff. #11100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/api/next_api_changes/2018-02-15-AL-deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ The following classes, methods, functions, and attributes are deprecated:
- ``backend_wx.FigureCanvasWx.macros``,
- ``cbook.GetRealpathAndStat``, ``cbook.Locked``,
- ``cbook.is_numlike`` (use ``isinstance(..., numbers.Number)`` instead),
``cbook.listFiles``, ``cbook.unicode_safe``
``cbook.listFiles``, ``cbook.unicode_safe``,
- ``container.Container.set_remove_method``,
- ``contour.ContourLabeler.cl``, ``.cl_xy``, and ``.cl_cvalues``,
- ``dates.DateFormatter.strftime_pre_1900``, ``dates.DateFormatter.strftime``,
- ``font_manager.TempCache``,
- ``mathtext.unichr_safe`` (use ``chr`` instead),
- ``table.Table.get_child_artists`` (use ``get_children`` instead),
- ``testing.compare.ImageComparisonTest``, ``testing.compare.compare_float``,
- ``testing.decorators.skip_if_command_unavailable``.
- ``FigureCanvasQT.keyAutoRepeat`` (directly check
Expand Down
14 changes: 7 additions & 7 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,16 @@ def clabel(self, *args, **kwargs):
else:
self.labels(inline, inline_spacing)

# Hold on to some old attribute names. These are deprecated and will
# be removed in the near future (sometime after 2008-08-01), but
# keeping for now for backwards compatibility
self.cl = self.labelTexts
self.cl_xy = self.labelXYs
self.cl_cvalues = self.labelCValues

self.labelTextsList = cbook.silent_list('text.Text', self.labelTexts)
return self.labelTextsList

cl = property(cbook.deprecated("3.0", alternative="labelTexts")(
lambda self: self.labelTexts))
cl_xy = property(cbook.deprecated("3.0", alternative="labelXYs")(
lambda self: self.labelXYs))
cl_cvalues = property(cbook.deprecated("3.0", alternative="labelCValues")(
lambda self: self.labelCValues))

def print_label(self, linecontour, labelwidth):
"Return *False* if contours are too short for a label."
return (len(linecontour) > 10 * labelwidth
Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,6 @@ def subplots(self, nrows=1, ncols=1, sharex=False, sharey=False,
pyplot.subplots : pyplot API; docstring includes examples.
"""

# for backwards compatibility
if isinstance(sharex, bool):
sharex = "all" if sharex else "none"
if isinstance(sharey, bool):
Expand Down
7 changes: 3 additions & 4 deletions lib/matplotlib/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
"""
import warnings

from . import artist
from . import artist, cbook, docstring
from .artist import Artist, allow_rasterization
from .patches import Rectangle
from matplotlib import docstring
from .text import Text
from .transforms import Bbox
from matplotlib.path import Path
from .path import Path


class Cell(Rectangle):
Expand Down Expand Up @@ -382,7 +381,7 @@ def contains(self, mouseevent):
def get_children(self):
"""Return the Artists contained by the table."""
return list(self._cells.values())
get_child_artists = get_children # backward compatibility
get_child_artists = cbook.deprecated("3.0")(get_children)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


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