Skip to content

Remove unused/deprecated AVConv_ classes #18666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions doc/api/animation_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -283,7 +281,6 @@ and mixins
:toctree: _as_gen
:nosignatures:

AVConvBase
FFMpegBase
ImageMagickBase

Expand All @@ -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
50 changes: 0 additions & 50 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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:
"""
Expand Down