@@ -139,6 +139,7 @@ def validate_bool(b):
139139 raise ValueError ('Could not convert "%s" to bool' % b )
140140
141141
142+ @cbook .deprecated ("3.3" )
142143def validate_bool_maybe_none (b ):
143144 """Convert b to ``bool`` or raise, passing through *None*."""
144145 if isinstance (b , str ):
@@ -663,7 +664,13 @@ def validate_markevery(s):
663664 'svg.fonttype' , ['none' , 'path' ], _deprecated_since = "3.3" )
664665
665666
667+ @cbook .deprecated ("3.3" )
666668def validate_hinting (s ):
669+ return _validate_hinting (s )
670+
671+
672+ # Replace by plain list in _prop_validators after deprecation period.
673+ def _validate_hinting (s ):
667674 if s in (True , False ):
668675 cbook .warn_deprecated (
669676 "3.2" , message = "Support for setting the text.hinting rcParam to "
@@ -680,6 +687,7 @@ def validate_hinting(s):
680687 _deprecated_since = "3.3" )
681688
682689
690+ @cbook .deprecated ("3.3" )
683691def validate_movie_writer (s ):
684692 # writers.list() would only list actually available writers, but
685693 # FFMpeg.isAvailable is slow and not worth paying for at every import.
@@ -1147,7 +1155,7 @@ def _convert_validator_spec(key, conv):
11471155 'text.usetex' : [False , validate_bool ],
11481156 'text.latex.preamble' : ['' , _validate_tex_preamble ],
11491157 'text.latex.preview' : [False , validate_bool ],
1150- 'text.hinting' : ['auto' , validate_hinting ],
1158+ 'text.hinting' : ['auto' , _validate_hinting ],
11511159 'text.hinting_factor' : [8 , validate_int ],
11521160 'text.kerning_factor' : [0 , validate_int ],
11531161 'text.antialiased' : [True , validate_bool ],
@@ -1467,7 +1475,7 @@ def _convert_validator_spec(key, conv):
14671475 # Limit, in MB, of size of base64 encoded animation in HTML
14681476 # (i.e. IPython notebook)
14691477 'animation.embed_limit' : [20 , validate_float ],
1470- 'animation.writer' : ['ffmpeg' , validate_movie_writer ],
1478+ 'animation.writer' : ['ffmpeg' , validate_string ],
14711479 'animation.codec' : ['h264' , validate_string ],
14721480 'animation.bitrate' : [- 1 , validate_int ],
14731481 # Controls image format when frames are written to disk
0 commit comments