|
| 1 | +# JupyterLab Compatibility Documentation Update |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +This update documents JupyterLab version compatibility, adds maintenance plans, and implements dependency safeguards to prevent breaking changes. |
| 6 | + |
| 7 | +## Changes Made |
| 8 | + |
| 9 | +### 1. README.md - Added Comprehensive Compatibility Section |
| 10 | + |
| 11 | +- **Updated Requirements**: Changed from "JupyterLab 4.5.0 or higher" to "JupyterLab >= 4.4.0, < 5.0.0" |
| 12 | + - More accurate (content provider registry available from 4.4.0) |
| 13 | + - Includes upper bound to prevent JupyterLab 5.x installation |
| 14 | + |
| 15 | +- **Added Compatibility Section** with three subsections: |
| 16 | + - **JupyterLab Version Support**: Documents the 4.4.0+ requirement and upper bound |
| 17 | + - **Maintenance Policy**: |
| 18 | + - Explains semantic versioning for releases |
| 19 | + - Provides clear plan for JupyterLab 5.x support |
| 20 | + - References official JupyterLab extension guidelines |
| 21 | + - **Backwards Compatibility**: |
| 22 | + - Documents pre-release status (0.x.x) |
| 23 | + - Explains commitment to semver from 1.0.0 onwards |
| 24 | + - Notes that JupyterLab 3.x is not supported |
| 25 | + |
| 26 | +### 2. pyproject.toml - Updated JupyterLab Requirements |
| 27 | + |
| 28 | +- **Build system**: Updated from `jupyterlab>=4.0.0,<5` to `jupyterlab>=4.4.0,<5` |
| 29 | +- **Release hooks**: Updated from `jupyterlab>=4.0.0,<5` to `jupyterlab>=4.4.0,<5` |
| 30 | + |
| 31 | +### 3. package.json - Added Upper Bounds to Dependencies |
| 32 | + |
| 33 | +Added explicit upper bounds to all `@jupyterlab` dependencies to prevent breaking changes: |
| 34 | + |
| 35 | +```json |
| 36 | +"dependencies": { |
| 37 | + "@jupyterlab/application": "^4.0.0 <5", |
| 38 | + "@jupyterlab/coreutils": "^6.0.0 <7", |
| 39 | + "@jupyterlab/notebook": "^4.4.7 <5", |
| 40 | + "@jupyterlab/services": "^7.0.0 <8", |
| 41 | + "@jupyterlab/settingregistry": "^4.0.0 <5" |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | +```json |
| 46 | +"devDependencies": { |
| 47 | + "@jupyterlab/builder": "^4.0.0 <5", |
| 48 | + "@jupyterlab/testutils": "^4.0.0 <5" |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +### 4. src/index.ts - Updated Comment |
| 53 | + |
| 54 | +- Changed outdated comment about JupyterLab <4.4 support |
| 55 | +- Added clear error message indicating 4.4.0+ requirement |
| 56 | + |
| 57 | +### 5. CONTRIBUTING.md - Updated Versioning Section |
| 58 | + |
| 59 | +- Updated examples to reflect actual 4.4.0+ requirement |
| 60 | +- Documented the upper bounds strategy |
| 61 | +- Added reference to JupyterLab extension development best practices |
| 62 | + |
| 63 | +## Rationale |
| 64 | + |
| 65 | +### Why JupyterLab 4.4.0+? |
| 66 | + |
| 67 | +The extension uses the **content provider registry API** which was introduced in JupyterLab 4.4. This is not optional - the extension cannot function without it. |
| 68 | + |
| 69 | +### Why Upper Bounds? |
| 70 | + |
| 71 | +Following [JupyterLab's extension development guidelines](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#overview-of-extensions): |
| 72 | + |
| 73 | +> Consider documenting your maintenance plans to users in your project, or setting an upper bound on the version of JupyterLab your extension is compatible with in your project's package metadata. |
| 74 | +
|
| 75 | +Upper bounds prevent: |
| 76 | + |
| 77 | +- Automatic installation with incompatible future major versions |
| 78 | +- Breaking changes from affecting users unexpectedly |
| 79 | +- Support burden from untested versions |
| 80 | + |
| 81 | +### Backwards Compatibility |
| 82 | + |
| 83 | +Since this is version 0.1.0 (pre-release), there's no backwards compatibility to maintain yet. However, the documentation now clearly states: |
| 84 | + |
| 85 | +- Current status: APIs may change in 0.x.x versions |
| 86 | +- Future commitment: Semantic versioning from 1.0.0 onwards |
| 87 | + |
| 88 | +## Issue #22 - Dependency Breaking Changes |
| 89 | + |
| 90 | +This update addresses the concern about checking dependencies for breaking changes: |
| 91 | + |
| 92 | +1. ✅ All `@jupyterlab` dependencies now have upper bounds |
| 93 | +2. ✅ Version requirements accurately reflect actual needs (4.4.0+) |
| 94 | +3. ✅ Maintenance policy documented for future major version updates |
| 95 | +4. ✅ Users are informed about compatibility through README |
| 96 | + |
| 97 | +## Testing Recommendations |
| 98 | + |
| 99 | +Before releasing these changes: |
| 100 | + |
| 101 | +1. Verify the extension builds successfully: |
| 102 | + |
| 103 | + ```bash |
| 104 | + jlpm build:prod |
| 105 | + ``` |
| 106 | + |
| 107 | +2. Test with JupyterLab 4.4.x: |
| 108 | + |
| 109 | + ```bash |
| 110 | + pip install 'jupyterlab>=4.4.0,<4.5.0' |
| 111 | + ``` |
| 112 | + |
| 113 | +3. Verify installation fails gracefully with JupyterLab <4.4 or >=5.0 |
| 114 | + |
| 115 | +## Next Steps |
| 116 | + |
| 117 | +When JupyterLab 5.x is released: |
| 118 | + |
| 119 | +1. Review JupyterLab 5.x migration guide |
| 120 | +2. Test extension with JupyterLab 5.x alpha/beta |
| 121 | +3. Update dependencies if compatible |
| 122 | +4. If breaking changes required, release as new major version |
| 123 | +5. Document changes in CHANGELOG.md |
0 commit comments