From 2ee7401aa6b6e091bdf15b99ce0bd1af5e59ad15 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 5 Jun 2017 01:21:48 -0700 Subject: [PATCH] Remove deprecated rcParams entries and functions. --- doc/api/api_changes/code_removal.rst | 7 +++++++ lib/matplotlib/__init__.py | 6 ++---- lib/matplotlib/rcsetup.py | 28 ---------------------------- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/doc/api/api_changes/code_removal.rst b/doc/api/api_changes/code_removal.rst index 991240cac0e1..26ee420732d3 100644 --- a/doc/api/api_changes/code_removal.rst +++ b/doc/api/api_changes/code_removal.rst @@ -36,8 +36,15 @@ favor of the synonym ``"auto"``. The ``shading`` kwarg to ``pcolor`` has been removed. Set ``edgecolors`` appropriately instead. + Removed internal functions -------------------------- The ``matplotlib.backends.backend_ps.seq_allequal`` function has been removed. Use ``np.array_equal`` instead. + +The deprecated ``matplotlib.rcsetup.validate_maskedarray``, +``matplotlib.rcsetup.deprecate_savefig_extension`` and +``matplotlib.rcsetup.validate_tkpythoninspect`` functions, and associated +``savefig.extension`` and ``tk.pythoninspect`` rcparams entries have been +removed. diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index c66fb18168e2..6fd7c7f4f75c 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -823,16 +823,14 @@ def gen_candidates(): 'tick.size': ('tick.major.size', lambda x: x, None), 'svg.embed_char_paths': ('svg.fonttype', lambda x: "path" if x else "none", None), - 'savefig.extension': ('savefig.format', lambda x: x, None), 'axes.color_cycle': ('axes.prop_cycle', lambda x: cycler('color', x), lambda x: [c.get('color', None) for c in x]), 'svg.image_noscale': ('image.interpolation', None, None), } -_deprecated_ignore_map = { - } +_deprecated_ignore_map = {} -_obsolete_set = {'tk.pythoninspect', 'legend.isaxes'} +_obsolete_set = {'legend.isaxes'} # The following may use a value of None to suppress the warning. _deprecated_set = {'axes.hold'} # do NOT include in _all_deprecated diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index 89491b3d52af..35da65ec51f6 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -279,18 +279,6 @@ def validate_toolbar(s): return validator(s) -def validate_maskedarray(v): - # 2008/12/12: start warning; later, remove all traces of maskedarray - try: - if v == 'obsolete': - return v - except ValueError: - pass - warnings.warn('rcParams key "maskedarray" is obsolete and has no effect;\n' - ' please delete it from your matplotlibrc file', - mplDeprecation) - - _seq_err_msg = ('You must supply exactly {n} values, you provided {num} ' 'values: {s}') @@ -492,13 +480,6 @@ def validate_whiskers(s): "(float, float)]") -def deprecate_savefig_extension(value): - warnings.warn("savefig.extension is deprecated. Use savefig.format " - "instead. Will be removed in 1.4.x", - mplDeprecation) - return value - - def update_savefig_format(value): # The old savefig.extension could also have a value of "auto", but # the new savefig.format does not. We need to fix this here. @@ -576,12 +557,6 @@ def validate_corner_mask(s): return validate_bool(s) -def validate_tkpythoninspect(s): - # Introduced 2010/07/05 - warnings.warn("tk.pythoninspect is obsolete, and has no effect", - mplDeprecation) - return validate_bool(s) - validate_legend_loc = ValidateInStrings( 'legend_loc', ['best', @@ -1330,8 +1305,6 @@ def _validate_linestyle(ls): 'savefig.orientation': ['portrait', validate_orientation], # edgecolor; #white 'savefig.jpeg_quality': [95, validate_int], - # what to add to extensionless filenames - 'savefig.extension': ['png', deprecate_savefig_extension], # value checked by backend at runtime 'savefig.format': ['png', update_savefig_format], # options are 'tight', or 'standard'. 'standard' validates to None. @@ -1343,7 +1316,6 @@ def _validate_linestyle(ls): # Maintain shell focus for TkAgg 'tk.window_focus': [False, validate_bool], - 'tk.pythoninspect': [False, validate_tkpythoninspect], # obsolete # Set the papersize/type 'ps.papersize': ['letter', validate_ps_papersize],