Skip to content

Commit db069b9

Browse files
committed
Update to be compatible with ipywidgets 8.0 *and* ipywidgets 7.0.
1 parent 9f04d27 commit db069b9

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
"watch:labextension": "jupyter labextension watch ."
4343
},
4444
"dependencies": {
45-
"@jupyter-widgets/base": "^4.0.0",
46-
"@jupyter-widgets/jupyterlab-manager": "^3.0.0",
45+
"@jupyter-widgets/base": "^4 || ^5 || ^6.0.0-rc.0",
46+
"@jupyter-widgets/jupyterlab-manager": "^3 || ^4 || ^5.0.0-rc.0",
4747
"@jupyterlab/application": "^3.0.0",
4848
"@lumino/coreutils": "^1.5.3"
4949
},

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[build-system]
2-
requires = ["jupyter_packaging~=0.7.9", "jupyterlab~=3.0", "setuptools>=40.8.0", "wheel"]
2+
requires = ["jupyter_packaging~=0.12", "jupyterlab~=3.0", "setuptools>=40.8.0", "wheel"]
33
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[bdist_wheel]
2-
universal=1
3-
41
[metadata]
52
description-file = README.md
63
license_file = LICENSE.txt

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
name = 'sidecar'
2424
labext_name = '@jupyter-widgets/jupyterlab-sidecar'
2525

26-
# Ensure a valid python version
27-
ensure_python('>=3.6')
28-
2926
# Get our version
3027
version = get_version(os.path.join(name, '_version.py'))
3128

@@ -77,6 +74,7 @@
7774
author_email = '[email protected]',
7875
url = 'https://github.com/jupyter-widgets/jupyterlab-sidecar',
7976
license = 'BSD',
77+
python_requires = ">=3.7",
8078
platforms = "Linux, Mac OS X, Windows",
8179
keywords = ['Jupyter', 'Widgets', 'IPython'],
8280
classifiers = [
@@ -85,10 +83,10 @@
8583
'License :: OSI Approved :: BSD License',
8684
'Programming Language :: Python',
8785
'Programming Language :: Python :: 3',
88-
'Programming Language :: Python :: 3.6',
8986
'Programming Language :: Python :: 3.7',
9087
'Programming Language :: Python :: 3.8',
9188
'Programming Language :: Python :: 3.9',
89+
'Programming Language :: Python :: 3.10',
9290
'Framework :: Jupyter',
9391
],
9492
include_package_data = True,

src/widget.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Project Jupyter.
22
// Distributed under the terms of the Modified BSD License.
33

4+
import { DOMWidgetModel } from '@jupyter-widgets/base';
45
import {
56
output
67
} from '@jupyter-widgets/jupyterlab-manager';
@@ -30,7 +31,8 @@ class SidecarModel extends output.OutputModel {
3031
initialize(attributes: any, options: any) {
3132
super.initialize(attributes, options);
3233

33-
this.widget_manager.display_model(undefined as any, this as any, {});
34+
// create_view calls the view's render function, which will display this widget in the sidebar.
35+
this.widget_manager.create_view(this as DOMWidgetModel, {})
3436
}
3537

3638
static model_name = 'SidecarModel';

0 commit comments

Comments
 (0)