Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to jupyterlab 4 and lumino 2 #3707

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
Expand Down Expand Up @@ -39,15 +39,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
**/requirements*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyterlab~=3.0
python -m pip install jupyterlab===4.0.0a34
- name: Install node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U jupyterlab~=3.2 jupyter-packaging~=0.10
python -m pip install -U jupyterlab==4.0.0a34 jupyter-packaging~=0.10

- name: Install node
uses: actions/setup-node@v3
Expand All @@ -169,7 +169,7 @@ jobs:

- name: Build and Install ipywidgets
run: |
yarn --frozen-lockfile
yarn
yarn build

- name: Build the extension
Expand All @@ -188,7 +188,7 @@ jobs:
- name: Install Test Dependencies
run: |
cd ui-tests
yarn --frozen-lockfile
yarn
yarn playwright install chromium

- name: Launch JupyterLab
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ipykernel
ipyleaflet
jupyter-client
jupyter-packaging
jupyterlab >=3,<4
jupyterlab ==4.0.0a34
jupyterlite ==0.1.0b18
matplotlib
myst-nb >=0.17,<0.18
Expand Down
2 changes: 1 addition & 1 deletion examples/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@jupyter-widgets/base": "^6.0.2",
"@jupyter-widgets/controls": "^5.0.3",
"@jupyter-widgets/html-manager": "^1.0.5",
"@jupyterlab/services": "^6.0.0",
"@jupyterlab/services": "^7.0.0-alpha.19",
"codemirror": "^5.48.0",
"font-awesome": "^4.7.0",
"http-server": "^14.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"typescript": "~4.9.4"
},
"devDependencies": {
"@jupyterlab/buildutils": "^3.5.2",
"@jupyterlab/buildutils": "^4.0.0-alpha.19",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"eslint": "^8.32.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/base-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"dependencies": {
"@jupyter-widgets/base": "^6.0.2",
"@jupyterlab/services": "^6.0.0",
"@lumino/coreutils": "^1.11.1",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@lumino/coreutils": "^2.0.0-beta.0",
"base64-js": "^1.2.1",
"sanitize-html": "^2.3"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"test:unit:ie": "npm run test:unit:default -- --browsers=IE"
},
"dependencies": {
"@jupyterlab/services": "^6.0.0",
"@lumino/coreutils": "^1.11.1",
"@lumino/messaging": "^1.10.1",
"@lumino/widgets": "^1.30.0",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
Comment on lines +37 to +39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest being soft on the Lumino dependencies:

Suggested change
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"@lumino/coreutils": "^1.11.1 || ^2.0.0-beta.0",
"@lumino/messaging": "^1.10.1 || ^2.0.0-beta.0",
"@lumino/widgets": "^1.30.0 || ^2.0.0-beta.0",

That way people won't get warnings in the JS console with JupyterLab 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that would be the goal. I'd like first to get the CI green with more strict constraints on lumino.

"@types/backbone": "1.4.14",
"@types/lodash": "^4.14.134",
"backbone": "1.4.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
},
"dependencies": {
"@jupyter-widgets/base": "^6.0.2",
"@lumino/algorithm": "^1.9.1",
"@lumino/domutils": "^1.8.1",
"@lumino/messaging": "^1.10.1",
"@lumino/signaling": "^1.10.1",
"@lumino/widgets": "^1.30.0",
"@lumino/algorithm": "^2.0.0-beta.0",
"@lumino/domutils": "^2.0.0-beta.0",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/signaling": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"d3-color": "^3.0.1",
"d3-format": "^3.0.1",
"jquery": "^3.1.1",
"nouislider": "15.4.0"
},
"devDependencies": {
"@jupyterlab/services": "^6.0.0",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@types/d3-color": "^3.0.2",
"@types/d3-format": "^3.0.1",
"@types/expect.js": "^0.3.29",
Expand Down
10 changes: 5 additions & 5 deletions packages/html-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"@jupyter-widgets/controls": "^5.0.3",
"@jupyter-widgets/output": "^6.0.2",
"@jupyter-widgets/schema": "^0.5.1",
"@jupyterlab/outputarea": "^3.0.0",
"@jupyterlab/rendermime": "^3.0.0",
"@jupyterlab/rendermime-interfaces": "^3.0.0",
"@lumino/messaging": "^1.10.1",
"@lumino/widgets": "^1.30.0",
"@jupyterlab/outputarea": "^4.0.0-alpha.19",
"@jupyterlab/rendermime": "^4.0.0-alpha.19",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.19",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"ajv": "^8.6.0",
"jquery": "^3.1.1"
},
Expand Down
40 changes: 20 additions & 20 deletions python/jupyterlab_widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,31 @@
"@jupyter-widgets/base-manager": "^1.0.3",
"@jupyter-widgets/controls": "^5.0.3",
"@jupyter-widgets/output": "^6.0.2",
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/docregistry": "^3.0.0",
"@jupyterlab/logconsole": "^3.0.0",
"@jupyterlab/mainmenu": "^3.0.0",
"@jupyterlab/nbformat": "^3.0.0",
"@jupyterlab/notebook": "^3.0.0",
"@jupyterlab/outputarea": "^3.0.0",
"@jupyterlab/rendermime": "^3.0.0",
"@jupyterlab/rendermime-interfaces": "^3.0.0",
"@jupyterlab/services": "^6.0.0",
"@jupyterlab/settingregistry": "^3.0.0",
"@jupyterlab/translation": "^3.0.0",
"@lumino/algorithm": "^1.9.1",
"@lumino/coreutils": "^1.11.1",
"@lumino/disposable": "^1.10.1",
"@lumino/properties": "^1.8.1",
"@lumino/signaling": "^1.10.1",
"@lumino/widgets": "^1.30.0",
"@jupyterlab/application": "^4.0.0-alpha.19",
"@jupyterlab/docregistry": "^4.0.0-alpha.19",
"@jupyterlab/logconsole": "^4.0.0-alpha.19",
"@jupyterlab/mainmenu": "^4.0.0-alpha.19",
"@jupyterlab/nbformat": "^4.0.0-alpha.19",
"@jupyterlab/notebook": "^4.0.0-alpha.19",
"@jupyterlab/outputarea": "^4.0.0-alpha.19",
"@jupyterlab/rendermime": "^4.0.0-alpha.19",
"@jupyterlab/rendermime-interfaces": "^3.8.0-alpha.19",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@jupyterlab/settingregistry": "^4.0.0-alpha.19",
"@jupyterlab/translation": "^4.0.0-alpha.19",
"@lumino/algorithm": "^2.0.0-beta.0",
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/disposable": "^2.0.0-beta.0",
"@lumino/properties": "^2.0.0-beta.0",
"@lumino/signaling": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"@types/backbone": "1.4.14",
"jquery": "^3.1.1",
"semver": "^7.3.5"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.0",
"@jupyterlab/cells": "^3.0.0",
"@jupyterlab/builder": "^4.0.0-alpha.19",
"@jupyterlab/cells": "^4.0.0-alpha.19",
"@types/semver": "^7.3.6",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
Expand Down
4 changes: 2 additions & 2 deletions python/jupyterlab_widgets/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ export class WidgetManager extends LabWidgetManager {
*/
private _saveState(): void {
const state = this.get_state_sync({ drop_defaults: true });
this._context.model.metadata.set('widgets', {
this._context.contentsModel?.content.metadata.set('widgets', {
'application/vnd.jupyter.widget-state+json': state,
});
}
Expand Down Expand Up @@ -512,7 +512,7 @@ export class WidgetManager extends LabWidgetManager {
* Load widget state from notebook metadata
*/
async _loadFromNotebook(notebook: INotebookModel): Promise<void> {
const widget_md = notebook.metadata.get('widgets') as any;
const widget_md = notebook.getMetadata('widgets');
// Restore any widgets from saved state that are not live
if (widget_md && widget_md[WIDGET_STATE_MIMETYPE]) {
let state = widget_md[WIDGET_STATE_MIMETYPE];
Expand Down
6 changes: 3 additions & 3 deletions python/widgetsnbextension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"@jupyter-widgets/controls": "^5.0.3",
"@jupyter-widgets/html-manager": "^1.0.5",
"@jupyter-widgets/output": "^6.0.2",
"@jupyterlab/services": "^6.0.0",
"@lumino/messaging": "^1.10.1",
"@lumino/widgets": "^1.30.0",
"@jupyterlab/services": "^7.0.0-alpha.19",
"@lumino/messaging": "^2.0.0-beta.0",
"@lumino/widgets": "^2.0.0-beta.0",
"backbone": "1.4.0"
},
"devDependencies": {
Expand Down
12 changes: 4 additions & 8 deletions ui-tests/jupyter_server_config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from tempfile import mkdtemp
from jupyterlab.galata import configure_jupyter_server

c.ServerApp.port = 8888
c.ServerApp.open_browser = False
c.ServerApp.root_dir = mkdtemp(prefix='galata-test-')
c.ServerApp.token = ""
c.ServerApp.password = ""
c.ServerApp.disable_check_xsrf = True
configure_jupyter_server(c)

c.LabApp.expose_app_in_browser = True
# Uncomment to set server log level to debug level
# c.ServerApp.log_level = "DEBUG"
2 changes: 1 addition & 1 deletion ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"author": "Project Jupyter",
"license": "BSD-3-Clause",
"devDependencies": {
"@jupyterlab/galata": "^4.5.1",
"@jupyterlab/galata": "^5.0.0-alpha.19",
"yarn-deduplicate": "^6.0.1"
}
}
Loading