@@ -334,29 +334,6 @@ def _run(self):
334
334
335
335
def finish (self ):
336
336
"""Finish any processing for writing the movie."""
337
- overridden_cleanup = _api .deprecate_method_override (
338
- __class__ .cleanup , self , since = "3.4" , alternative = "finish()" )
339
- if overridden_cleanup is not None :
340
- overridden_cleanup ()
341
- else :
342
- self ._cleanup () # Inline _cleanup() once cleanup() is removed.
343
-
344
- def grab_frame (self , ** savefig_kwargs ):
345
- # docstring inherited
346
- _log .debug ('MovieWriter.grab_frame: Grabbing frame.' )
347
- # Readjust the figure size in case it has been changed by the user.
348
- # All frames must have the same size to save the movie correctly.
349
- self .fig .set_size_inches (self ._w , self ._h )
350
- # Save the figure data to the sink, using the frame format and dpi.
351
- self .fig .savefig (self ._proc .stdin , format = self .frame_format ,
352
- dpi = self .dpi , ** savefig_kwargs )
353
-
354
- def _args (self ):
355
- """Assemble list of encoder-specific command-line arguments."""
356
- return NotImplementedError ("args needs to be implemented by subclass." )
357
-
358
- def _cleanup (self ): # Inline to finish() once cleanup() is removed.
359
- """Clean-up and collect the process used to write the movie file."""
360
337
out , err = self ._proc .communicate ()
361
338
# Use the encoding/errors that universal_newlines would use.
362
339
out = TextIOWrapper (BytesIO (out )).read ()
@@ -373,9 +350,19 @@ def _cleanup(self): # Inline to finish() once cleanup() is removed.
373
350
raise subprocess .CalledProcessError (
374
351
self ._proc .returncode , self ._proc .args , out , err )
375
352
376
- @_api .deprecated ("3.4" )
377
- def cleanup (self ):
378
- self ._cleanup ()
353
+ def grab_frame (self , ** savefig_kwargs ):
354
+ # docstring inherited
355
+ _log .debug ('MovieWriter.grab_frame: Grabbing frame.' )
356
+ # Readjust the figure size in case it has been changed by the user.
357
+ # All frames must have the same size to save the movie correctly.
358
+ self .fig .set_size_inches (self ._w , self ._h )
359
+ # Save the figure data to the sink, using the frame format and dpi.
360
+ self .fig .savefig (self ._proc .stdin , format = self .frame_format ,
361
+ dpi = self .dpi , ** savefig_kwargs )
362
+
363
+ def _args (self ):
364
+ """Assemble list of encoder-specific command-line arguments."""
365
+ return NotImplementedError ("args needs to be implemented by subclass." )
379
366
380
367
@classmethod
381
368
def bin_path (cls ):
0 commit comments