Skip to content

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.

@ianthomas23 ianthomas23 force-pushed the kernel-info-supported-debugger branch from 71217b3 to 0d31b53 Compare November 18, 2024 11:54
@ianthomas23 ianthomas23 force-pushed the kernel-info-supported-debugger branch from 70767fa to 8298e05 Compare November 18, 2024 11:56

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.

@Carreau Carreau merged commit eb0aee6 into ipython:main Feb 14, 2025
29 of 32 checks passed
@Carreau Carreau added this to the 7.0 milestone Feb 14, 2025
@ianthomas23 ianthomas23 deleted the kernel-info-supported-debugger branch February 14, 2025 09:04
ianthomas23 added a commit to ianthomas23/ipykernel that referenced this pull request Jul 14, 2025
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants