-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Make Matplotlib status bar widget show the right backend and fix some errors related to kernel restarts for options that require them #22057
Merged
ccordoba12
merged 15 commits into
spyder-ide:master
from
ccordoba12:fix-mpl-statusbar-widget
May 6, 2024
Merged
PR: Make Matplotlib status bar widget show the right backend and fix some errors related to kernel restarts for options that require them #22057
ccordoba12
merged 15 commits into
spyder-ide:master
from
ccordoba12:fix-mpl-statusbar-widget
May 6, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
That's because `update` is a public Qt method.
- Before we were showing "Interactive" when "Inline" was not selected, but that's not an actual backend name, and that could cause confusion to users. - Also, rename the Qt5 and Tkinter backends in Preferences to Qt and Tk, respectively, because those are the names used by Matplotlib. So, the interface will reflect exactly what users see in the console when changing backends.
- Use radio buttons instead of checkboxes because they are the right graphical elements for it. - Add a new radio button to keep the existing kernels. - Indent radio buttons a bit to make them stand out from the text.
The previous code only worked to switch between Qt and Inline
- Also, improve the tooltip of that widget a bit.
- That's necessary because it's not simple to remove the imports it injects into the namespace. - Also, improve text related to it in its confpage.
…estart - Before we were applying only one option of several that need a restart. - This also improves the heuristic to decide when to show the kernel restart dialog and debounces the restart_kernel method so that we don't try to run it several times in a row after many change options that require a restart.
We also hide it if Matplotlib is not present in the kernel or failed to import there.
…s.git --branch=mpl-fixes --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "2bc468762" upstream: origin: "https://github.com/ccordoba12/spyder-kernels.git" branch: "mpl-fixes" commit: "2bc468762" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596"
ccordoba12
changed the title
PR: Make Matplotlib status bar widget show the right backend and other fixes related to kernel restarts for options that require them
PR: Make Matplotlib status bar widget show the right backend and fixes related to kernel restarts for options that require them
May 5, 2024
ccordoba12
force-pushed
the
fix-mpl-statusbar-widget
branch
from
May 5, 2024 03:59
dfdf54f
to
15eec3c
Compare
- Now we check if we request a restart by switch between different backends several times. - We also check that the Matplotlib status widget displays the right value.
ccordoba12
force-pushed
the
fix-mpl-statusbar-widget
branch
3 times, most recently
from
May 5, 2024 06:33
ed2d64f
to
f4c4b24
Compare
- That prevents that handlers registered by other objects are called first, which was causing errors since the shell handlers are more fundamental and will actually be called first. - Also, fix test_startup_run_lines_project_directory because it was trying to get a value as soon as the kernel is ready, which was generating an error since MatplotlibStatus is checking if Matplotlib is available at the same time.
ccordoba12
force-pushed
the
fix-mpl-statusbar-widget
branch
3 times, most recently
from
May 5, 2024 17:25
f52e1f4
to
1458f76
Compare
- Also, make a small UI fix for ConsoleRestartDialog on Mac.
ccordoba12
force-pushed
the
fix-mpl-statusbar-widget
branch
from
May 5, 2024 20:53
1458f76
to
bba8dbe
Compare
ccordoba12
changed the title
PR: Make Matplotlib status bar widget show the right backend and fixes related to kernel restarts for options that require them
PR: Make Matplotlib status bar widget show the right backend and fix some errors related to kernel restarts for options that require them
May 5, 2024
…r-kernels.git --branch=master --update --force external-deps/spyder-kernels subrepo: subdir: "external-deps/spyder-kernels" merged: "4ecb144341" upstream: origin: "https://github.com/spyder-ide/spyder-kernels.git" branch: "master" commit: "4ecb144341" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" [ci skip]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Interactive
for interactive backends.pylab/autoload
option require a kernel restart (that's necessary when disabled so that the Numpy and Matplotlib star imports are removed).Visual changes
Move text about backend options to a tip in the IPython console config page
Improve UI/UX of
ConsoleRestartDialog
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: