135135}"""
136136
137137
138- @cbook .deprecated ("3.2" )
139- def compare_versions (a , b ):
140- """Return whether version *a* is greater than or equal to version *b*."""
141- if isinstance (a , bytes ):
142- cbook .warn_deprecated (
143- "3.0" , message = "compare_versions arguments should be strs." )
144- a = a .decode ('ascii' )
145- if isinstance (b , bytes ):
146- cbook .warn_deprecated (
147- "3.0" , message = "compare_versions arguments should be strs." )
148- b = b .decode ('ascii' )
149- if a :
150- return LooseVersion (a ) >= LooseVersion (b )
151- else :
152- return False
153-
154-
155138def _check_versions ():
156139
157140 # Quickfix to ensure Microsoft Visual C++ redistributable
@@ -382,26 +365,6 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
382365 raise ValueError ("Unknown executable: {!r}" .format (name ))
383366
384367
385- @cbook .deprecated ("3.2" )
386- def checkdep_ps_distiller (s ):
387- if not s :
388- return False
389- try :
390- _get_executable_info ("gs" )
391- except ExecutableNotFoundError :
392- _log .warning (
393- "Setting rcParams['ps.usedistiller'] requires ghostscript." )
394- return False
395- if s == "xpdf" :
396- try :
397- _get_executable_info ("pdftops" )
398- except ExecutableNotFoundError :
399- _log .warning (
400- "Setting rcParams['ps.usedistiller'] to 'xpdf' requires xpdf." )
401- return False
402- return s
403-
404-
405368def checkdep_usetex (s ):
406369 if not s :
407370 return False
@@ -421,20 +384,6 @@ def checkdep_usetex(s):
421384 return True
422385
423386
424- @cbook .deprecated ("3.2" , alternative = "os.path.expanduser('~')" )
425- @_logged_cached ('$HOME=%s' )
426- def get_home ():
427- """
428- Return the user's home directory.
429-
430- If the user's home directory cannot be found, return None.
431- """
432- try :
433- return str (Path .home ())
434- except Exception :
435- return None
436-
437-
438387def _get_xdg_config_dir ():
439388 """
440389 Return the XDG configuration directory, according to the XDG base
0 commit comments