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

[Bug]: macosx backend pause() cannot be ctrl-c'd #27120

Closed
anntzer opened this issue Oct 17, 2023 · 2 comments · Fixed by #27221
Closed

[Bug]: macosx backend pause() cannot be ctrl-c'd #27120

anntzer opened this issue Oct 17, 2023 · 2 comments · Fixed by #27221
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Oct 17, 2023

Bug summary

Unlike with other backends, a plt.pause() on a macosx figure cannot be interrupted with ctrl-c.

Code for reproduction

python -c 'from pylab import *; plot(); show(block=False); pause(5)'

Then press ctrl-c while the pause is running.

Actual outcome

pause() is not interrupted.

Expected outcome

pause is interrupted, like for other backends.

Additional information

Likely the solution is the same as for qt: the ctrl-c handling code in FigureManagerMac.start_main_loop (i.e. _maybe_allow_interrupt, for the qt case) needs to be more or less duplicated into FigureCanvasMac.start_event_loop -- (except that right now FigureCanvasMac.start_event_loop is implemented in ObjC so things need to be moved around a bit).

Operating system

macOS

Matplotlib Version

v3.8.0-447-g112a225738

Matplotlib Backend

macosx

Python version

3.11

Jupyter version

enosuchlib

Installation

git checkout

@tacaswell tacaswell added this to the v3.8.1 milestone Oct 18, 2023
@QuLogic
Copy link
Member

QuLogic commented Oct 27, 2023

Was this fixed by @greglucas PR?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 27, 2023

No.

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

Successfully merging a pull request may close this issue.

3 participants