@@ -261,9 +261,6 @@ class MovieWriter(AbstractMovieWriter):
261261 # stored. Third-party writers cannot meaningfully set these as they cannot
262262 # extend rcParams with new keys.
263263
264- exec_key = _api .deprecate_privatize_attribute ("3.3" )
265- args_key = _api .deprecate_privatize_attribute ("3.3" )
266-
267264 # Pipe-based writers only support RGBA, but file-based ones support more
268265 # formats.
269266 supported_formats = ["rgba" ]
@@ -407,9 +404,7 @@ def __init__(self, *args, **kwargs):
407404 super ().__init__ (* args , ** kwargs )
408405 self .frame_format = mpl .rcParams ['animation.frame_format' ]
409406
410- @_api .delete_parameter ("3.3" , "clear_temp" )
411- def setup (self , fig , outfile , dpi = None , frame_prefix = None ,
412- clear_temp = True ):
407+ def setup (self , fig , outfile , dpi = None , frame_prefix = None ):
413408 """
414409 Setup for writing the movie file.
415410
@@ -423,13 +418,10 @@ def setup(self, fig, outfile, dpi=None, frame_prefix=None,
423418 The dpi of the output file. This, with the figure size,
424419 controls the size in pixels of the resulting movie file.
425420 frame_prefix : str, optional
426- The filename prefix to use for temporary files. If None (the
421+ The filename prefix to use for temporary files. If * None* (the
427422 default), files are written to a temporary directory which is
428- deleted by `cleanup` (regardless of the value of *clear_temp*).
429- clear_temp : bool, optional
430- If the temporary files should be deleted after stitching
431- the final result. Setting this to ``False`` can be useful for
432- debugging. Defaults to ``True``.
423+ deleted by `cleanup`; if not *None*, no temporary files are
424+ deleted.
433425 """
434426 self .fig = fig
435427 self .outfile = outfile
@@ -444,7 +436,6 @@ def setup(self, fig, outfile, dpi=None, frame_prefix=None,
444436 else :
445437 self ._tmpdir = None
446438 self .temp_prefix = frame_prefix
447- self ._clear_temp = clear_temp
448439 self ._frame_counter = 0 # used for generating sequential file names
449440 self ._temp_paths = list ()
450441 self .fname_format_str = '%s%%07d.%s'
@@ -453,15 +444,6 @@ def __del__(self):
453444 if self ._tmpdir :
454445 self ._tmpdir .cleanup ()
455446
456- @_api .deprecated ("3.3" )
457- @property
458- def clear_temp (self ):
459- return self ._clear_temp
460-
461- @clear_temp .setter
462- def clear_temp (self , value ):
463- self ._clear_temp = value
464-
465447 @property
466448 def frame_format (self ):
467449 """
@@ -488,10 +470,9 @@ def _base_temp_name(self):
488470
489471 def grab_frame (self , ** savefig_kwargs ):
490472 # docstring inherited
491- # Overloaded to explicitly close temp file.
492473 # Creates a filename for saving using basename and counter.
493474 path = Path (self ._base_temp_name () % self ._frame_counter )
494- self ._temp_paths .append (path ) # Record the filename for later cleanup .
475+ self ._temp_paths .append (path ) # Record the filename for later use .
495476 self ._frame_counter += 1 # Ensures each created name is unique.
496477 _log .debug ('FileMovieWriter.grab_frame: Grabbing frame %d to path=%s' ,
497478 self ._frame_counter , path )
@@ -510,12 +491,6 @@ def _cleanup(self): # Inline to finish() once cleanup() is removed.
510491 if self ._tmpdir :
511492 _log .debug ('MovieWriter: clearing temporary path=%s' , self ._tmpdir )
512493 self ._tmpdir .cleanup ()
513- else :
514- if self ._clear_temp :
515- _log .debug ('MovieWriter: clearing temporary paths=%s' ,
516- self ._temp_paths )
517- for path in self ._temp_paths :
518- path .unlink ()
519494
520495
521496@writers .register ('pillow' )
@@ -582,17 +557,6 @@ def output_args(self):
582557
583558 return args + ['-y' , self .outfile ]
584559
585- @classmethod
586- def isAvailable (cls ):
587- return (
588- super ().isAvailable ()
589- # Ubuntu 12.04 ships a broken ffmpeg binary which we shouldn't use.
590- # NOTE: when removed, remove the same method in AVConvBase.
591- and b'LibAv' not in subprocess .run (
592- [cls .bin_path ()], creationflags = subprocess_creation_flags ,
593- stdin = subprocess .DEVNULL , stdout = subprocess .DEVNULL ,
594- stderr = subprocess .PIPE ).stderr )
595-
596560
597561# Combine FFMpeg options with pipe-based writing
598562@writers .register ('ffmpeg' )
@@ -651,45 +615,6 @@ def _args(self):
651615 return [self .bin_path (), * args , * self .output_args ]
652616
653617
654- # Base class of avconv information. AVConv has identical arguments to FFMpeg.
655- @_api .deprecated ('3.3' )
656- class AVConvBase (FFMpegBase ):
657- """
658- Mixin class for avconv output.
659-
660- To be useful this must be multiply-inherited from with a
661- `MovieWriterBase` sub-class.
662- """
663-
664- _exec_key = 'animation.avconv_path'
665- _args_key = 'animation.avconv_args'
666-
667- # NOTE : should be removed when the same method is removed in FFMpegBase.
668- isAvailable = classmethod (MovieWriter .isAvailable .__func__ )
669-
670-
671- # Combine AVConv options with pipe-based writing
672- @writers .register ('avconv' )
673- class AVConvWriter (AVConvBase , FFMpegWriter ):
674- """
675- Pipe-based avconv writer.
676-
677- Frames are streamed directly to avconv via a pipe and written in a single
678- pass.
679- """
680-
681-
682- # Combine AVConv options with file-based writing
683- @writers .register ('avconv_file' )
684- class AVConvFileWriter (AVConvBase , FFMpegFileWriter ):
685- """
686- File-based avconv writer.
687-
688- Frames are written to temporary files on disk and then stitched
689- together at the end.
690- """
691-
692-
693618# Base class for animated GIFs with ImageMagick
694619class ImageMagickBase :
695620 """
@@ -794,8 +719,6 @@ class HTMLWriter(FileMovieWriter):
794719 """Writer for JavaScript-based HTML movies."""
795720
796721 supported_formats = ['png' , 'jpeg' , 'tiff' , 'svg' ]
797- args_key = _api .deprecated ("3.3" )(property (
798- lambda self : 'animation.html_args' ))
799722
800723 @classmethod
801724 def isAvailable (cls ):
@@ -892,19 +815,13 @@ def finish(self):
892815
893816 # duplicate the temporary file clean up logic from
894817 # FileMovieWriter.cleanup. We can not call the inherited
895- # versions of finished or cleanup because both assume that
818+ # versions of finish or cleanup because both assume that
896819 # there is a subprocess that we either need to call to merge
897820 # many frames together or that there is a subprocess call that
898821 # we need to clean up.
899822 if self ._tmpdir :
900823 _log .debug ('MovieWriter: clearing temporary path=%s' , self ._tmpdir )
901824 self ._tmpdir .cleanup ()
902- else :
903- if self ._clear_temp :
904- _log .debug ('MovieWriter: clearing temporary paths=%s' ,
905- self ._temp_paths )
906- for path in self ._temp_paths :
907- path .unlink ()
908825
909826
910827class Animation :
0 commit comments