Skip to content
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

FIX: propagate _is_saving state when changing canvases #17602

Merged

Conversation

tacaswell
Copy link
Member

PR Summary

We have logic to draw animated artists if we are rendering due to
savefig (as opposed to rendering to put into a GUI). Not every canvas
class can write every format so we can switch the canvas as save time
based on the requested extension / format. Make sure we set the sate
on the canvas we are actually using to save the figure rather than the
canvas that is attached to the figure when we start saving.

closes #17599

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant

We have logic to draw animated artists if we are rendering due to
savefig (as opposed to rendering to put into a GUI).  Not every canvas
class can write every format so we can switch the canvas as save time
based on the requested extension / format.  Make sure we set the sate
on the canvas we are actually using to save the figure rather than the
canvas that is attached to the figure when we start saving.

closes matplotlib#17599
@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jun 9, 2020
@tacaswell tacaswell added this to the v3.2.2 milestone Jun 9, 2020
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (modulo ci)

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (modulo ci)

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (modulo ci)

@QuLogic QuLogic merged commit c5f8969 into matplotlib:master Jun 10, 2020
@lumberbot-app
Copy link

lumberbot-app bot commented Jun 10, 2020

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 c5f89696ae5b7908732696956c16fc6ba724fb38
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #17602: FIX: propagate _is_saving state when changing canvases'
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-17602-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR #17602 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

@tacaswell tacaswell deleted the fix_mixed_canvas_animation_save branch June 10, 2020 15:11
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Jun 10, 2020
…anging canvases

Merge pull request matplotlib#17602 from tacaswell/fix_mixed_canvas_animation_save

FIX: propagate _is_saving state when changing canvases
Conflicts:
	lib/matplotlib/backend_bases.py
         - other nearby changes, only backport the context manager
           related changes
	lib/matplotlib/tests/test_figure.py
         - did not backport the other tests that are currently only on
           master branch.
QuLogic added a commit that referenced this pull request Jun 10, 2020
…-v3.2.x

Backport PR #17602: FIX: propagate _is_saving state when changing can…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving issue with pdf backend
3 participants