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

Use supported_features=['debugger'] in kernel info reply #1296

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ianthomas23
Copy link
Collaborator

JEP92 added support for optional features to be included in kernel info reply messages via the supported_features attribute, with subshells and debugger being examples. We are already using it for subshells, this PR also adds debugger to the list of supported_features if debugpy is importable.

Corresponding documentation PR in jupyter_client for messaging protocol is jupyter/jupyter_client#1045.

This replaces the use of kernel_info_reply['debugger'] which should be considered deprecated but cannot be removed until downstream libraries adopt reading the supported_features rather than debugger attribute directly.


supported_features: list[str] = []
if self._supports_kernel_subshells:
supported_features.append("kernel subshells")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it necessary to have "kernel", or could we just put "subshells"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@davidbrochart
Copy link
Collaborator

We are already using it for subshells, this PR also adds debugger to the list of supported_features if debugpy is importable.

I don't understand, it seems that this PR does both add "debugger" and "kernel subshells" to the list of supported_features, right?

@ianthomas23
Copy link
Collaborator Author

I don't understand, it seems that this PR does both add "debugger" and "kernel subshells" to the list of supported_features, right?

No, "kernel subshells" was already there but I've rearranged the code a little.

@davidbrochart
Copy link
Collaborator

Ah yes I see.

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.

2 participants