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
Shaperilio/gui msg #14067
base: main
Are you sure you want to change the base?
Shaperilio/gui msg #14067
Conversation
I see no difference in e.g. Jupyter notebook. Removing this call prevents the unnecessary installation of a gui event loop hook.
from matplotlib_inline.backend_inline import configure_inline_support | ||
# NOTE: this import triggers `enable_gui('qt')` and occurs before the users' config (e.g. | ||
# `--matplotlib=qt5`) is procssed. | ||
# from matplotlib_inline.backend_inline import configure_inline_support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this import (and the function call that requires it) prevents the unnecessary installation of a qt
event loop hook, and as far as I can tell, has no negative effects - I still get inline figures in a Jupyter notebook, for example. I'll need someone with more expertise to chime in on this.
This reverts commit 765ddb3; still need two else statements anyway.
Consider making this a query, and make a `%gui off` actually remove it
Addresses the annoying extra messages as detailed in #14006.
Behavior
The intent is to:
'qt'
hook request.Take a system with both
PyQt5
andpyside6
installed:This means when you run
ipython --matplotlib=tk
, for example, you'll see this:Notes
Working on this has uncovered some interesting dynamics;
qt
is taken to mean "the latest Qt available" and the current code appears to force, in some cases, what is effectively a%gui qt
command before command line or config args are processed (see this issue), so that executingeffectively runs
and if both
pyside6
andPyQt5
are installed, the%gui qt5
will trigger a message about not being able to change Qt versions in the session.