FIX: account for deprecations of constant in Pillow 9.1 by tacaswell · Pull Request #22766 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions azure-pipelines.yml
18 changes: 10 additions & 8 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# * Can blit be enabled for movies?
# * Need to consider event sources to allow clicking through multiple figures


import abc
import base64
import contextlib
Expand Down Expand Up @@ -468,14 +469,15 @@ def grab_frame(self, **savefig_kwargs):
def finish(self):
# Call run here now that all frame grabbing is done. All temp files
# are available to be assembled.
self._run()
super().finish() # Will call clean-up

def _cleanup(self): # Inline to finish() once cleanup() is removed.
Comment thread
tacaswell marked this conversation as resolved.
super()._cleanup()
if self._tmpdir:
_log.debug('MovieWriter: clearing temporary path=%s', self._tmpdir)
self._tmpdir.cleanup()
try:
self._run()
super().finish()
finally:
if self._tmpdir:
_log.debug(
'MovieWriter: clearing temporary path=%s', self._tmpdir
)
self._tmpdir.cleanup()


@writers.register('pillow')
Expand Down
15 changes: 13 additions & 2 deletions lib/matplotlib/backends/backend_pdf.py