Skip to content

Commit 227657e

Browse files
authored
Default version of IPyWidgets to 8 (#16926)
1 parent df05eeb commit 227657e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/kernels/kernel.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,14 +884,11 @@ abstract class BaseKernel implements IBaseKernel {
884884
}
885885
/**
886886
* Determines the version of IPyWidgets used in the kernel
887-
* For non-python kernels, we assume the version of IPyWidgets is 7.
887+
* For non-python kernels, we assume the version of IPyWidgets is 8.
888888
* For Python we just run a block of Python code to determine the version.
889889
*/
890890
private async determineVersionOfIPyWidgets(session: IKernelSession) {
891891
if (!isPythonKernelConnection(this.kernelConnectionMetadata)) {
892-
// For all other kernels, assume we are using the older version of IPyWidgets.
893-
// There are very few kernels that support IPyWidgets, however IPyWidgets 8 is very new
894-
// & it is unlikely that others have supported this new version.
895892
this._ipywidgetsVersion = WIDGET_VERSION_NON_PYTHON_KERNELS;
896893
this._onIPyWidgetVersionResolved.fire(WIDGET_VERSION_NON_PYTHON_KERNELS);
897894
return;

src/notebooks/controllers/ipywidgets/message/commonMessageCoordinator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class CommonMessageCoordinator {
155155
);
156156
}
157157
} else {
158-
// For non-python kernels, always assume version 7.
158+
// For non-python kernels, always assume version 8.
159159
if (!deferred.completed) {
160160
deferred.resolve(WIDGET_VERSION_NON_PYTHON_KERNELS);
161161
}

src/platform/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export const defaultNotebookFormat = { major: 4, minor: 2 };
494494

495495
export const WIDGET_MIMETYPE = 'application/vnd.jupyter.widget-view+json';
496496
export const WIDGET_STATE_MIMETYPE = 'application/vnd.jupyter.widget-state+json';
497-
export const WIDGET_VERSION_NON_PYTHON_KERNELS = 7;
497+
export const WIDGET_VERSION_NON_PYTHON_KERNELS = 8;
498498

499499
/**
500500
* Used as a fallback when determinining the extension id that calls into the Jupyter extension API fails.

0 commit comments

Comments
 (0)