From e29e69e059cc1714312e11863bbb200ffa4d742b Mon Sep 17 00:00:00 2001 From: Tranquilled Date: Mon, 5 Oct 2020 18:08:19 -0400 Subject: [PATCH 1/2] Remove unused/deprecated AVConv_ classes --- lib/matplotlib/animation.py | 50 ------------------------------------- 1 file changed, 50 deletions(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index cd72921395de..c5d9dc7d2453 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -584,17 +584,6 @@ def output_args(self): return args + ['-y', self.outfile] - @classmethod - def isAvailable(cls): - return ( - super().isAvailable() - # Ubuntu 12.04 ships a broken ffmpeg binary which we shouldn't use. - # NOTE: when removed, remove the same method in AVConvBase. - and b'LibAv' not in subprocess.run( - [cls.bin_path()], creationflags=subprocess_creation_flags, - stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, - stderr=subprocess.PIPE).stderr) - # Combine FFMpeg options with pipe-based writing @writers.register('ffmpeg') @@ -640,45 +629,6 @@ def _args(self): '-vframes', str(self._frame_counter)] + self.output_args -# Base class of avconv information. AVConv has identical arguments to FFMpeg. -@cbook.deprecated('3.3') -class AVConvBase(FFMpegBase): - """ - Mixin class for avconv output. - - To be useful this must be multiply-inherited from with a - `MovieWriterBase` sub-class. - """ - - _exec_key = 'animation.avconv_path' - _args_key = 'animation.avconv_args' - - # NOTE : should be removed when the same method is removed in FFMpegBase. - isAvailable = classmethod(MovieWriter.isAvailable.__func__) - - -# Combine AVConv options with pipe-based writing -@writers.register('avconv') -class AVConvWriter(AVConvBase, FFMpegWriter): - """ - Pipe-based avconv writer. - - Frames are streamed directly to avconv via a pipe and written in a single - pass. - """ - - -# Combine AVConv options with file-based writing -@writers.register('avconv_file') -class AVConvFileWriter(AVConvBase, FFMpegFileWriter): - """ - File-based avconv writer. - - Frames are written to temporary files on disk and then stitched - together at the end. - """ - - # Base class for animated GIFs with ImageMagick class ImageMagickBase: """ From c49298797689426f68f41c18595ea6b2314877c4 Mon Sep 17 00:00:00 2001 From: Tranquilled Date: Mon, 5 Oct 2020 20:28:52 -0400 Subject: [PATCH 2/2] Remove references to removed classes from docs --- doc/api/animation_api.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst index c8edde884046..f9458e75fdfc 100644 --- a/doc/api/animation_api.rst +++ b/doc/api/animation_api.rst @@ -186,7 +186,6 @@ on all systems. FFMpegWriter ImageMagickWriter - AVConvWriter The file-based writers save temporary files for each frame which are stitched into a single file at the end. Although slower, these writers can be easier to @@ -198,7 +197,6 @@ debug. FFMpegFileWriter ImageMagickFileWriter - AVConvFileWriter Fundamentally, a `MovieWriter` provides a way to grab sequential frames from the same underlying `~matplotlib.figure.Figure` object. The base @@ -283,7 +281,6 @@ and mixins :toctree: _as_gen :nosignatures: - AVConvBase FFMpegBase ImageMagickBase @@ -298,6 +295,6 @@ Inheritance Diagrams :private-bases: :parts: 1 -.. inheritance-diagram:: matplotlib.animation.AVConvFileWriter matplotlib.animation.AVConvWriter matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter +.. inheritance-diagram:: matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter :private-bases: :parts: 1