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 use of "%matplotlib osx" #1237

Open
wants to merge 1 commit into
base: 6.x
Choose a base branch
from

Conversation

ianthomas23
Copy link
Collaborator

Fixes #1124 which is that the use of %matplotlib osx crashes ipykernel and downstream libraries whereas ipython is fine.

The fix is to specify the argtypes of each objc_msgSend call just before the call. This is consistent with how ipython successfully handles it. I have tested this manually using spyder and jupyter console, qtconsole, lab and nbclassic: using ipykernel 6.29.4 (the latest release) they all crash, using this branch they all work as expected.

This PR is opened against the 6.x branch rather than main as issue #1235 means it is not possible to test any matplotlib GUI loops on main. It would be good to get this into a release (6.29.5?) as soon as possible and not have to wait for #1235 and the other AnyIO fallout issues to be fixed beforehand. This PR will therefore need to be forward ported to main.

There is no explicit test for this as you need to actually render a macos window to trigger the failure, and this is not an easy thing to do on headless CI. Essentially this functionality sits in the grey area between matplotlib and ipython/ipykernel/jupyter rather than in any individual project.

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

Successfully merging this pull request may close these issues.

None yet

1 participant