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

Warning message on the first console that is open #22181

Closed
dalthviz opened this issue Jun 19, 2024 · 4 comments · Fixed by #22302
Closed

Warning message on the first console that is open #22181

dalthviz opened this issue Jun 19, 2024 · 4 comments · Fixed by #22302

Comments

@dalthviz
Copy link
Member

Problem Description

A warning message appears on the first console that is launched when Spyder starts (at least on my Windows setup while checking the Spyder 6 beta2 rc0 installer - https://github.com/spyder-ide/spyder/actions/runs/9573557891):

image

C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\Lib\threading.py:1045: UserWarning: Parent poll failed.  If the frontend dies,
                the kernel may be left running.  Please let us know
                about your system (bitness, Python, etc.) at
                ipython-dev@scipy.org
  self.run()

What steps reproduce the problem?

  1. Launch Spyder

What is the expected output? What do you see instead?

Initial console launched when Spyder starts not showing any warning message

Versions

  • Spyder version: 6.0.0b2.dev174 (standalone)
  • Python version: 3.11.9 64-bit
  • Qt version: 5.15.8
  • PyQt5 version: 5.15.9
  • Operating System: Windows-10-10.0.19045-SP0
@dalthviz dalthviz self-assigned this Jun 19, 2024
@dalthviz dalthviz added this to the v6.0beta3 milestone Jun 19, 2024
@ccordoba12 ccordoba12 modified the milestones: v6.0beta3, v6.0rc1 Jul 16, 2024
@dalthviz
Copy link
Member Author

Note: Seems like this could be related with #8205 (also an still open issue was created at IPython ipython/ipython#11727 +5 years ago) and the actual warning is still being generated over ipykernel: https://github.com/ipython/ipykernel/blob/d4a8703593cbe5d82bc955d68543dc623f5b4510/ipykernel/parentpoller.py#L113-L121

Seems like adding the warning text to the is_benign_error method over Spyder is not enough to ignore the warning and instead either a check needs to be added over QtConsole at the _handle_stream method from the FrontendWidget class or make the Spyder ShellWidget class reimplement that method so a check to ignore the warning a not show it can be added.

What do you think @ccordoba12 ?

@ccordoba12
Copy link
Member

Is it possible to add some code to spyder-kernels to hide that warning?

If not, then I think the best solution is to override _handle_stream in ShellWidget until we have time to provide a fix upstream.

@dalthviz
Copy link
Member Author

@ccordoba12
Copy link
Member

Ok, sounds good to me.

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.

2 participants