Skip to content

FIX: be more forgiving about expecting internal state in draw_idle #15206

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

Conversation

tacaswell
Copy link
Member

Avoid race conditions with re-initing a new Qt5Agg canvas when:

  • in interactive mode
  • in plain python prompt
  • creating a second Qt5Agg canvas for an existing figure

closes #15205

PR Summary

PR Checklist

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

Avoid race conditions with re-initing a new Qt5Agg canvas when:
 - in interactive mode
 - in plain python prompt
 - creating a second Qt5Agg canvas for an existing figure

closes matplotlib#15205
@tacaswell tacaswell added this to the v2.2.5 milestone Sep 6, 2019
@dstansby dstansby merged commit 5700347 into matplotlib:master Sep 6, 2019
@lumberbot-app
Copy link

lumberbot-app bot commented Sep 6, 2019

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 v2.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 570034726b272123f3efa2079d86e5a9535f517d
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #15206: FIX: be more forgiving about expecting internal state in draw_idle'
  1. Push to a named branch :
git push YOURFORK v2.2.x:auto-backport-of-pr-15206-on-v2.2.x
  1. Create a PR against branch v2.2.x, I would have named this PR:

"Backport PR #15206 on branch v2.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.

@lumberbot-app
Copy link

lumberbot-app bot commented Sep 6, 2019

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.1.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 570034726b272123f3efa2079d86e5a9535f517d
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #15206: FIX: be more forgiving about expecting internal state in draw_idle'
  1. Push to a named branch :
git push YOURFORK v3.1.x:auto-backport-of-pr-15206-on-v3.1.x
  1. Create a PR against branch v3.1.x, I would have named this PR:

"Backport PR #15206 on branch v3.1.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_python_ion_second_qtcanvas_init branch September 6, 2019 22:35
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Sep 6, 2019
…internal state in draw_idle

Merge pull request matplotlib#15206 from tacaswell/fix_python_ion_second_qtcanvas_init

FIX: be more forgiving about expecting internal state in draw_idle
Conflicts:
	lib/matplotlib/tests/test_backend_qt.py
          - two tests were added on master, only kept the relevant one
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull request Sep 6, 2019
…internal state in draw_idle

Merge pull request matplotlib#15206 from tacaswell/fix_python_ion_second_qtcanvas_init

FIX: be more forgiving about expecting internal state in draw_idle

Conflicts:
	lib/matplotlib/tests/test_backend_qt.py
         - no tests on this branch, did not backport test
QuLogic added a commit that referenced this pull request Sep 7, 2019
…-v3.1.x

Backport PR #15206: FIX: be more forgiving about expecting internal s…
tacaswell added a commit that referenced this pull request Oct 15, 2019
…-v2.2.x

Backport PR #15206: FIX: be more forgiving about expecting internal s…
@timhoffm
Copy link
Member

Since 3.2.0 is about to be released, we can skip backporting to 3.1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FigureCanvas constructor crashes if interactive mode is switched on
4 participants