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: Stop IPython console channels faster #10085

Merged
merged 3 commits into from
Aug 27, 2019

Conversation

impact27
Copy link
Contributor

Description of Changes

This avoids messages of the type WARNING:traitlets:kernel died: 18.0 that are created by #10066. I forgot that I already solved this problem in jupyter/jupyter_client#420, so I added a dependency on jupyter_client 5.2.5+.

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #

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:

README.md Outdated Show resolved Hide resolved
@@ -504,7 +504,7 @@ def shutdown(self):
self.shellwidget.spyder_kernel_comm.close()
self.shellwidget.kernel_manager.shutdown_kernel(now=now)
if self.shellwidget.kernel_client is not None:
self.shellwidget.kernel_client.shutdown()
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between shutdown and stop_channels?

Copy link
Member

Choose a reason for hiding this comment

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

Also, please remove the background function defined on the top of this file because it's not used anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shutdown stops the kernel, but is already called in self.shellwidget.kernel_manager.shutdown_kernel(now=now). stop_channels stops the channels, including the heartbeat channel. If the heartbeat channel is not stopped but the kernel is down, the channel will notice and send WARNING:traitlets:kernel died: 18.0

@impact27
Copy link
Contributor Author

There was still a problem where spyder would hang if closing while closing a console. It is solved here: jupyter/jupyter_client#470.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @impact27 for all your efforts to improve this!

@ccordoba12 ccordoba12 added this to the v4.0beta5 milestone Aug 27, 2019
@ccordoba12 ccordoba12 changed the title PR: Close the channels quickly PR: Close IPython console channels faster Aug 27, 2019
@ccordoba12 ccordoba12 changed the title PR: Close IPython console channels faster PR: Stop IPython console channels faster Aug 27, 2019
@ccordoba12 ccordoba12 merged commit 760df48 into spyder-ide:master Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants