Uncaught exns are fatal for PyQt5, so catch them. #7052

Merged
merged 1 commit into from Sep 7, 2016

Conversation

Projects
None yet
6 participants
Contributor

anntzer commented Sep 7, 2016 edited

See discussion starting at #6816 (comment).

Minimal example:

from matplotlib import pyplot as plt
plt.gcf().canvas.mpl_connect("draw_event", lambda event: 1/0)
plt.show()
@anntzer anntzer Uncaught exns are fatal for PyQt5, so catch them.
5994ef2

mdboom added the needs_review label Sep 7, 2016

Member

WeatherGod commented Sep 7, 2016

Looks good to me. The Appveyor failure does seem un-related, but possibly not transient?

Should this get cherry-picked to 1.5.x as well as 2.x?

Contributor

anntzer commented Sep 7, 2016

I'd suggest doing so.

Owner

jenshnielsen commented Sep 7, 2016

There is no 1.5.x branch to cherry-pick onto at the moment.

Owner

tacaswell commented Sep 7, 2016

I have a running list of things to backport. We probably should give up an re-create the 1.5.x branch :/

@tacaswell tacaswell merged commit 42b40b8 into matplotlib:master Sep 7, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.002%) to 70.36%
Details

tacaswell removed the needs_review label Sep 7, 2016

@tacaswell tacaswell added a commit that referenced this pull request Sep 7, 2016

@tacaswell tacaswell Merge pull request #7052 from anntzer/catch-exceptions-in-qt5-draw-pr…
…events-abort

FIX: Uncaught exns are fatal for PyQt5, so catch them.
c5cdc1a
Owner

tacaswell commented Sep 7, 2016

backported to v2.x as c5cdc1a

anntzer deleted the anntzer:catch-exceptions-in-qt5-draw-prevents-abort branch Sep 7, 2016

@tacaswell tacaswell added a commit that referenced this pull request Sep 8, 2016

@tacaswell tacaswell Merge pull request #7052 from anntzer/catch-exceptions-in-qt5-draw-pr…
…events-abort

FIX: Uncaught exns are fatal for PyQt5, so catch them.
81d5a24
Owner

tacaswell commented Sep 8, 2016

backported to v1.5.x as 81d5a24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment