From 02c587f6fa158786549a8e3942ba209f8782e9e4 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Mon, 16 Jan 2023 23:45:34 +0100 Subject: [PATCH 1/5] JEP for Optional Features --- .../jupyter-optional-features.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 jupyter-optional-features/jupyter-optional-features.md diff --git a/jupyter-optional-features/jupyter-optional-features.md b/jupyter-optional-features/jupyter-optional-features.md new file mode 100644 index 00000000..4284701f --- /dev/null +++ b/jupyter-optional-features/jupyter-optional-features.md @@ -0,0 +1,44 @@ +--- +title: Jupyter Optional Features +authors: Johan Mabille (@JohanMabille) +issue-number: xxx +pr-number: xxx +date-started: 2023-01-16 +--- + +# Summary + +This JEP introduces Jupyter optional features, which eases the way +a kernel advertises which features it supports, without coupling it +to the version of the protocol that it implements. + +# Motivation + +Some of the features that were added (the debugger) or proposed (the subshells) +may require a lot of work from kernel authors to implement them. Besides, the +changes they introduce on the protocol are self-contained; it is possible for a +kernel to not support them without altering its exepected behavior regarding the +rest of the protocol, and it is easy for a client to enable or disable such a +feature as long as it knows whether the kernel supports it. By the way, the +debugger is already optional, although it does not explicitly state it. + +The goal of this JEP is to introduce the notion of optional feature in the protocol +and to have an explicit list of such features. This way, we do not prevent kernel +authors from upgrading to a more recent version of the protocol when we introduce +a new feature that may be complicated to implement and not mandatory for them. + +# Proposed Enhancement + +We propose to add a new `supportedFeatures` field to the `kernel_info_reply` message. +This field is a list of optional features that the kernel supports. The boolean field +`debugger` should be deprecated, as it would duplicate a possible value of the list. + +An optional feature can be a list of additional messages and/or a list of additional +fields in different existing messages. When a feature introduces new messages, it is +its responsibility to specify the order of these messages when it makes sense. Under +no circumstances this feature should alter the order of already existing messages, +nor interleave new messages between already existing messages. + +The documentation should indicate which optional feature a message (or a field of a +message) is linked to when it is relevant. This would ease the implementation of +new kernels and the upgrade to new versions of the protocol. From 6544da48c629149597a70034eafbd88d8e6285b5 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 17 Jan 2023 09:01:32 +0100 Subject: [PATCH 2/5] Update jupyter-optional-features/jupyter-optional-features.md Co-authored-by: David Brochart --- jupyter-optional-features/jupyter-optional-features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyter-optional-features/jupyter-optional-features.md b/jupyter-optional-features/jupyter-optional-features.md index 4284701f..5901830e 100644 --- a/jupyter-optional-features/jupyter-optional-features.md +++ b/jupyter-optional-features/jupyter-optional-features.md @@ -8,7 +8,7 @@ date-started: 2023-01-16 # Summary -This JEP introduces Jupyter optional features, which eases the way +This JEP introduces Jupyter optional features, which ease the way a kernel advertises which features it supports, without coupling it to the version of the protocol that it implements. From 66cd59e2f56aa300264774626a98e7cbef885ea9 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 17 Jan 2023 09:02:11 +0100 Subject: [PATCH 3/5] Update jupyter-optional-features/jupyter-optional-features.md Co-authored-by: David Brochart --- jupyter-optional-features/jupyter-optional-features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyter-optional-features/jupyter-optional-features.md b/jupyter-optional-features/jupyter-optional-features.md index 5901830e..2cefda13 100644 --- a/jupyter-optional-features/jupyter-optional-features.md +++ b/jupyter-optional-features/jupyter-optional-features.md @@ -15,7 +15,7 @@ to the version of the protocol that it implements. # Motivation Some of the features that were added (the debugger) or proposed (the subshells) -may require a lot of work from kernel authors to implement them. Besides, the +may require a lot of work from kernel authors to implement. Besides, the changes they introduce on the protocol are self-contained; it is possible for a kernel to not support them without altering its exepected behavior regarding the rest of the protocol, and it is easy for a client to enable or disable such a From 8a178071178725457451c0ad5ac1be6f725340d7 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 17 Jan 2023 09:02:22 +0100 Subject: [PATCH 4/5] Update jupyter-optional-features/jupyter-optional-features.md Co-authored-by: David Brochart --- jupyter-optional-features/jupyter-optional-features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyter-optional-features/jupyter-optional-features.md b/jupyter-optional-features/jupyter-optional-features.md index 2cefda13..f4ecaf3b 100644 --- a/jupyter-optional-features/jupyter-optional-features.md +++ b/jupyter-optional-features/jupyter-optional-features.md @@ -22,7 +22,7 @@ rest of the protocol, and it is easy for a client to enable or disable such a feature as long as it knows whether the kernel supports it. By the way, the debugger is already optional, although it does not explicitly state it. -The goal of this JEP is to introduce the notion of optional feature in the protocol +The goal of this JEP is to introduce the notion of optional features in the protocol and to have an explicit list of such features. This way, we do not prevent kernel authors from upgrading to a more recent version of the protocol when we introduce a new feature that may be complicated to implement and not mandatory for them. From 43dd1fd0ae9284f2915653c7170c7174ab8835b8 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Mon, 12 Jun 2023 22:42:15 +0200 Subject: [PATCH 5/5] Added PR number and used snake case for new field name --- jupyter-optional-features/jupyter-optional-features.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyter-optional-features/jupyter-optional-features.md b/jupyter-optional-features/jupyter-optional-features.md index f4ecaf3b..ddf9334a 100644 --- a/jupyter-optional-features/jupyter-optional-features.md +++ b/jupyter-optional-features/jupyter-optional-features.md @@ -2,7 +2,7 @@ title: Jupyter Optional Features authors: Johan Mabille (@JohanMabille) issue-number: xxx -pr-number: xxx +pr-number: 92 date-started: 2023-01-16 --- @@ -29,7 +29,7 @@ a new feature that may be complicated to implement and not mandatory for them. # Proposed Enhancement -We propose to add a new `supportedFeatures` field to the `kernel_info_reply` message. +We propose to add a new `supported_features` field to the `kernel_info_reply` message. This field is a list of optional features that the kernel supports. The boolean field `debugger` should be deprecated, as it would duplicate a possible value of the list.