@@ -820,7 +820,7 @@ def gen_candidates():
820820 'axes.hold' : ('2.1' ,),
821821 'backend.qt4' : ('2.2' ,),
822822 'backend.qt5' : ('2.2' ,),
823- 'text.latex.unicde ' : ('3.0' ,),
823+ 'text.latex.unicode ' : ('3.0' ,),
824824}
825825
826826
@@ -883,7 +883,7 @@ def __setitem__(self, key, val):
883883 val = alt_val (val )
884884 elif key in _deprecated_remain_as_none and val is not None :
885885 version , = _deprecated_remain_as_none [key ]
886- addendum = None
886+ addendum = ''
887887 if key .startswith ('backend' ):
888888 addendum = (
889889 "In order to force the use of a specific Qt binding, "
@@ -1243,21 +1243,33 @@ def rcdefaults():
12431243 Use a specific style file. Call ``style.use('default')`` to restore
12441244 the default style.
12451245 """
1246- rcParams .clear ()
1247- rcParams .update (rcParamsDefault )
1246+ # Deprecation warnings were already handled when creating rcParamsDefault,
1247+ # no need to reemit them here.
1248+ with warnings .catch_warnings ():
1249+ warnings .simplefilter ("ignore" , mplDeprecation )
1250+ rcParams .clear ()
1251+ rcParams .update (rcParamsDefault )
12481252
12491253
12501254def rc_file_defaults ():
12511255 """Restore the rc params from the original rc file loaded by Matplotlib.
12521256 """
1253- rcParams .update (rcParamsOrig )
1257+ # Deprecation warnings were already handled when creating rcParamsOrig, no
1258+ # need to reemit them here.
1259+ with warnings .catch_warnings ():
1260+ warnings .simplefilter ("ignore" , mplDeprecation )
1261+ rcParams .update (rcParamsOrig )
12541262
12551263
12561264def rc_file (fname ):
12571265 """
12581266 Update rc params from file.
12591267 """
1260- rcParams .update (rc_params_from_file (fname ))
1268+ # Deprecation warnings were already handled in rc_params_from_file, no need
1269+ # to reemit them here.
1270+ with warnings .catch_warnings ():
1271+ warnings .simplefilter ("ignore" , mplDeprecation )
1272+ rcParams .update (rc_params_from_file (fname ))
12611273
12621274
12631275class rc_context :
0 commit comments