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

PR: Show banner when the kernel is ready (IPython console) #22501

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ccordoba12
Copy link
Member

Description of Changes

  • The previous approach didn't work all the time because when the first prompt is shown, the kernel comm is not necessarily connected (and we need that to get the banner info).
  • Also add some logging messages to better understand how actions are performed in the console.

Issue(s) Resolved

Fixes #22440.

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: @ccordoba12

@ccordoba12
Copy link
Member Author

@dalthviz, could you check that this works on Windows? For that you need to alternate between opening a console for the default env and a different one at least ten times.

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ccordoba12 ! Checked locally on Windows and I was unable to reproduce the issue (showing the consoles banner follows the preference)

Also, maybe some sort of test should be added to check this behavior (creating a new console follows the preference to show or not the initial banner)?

Anyhow, leaving this approved 👍

@ccordoba12
Copy link
Member Author

Also, maybe some sort of test should be added to check this behavior (creating a new console follows the preference to show or not the initial banner)?

That's a good idea @dalthviz! I'll add one later today.

- That helps us to understand when a race condition can happen between
those actions.
- Also, add log message when setting a Matplotlib backend in
MatplotlibStatus widget.
The previous approach didn't work all the time because when the first
prompt is shown, the kernel comm is not necessarily connected (and we
need that to get the banner info).
Also, add missing end of line to short banner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IPython console not showing initial banner in Spyder 6
2 participants