@@ -458,6 +458,7 @@ def validate_whiskers(s):
458
458
"(float, float)]" )
459
459
460
460
461
+ @cbook .deprecated ("3.2" )
461
462
def update_savefig_format (value ):
462
463
# The old savefig.extension could also have a value of "auto", but
463
464
# the new savefig.format does not. We need to fix this here.
@@ -471,6 +472,20 @@ def update_savefig_format(value):
471
472
return value
472
473
473
474
475
+ # Replace by validate_string once deprecation period passes.
476
+ def _update_savefig_format (value ):
477
+ # The old savefig.extension could also have a value of "auto", but
478
+ # the new savefig.format does not. We need to fix this here.
479
+ value = validate_string (value )
480
+ if value == 'auto' :
481
+ cbook .warn_deprecated (
482
+ "3.2" , message = "Support for setting the 'savefig.format' rcParam "
483
+ "to 'auto' is deprecated since %(since)s and will be removed "
484
+ "%(removal)s; set it to 'png' instead." )
485
+ value = 'png'
486
+ return value
487
+
488
+
474
489
validate_ps_papersize = ValidateInStrings (
475
490
'ps_papersize' ,
476
491
['auto' , 'letter' , 'legal' , 'ledger' ,
@@ -1344,7 +1359,7 @@ def _validate_linestyle(ls):
1344
1359
'savefig.orientation' : ['portrait' , validate_orientation ],
1345
1360
'savefig.jpeg_quality' : [95 , validate_int ],
1346
1361
# value checked by backend at runtime
1347
- 'savefig.format' : ['png' , update_savefig_format ],
1362
+ 'savefig.format' : ['png' , _update_savefig_format ],
1348
1363
# options are 'tight', or 'standard'. 'standard' validates to None.
1349
1364
'savefig.bbox' : ['standard' , validate_bbox ],
1350
1365
'savefig.pad_inches' : [0.1 , validate_float ],
0 commit comments