From 9f44e41a2af00f4631625e90ff3522bcbfa72cd7 Mon Sep 17 00:00:00 2001 From: Sarantopoulos Konstantinos Date: Fri, 2 Jun 2023 18:12:57 +0300 Subject: [PATCH] Make babylonJS work with ipywidgets8 and backwards compatible --- package.json | 10 ++++++++-- setup.py | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5bce514..6663613 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "watch:nbextension": "NODE_OPTIONS=--max-old-space-size=4096 webpack --watch --mode=development" }, "dependencies": { - "@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4", + "@jupyter-widgets/base": "^2 || ^3 || ^4 || ^5 || ^6", "@jupyterlab/application": "^3.4.5", "@tiledb-inc/viz-core": "^1.0.2-alpha.2" }, @@ -88,7 +88,13 @@ }, "jupyterlab": { "extension": "lib/plugin", - "outputDir": "pybabylonjs/labextension" + "outputDir": "pybabylonjs/labextension", + "sharedPackages": { + "@jupyter-widgets/base": { + "bundled": false, + "singleton": true + } + } }, "styleModule": "style/index.js" } diff --git a/setup.py b/setup.py index d948b10..0d5a101 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ platforms="Linux, Mac OS X, Windows", keywords=["Jupyter", "JupyterLab", "JupyterLab3"], install_requires=[ - "ipywidgets>=7.0.0", + "ipywidgets>=7,<9", ], classifiers=[ "License :: OSI Approved :: MIT License",