142142# definitions, so it is safe to import from it here.
143143from . import cbook
144144from matplotlib .cbook import (
145- mplDeprecation , dedent , get_label , sanitize_sequence )
145+ MatplotlibDeprecationWarning , dedent , get_label , sanitize_sequence )
146146from matplotlib .rcsetup import defaultParams , validate_backend , cycler
147147
148148import numpy
@@ -858,24 +858,24 @@ def __setitem__(self, key, val):
858858 if key in _deprecated_map :
859859 alt_key , alt_val , inverse_alt = _deprecated_map [key ]
860860 warnings .warn (self .msg_depr % (key , alt_key ),
861- mplDeprecation )
861+ MatplotlibDeprecationWarning )
862862 key = alt_key
863863 val = alt_val (val )
864864 elif key in _deprecated_set and val is not None :
865865 if key .startswith ('backend' ):
866866 warnings .warn (self .msg_backend_obsolete .format (key ),
867- mplDeprecation )
867+ MatplotlibDeprecationWarning )
868868 else :
869869 warnings .warn (self .msg_depr_set % key ,
870- mplDeprecation )
870+ MatplotlibDeprecationWarning )
871871 elif key in _deprecated_ignore_map :
872872 alt = _deprecated_ignore_map [key ]
873873 warnings .warn (self .msg_depr_ignore % (key , alt ),
874- mplDeprecation )
874+ MatplotlibDeprecationWarning )
875875 return
876876 elif key in _obsolete_set :
877877 warnings .warn (self .msg_obsolete % (key , ),
878- mplDeprecation )
878+ MatplotlibDeprecationWarning )
879879 return
880880 try :
881881 cval = self .validate [key ](val )
@@ -892,18 +892,18 @@ def __getitem__(self, key):
892892 if key in _deprecated_map :
893893 alt_key , alt_val , inverse_alt = _deprecated_map [key ]
894894 warnings .warn (self .msg_depr % (key , alt_key ),
895- mplDeprecation )
895+ MatplotlibDeprecationWarning )
896896 key = alt_key
897897
898898 elif key in _deprecated_ignore_map :
899899 alt = _deprecated_ignore_map [key ]
900900 warnings .warn (self .msg_depr_ignore % (key , alt ),
901- mplDeprecation )
901+ MatplotlibDeprecationWarning )
902902 key = alt
903903
904904 elif key in _obsolete_set :
905905 warnings .warn (self .msg_obsolete % (key , ),
906- mplDeprecation )
906+ MatplotlibDeprecationWarning )
907907 return None
908908
909909 val = dict .__getitem__ (self , key )
@@ -1052,7 +1052,7 @@ def _rc_params_in_file(fname, fail_on_error=False):
10521052 elif key in _deprecated_ignore_map :
10531053 warnings .warn ('%s is deprecated. Update your matplotlibrc to use '
10541054 '%s instead.' % (key , _deprecated_ignore_map [key ]),
1055- mplDeprecation )
1055+ MatplotlibDeprecationWarning )
10561056
10571057 else :
10581058 print ("""
@@ -1087,7 +1087,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
10871087
10881088 iter_params = defaultParams .items ()
10891089 with warnings .catch_warnings ():
1090- warnings .simplefilter ("ignore" , mplDeprecation )
1090+ warnings .simplefilter ("ignore" , MatplotlibDeprecationWarning )
10911091 config = RcParams ([(key , default ) for key , (default , _ ) in iter_params
10921092 if key not in _all_deprecated ])
10931093 config .update (config_from_file )
@@ -1128,7 +1128,7 @@ def rc_params_from_file(fname, fail_on_error=False, use_default_template=True):
11281128rcParamsOrig = rcParams .copy ()
11291129
11301130with warnings .catch_warnings ():
1131- warnings .simplefilter ("ignore" , mplDeprecation )
1131+ warnings .simplefilter ("ignore" , MatplotlibDeprecationWarning )
11321132 rcParamsDefault = RcParams ([(key , default ) for key , (default , converter ) in
11331133 defaultParams .items ()
11341134 if key not in _all_deprecated ])
0 commit comments