Skip to content

Simplify animation writer fallback. #16967

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

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 30, 2020

The fallback now always returns PillowWriter, which is the first
registered writer and is always available, so we may just as well be
more explicit.

(Not all writers support all output formats, but we don't have machinery
to select writers based on the output format right now anyways.)

Slightly more complex than #16966 so I'm milestoning this one to 3.3.0 instead, but we could also backport it to 3.2.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.3.0 milestone Mar 30, 2020
@tacaswell
Copy link
Member

#16966 should be merged first and backported and then this one.

@tacaswell
Copy link
Member

We don't have a hard dependency on pillow with 3.2 so we should not backport this to 3.2.x

@anntzer
Copy link
Contributor Author

anntzer commented Mar 30, 2020

Ah, lost track of when the dependency came in.

@timhoffm
Copy link
Member

Flake8:

./lib/matplotlib/animation.py:1095:50: F821 undefined name 'alt_writer'

@anntzer anntzer force-pushed the animfallback-pillow branch from a434962 to e079830 Compare March 30, 2020 21:34
@anntzer
Copy link
Contributor Author

anntzer commented Mar 30, 2020

oops

The fallback now always returns PillowWriter, which is the first
registered writer and is always available, so we may just as well be
more explicit.

(Not all writers support all output formats, but we don't have machinery
to select writers based on the output format right now anyways.)
@anntzer
Copy link
Contributor Author

anntzer commented Mar 30, 2020

rebased

@QuLogic QuLogic merged commit 338e1e9 into matplotlib:master Mar 31, 2020
@anntzer anntzer deleted the animfallback-pillow branch March 31, 2020 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants