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

Fix up some async method aliases in KernelManager #670

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

kevin-bates
Copy link
Member

In preparation for the 7.0 release, I was perusing the changes to KernelManager and noticed some "internal" methods (i.e., methods that won't typically be overridden and are called from within "public" methods) had been changed to async but didn't have a backward-compatible "non-async" alias. As a result, applications that subclass KernelManager and override any of the following methods will not have their overrides called.

  • pre_start_kernel()
  • post_start_kernel()
  • request_shutdown()

This pull request addresses this issue by introducing the appropriate aliasing thereby restoring the hierarchical call sequence.

Note that these methods were made async for AsyncKernelManager, but that will be called out in the 7.0 release notes - along with the other changes.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! I kicked the downstream build assuming the failure was spurious

@blink1073 blink1073 added the bug label Aug 2, 2021
@blink1073 blink1073 added this to the 7.0 milestone Aug 2, 2021
@blink1073 blink1073 merged commit 64fa532 into jupyter:master Aug 2, 2021
@kevin-bates
Copy link
Member Author

Thanks @blink1073. Yeah, all the tests had passed within my fork prior to creating the PR, and was about to do the same.

@kevin-bates
Copy link
Member Author

@davidbrochart - With these changes, I think the qtconsole update in jupyter/qtconsole#494 should be rolled back as these are more correct and preserve "synchronicity" in KernelManager's API that otherwise had been hybrid only with respect to these 3 updated methods. I'm sorry I didn't catch this prior to these updates.

@davidbrochart
Copy link
Member

Right, I just run the qtconsole tests with jupyter_client master and with this PR they fail. Let's roll back jupyter/qtconsole#494.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants