Skip to content

Commit c33e821

Browse files
committed
docs: compatibility and maintenance plans
1 parent b669930 commit c33e821

File tree

5 files changed

+56
-21
lines changed

5 files changed

+56
-21
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,29 @@ jlpm test
146146

147147
We follow [Semantic Versioning (semver)](https://semver.org/).
148148

149-
The extension pins JupyterLab to the current major version in both Python and JavaScript dependencies to ensure compatibility.
149+
The extension requires **JupyterLab 4.4.0 or higher** (but not JupyterLab 5.x) due to its dependency on the content provider registry API. All JupyterLab dependencies include upper bounds to prevent automatic installation with incompatible future major versions.
150150

151-
**Example `pyproject.toml` dependency:**
151+
**Current `pyproject.toml` build requirement:**
152152

153153
```toml
154-
[project.optional-dependencies]
155-
jupyterlab = ["jupyterlab>=4.0.0,<5.0.0"]
154+
[build-system]
155+
requires = ["hatchling>=1.5.0", "jupyterlab>=4.4.0,<5", "hatch-nodejs-version>=0.3.2"]
156156
```
157157

158-
**Example `package.json` peerDependencies:**
158+
**Current `package.json` dependencies with upper bounds:**
159159

160160
```json
161-
"peerDependencies": {
162-
"@jupyterlab/application": "^4.0.0",
163-
"@jupyterlab/apputils": "^4.0.0",
164-
"jupyterlab": "^4.0.0"
161+
"dependencies": {
162+
"@jupyterlab/application": "^4.0.0 <5",
163+
"@jupyterlab/notebook": "^4.4.7 <5",
164+
"@jupyterlab/services": "^7.0.0 <8",
165+
"@jupyterlab/coreutils": "^6.0.0 <7",
166+
...
165167
}
166168
```
167169

170+
These upper bounds help prevent breaking changes from affecting users and align with JupyterLab's [extension development best practices](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#overview-of-extensions).
171+
168172
## Sync with the JupyterLab extension template
169173

170174
This project was bootstrapped using the [JupyterLab extension template](https://github.com/jupyterlab/extension-template). To keep your project up to date with improvements and best practices from the template, run:

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,38 @@ Read‑only viewer for Deepnote `.deepnote` files inside JupyterLab.
88
## Requirements
99

1010
- Python 3.9 or higher
11-
- JupyterLab 4.5.0 or higher
11+
- JupyterLab >= 4.4.0, < 5.0.0
12+
13+
## Compatibility
14+
15+
### JupyterLab Version Support
16+
17+
This extension is compatible with **JupyterLab 4.4.0 or higher** (specifically JupyterLab 4.x series). It requires the content provider registry API introduced in JupyterLab 4.4.
18+
19+
**Upper bound:** The extension sets an upper bound of `< 5.0.0` to prevent automatic installation with potentially incompatible future major versions of JupyterLab.
20+
21+
### Maintenance Policy
22+
23+
Following [JupyterLab's extension development guidelines](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#overview-of-extensions), we adhere to semantic versioning principles:
24+
25+
- **Major releases** (e.g., 1.0.0 → 2.0.0): May introduce breaking changes and require user action
26+
- **Minor releases** (e.g., 1.0.0 → 1.1.0): Add new features while maintaining backwards compatibility
27+
- **Patch releases** (e.g., 1.0.0 → 1.0.1): Bug fixes and minor improvements only
28+
29+
When JupyterLab 5.x is released, we will:
30+
31+
1. Evaluate the changes and update the extension as needed
32+
2. Release a new major or minor version with explicit JupyterLab 5.x support
33+
3. Clearly document any breaking changes in the changelog
34+
35+
### Backwards Compatibility
36+
37+
This extension follows semantic versioning for its own API:
38+
39+
- **Current version (0.x.x)**: Pre-release phase. APIs may change without prior notice.
40+
- **Version 1.0.0 onwards**: We will maintain backwards compatibility within major versions and clearly document breaking changes between major versions.
41+
42+
Note: This extension does **not** support JupyterLab 3.x or earlier versions.
1243

1344
## Install
1445

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060
},
6161
"dependencies": {
6262
"@deepnote/blocks": "^1.1.0",
63-
"@jupyterlab/application": "^4.0.0",
64-
"@jupyterlab/coreutils": "^6.0.0",
65-
"@jupyterlab/notebook": "^4.4.7",
66-
"@jupyterlab/services": "^7.0.0",
67-
"@jupyterlab/settingregistry": "^4.0.0",
63+
"@jupyterlab/application": "^4.0.0 <5",
64+
"@jupyterlab/coreutils": "^6.0.0 <7",
65+
"@jupyterlab/notebook": "^4.4.7 <5",
66+
"@jupyterlab/services": "^7.0.0 <8",
67+
"@jupyterlab/settingregistry": "^4.0.0 <5",
6868
"@lumino/widgets": "^2.7.1",
6969
"lodash": "^4.17.21",
7070
"yaml": "^2.8.1",
7171
"zod": "^4.1.11"
7272
},
7373
"devDependencies": {
74-
"@jupyterlab/builder": "^4.0.0",
75-
"@jupyterlab/testutils": "^4.0.0",
74+
"@jupyterlab/builder": "^4.0.0 <5",
75+
"@jupyterlab/testutils": "^4.0.0 <5",
7676
"@types/jest": "^29.2.0",
7777
"@types/json-schema": "^7.0.11",
7878
"@types/lodash": "^4.17.20",

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
2+
requires = ["hatchling>=1.5.0", "jupyterlab>=4.4.0,<5", "hatch-nodejs-version>=0.3.2"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -78,7 +78,7 @@ version_cmd = "hatch version"
7878

7979
[tool.jupyter-releaser.hooks]
8080
before-build-npm = [
81-
"python -m pip install 'jupyterlab>=4.0.0,<5'",
81+
"python -m pip install 'jupyterlab>=4.4.0,<5'",
8282
"jlpm",
8383
"jlpm build:prod"
8484
]

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ const plugin: JupyterFrontEndPlugin<void> = {
2727
toolbarRegistry: IToolbarWidgetRegistry
2828
) => {
2929
// Register a custom contents provider for the default notebook widget factory.
30+
// Note: Content provider registry is required (available in JupyterLab 4.4+)
3031
const drive = (app.serviceManager.contents as ContentsManager).defaultDrive;
3132
const registry = drive?.contentProviderRegistry;
3233
if (!registry) {
33-
// If content provider is a non-essential feature and support for JupyterLab <4.4 is desired:
3434
console.error(
35-
'Cannot initialize content provider: no content provider registry.'
35+
'Cannot initialize content provider: no content provider registry. JupyterLab 4.4.0 or higher is required.'
3636
);
3737
return;
3838
}

0 commit comments

Comments
 (0)