140140# definitions, so it is safe to import from it here.
141141from .import cbook
142142from matplotlib .cbook import (
143- mplDeprecation ,dedent ,get_label ,sanitize_sequence )
143+ MatplotlibDeprecationWarning ,dedent ,get_label ,sanitize_sequence )
144144from matplotlib .rcsetup import defaultParams ,validate_backend ,cycler
145145
146146import numpy
@@ -851,24 +851,24 @@ def __setitem__(self, key, val):
851851if key in _deprecated_map :
852852alt_key ,alt_val ,inverse_alt = _deprecated_map [key ]
853853warnings .warn (self .msg_depr % (key ,alt_key ),
854- mplDeprecation )
854+ MatplotlibDeprecationWarning )
855855key = alt_key
856856val = alt_val (val )
857857elif key in _deprecated_set and val is not None :
858858if key .startswith ('backend' ):
859859warnings .warn (self .msg_backend_obsolete .format (key ),
860- mplDeprecation )
860+ MatplotlibDeprecationWarning )
861861else :
862862warnings .warn (self .msg_depr_set % key ,
863- mplDeprecation )
863+ MatplotlibDeprecationWarning )
864864elif key in _deprecated_ignore_map :
865865alt = _deprecated_ignore_map [key ]
866866warnings .warn (self .msg_depr_ignore % (key ,alt ),
867- mplDeprecation )
867+ MatplotlibDeprecationWarning )
868868return
869869elif key in _obsolete_set :
870870warnings .warn (self .msg_obsolete % (key , ),
871- mplDeprecation )
871+ MatplotlibDeprecationWarning )
872872return
873873try :
874874cval = self .validate [key ](val )
@@ -885,18 +885,18 @@ def __getitem__(self, key):
885885if key in _deprecated_map :
886886alt_key ,alt_val ,inverse_alt = _deprecated_map [key ]
887887warnings .warn (self .msg_depr % (key ,alt_key ),
888- mplDeprecation )
888+ MatplotlibDeprecationWarning )
889889key = alt_key
890890
891891elif key in _deprecated_ignore_map :
892892alt = _deprecated_ignore_map [key ]
893893warnings .warn (self .msg_depr_ignore % (key ,alt ),
894- mplDeprecation )
894+ MatplotlibDeprecationWarning )
895895key = alt
896896
897897elif key in _obsolete_set :
898898warnings .warn (self .msg_obsolete % (key , ),
899- mplDeprecation )
899+ MatplotlibDeprecationWarning )
900900return None
901901
902902val = dict .__getitem__ (self ,key )
@@ -1045,7 +1045,7 @@ def _rc_params_in_file(fname, fail_on_error=False):
10451045elif key in _deprecated_ignore_map :
10461046warnings .warn ('%s is deprecated. Update your matplotlibrc to use '
10471047'%s instead.' % (key ,_deprecated_ignore_map [key ]),
1048- mplDeprecation )
1048+ MatplotlibDeprecationWarning )
10491049
10501050else :
10511051print ("""
@@ -1080,7 +1080,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
10801080
10811081iter_params = defaultParams .items ()
10821082with warnings .catch_warnings ():
1083- warnings .simplefilter ("ignore" ,mplDeprecation )
1083+ warnings .simplefilter ("ignore" ,MatplotlibDeprecationWarning )
10841084config = RcParams ([(key ,default )for key , (default ,_ )in iter_params
10851085if key not in _all_deprecated ])
10861086config .update (config_from_file )
@@ -1121,7 +1121,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
11211121rcParamsOrig = rcParams .copy ()
11221122
11231123with warnings .catch_warnings ():
1124- warnings .simplefilter ("ignore" ,mplDeprecation )
1124+ warnings .simplefilter ("ignore" ,MatplotlibDeprecationWarning )
11251125rcParamsDefault = RcParams ([(key ,default )for key , (default ,converter )in
11261126defaultParams .items ()
11271127if key not in _all_deprecated ])