Allow Jupyter Collaboration v5 alpha (Jupyter YDoc v4 support)#462
Allow Jupyter Collaboration v5 alpha (Jupyter YDoc v4 support)#462dlqqq wants to merge 1 commit into
Conversation
Bump dependency pins so jupyterlab-chat can install against the jupyter-collaboration v5 alpha prerelease, which is currently the only release supporting Jupyter YDoc v4. - python/jupyterlab-chat: jupyter_collaboration >=4,<5 -> >=4,<6 (keeps v4 support while allowing the 5.0.0a0 prerelease). jupyter_ydoc (<5) and pycrdt (<0.15) pins already cover the alpha's requirements. - packages/jupyterlab-chat & jupyterlab-chat-extension: @jupyter/collaborative-drive ^4.4.0 -> ^4.4.0 || ^5.0.0-alpha.0 (the drive package reaches 5.0.0-alpha.0 at the v5 alpha; @jupyter/ydoc already allows ^4.0.0, which is what the alpha depends on).
|
@brichet I think this is safe because we want to support JupyterLab v4.6 anyways, which requires Jupyter YDoc v4, which is only released in Jupyter Collaboration v5 alpha right now. We can bump the version floors once the v5 official release is out. I don't think this change will have an impact on most users. They will still install Jupyter Collaboration v4 if they run: Since without the I'd like to see this PR merged & released in Jupyter Chat v0.23.0a2 mainly to verify that we can get a Jupyter AI v3.1 pre-release working with no errors on JL v4.6 ASAP. |
brichet
left a comment
There was a problem hiding this comment.
Thanks @dlqqq, LGTM.
I tested it with both set of versions of jupyter-collaboration and jupyter-ydoc successfully:
- jupyter-collaboration 4.4.1, jupyter-ydoc 3.5.0 and pycrdt 0.13.1
- jupyter-collaboration 5.0.0a0, jupyter-ydoc 4.1.1 and pycrdt 0.14.1
| version: 3.0.5 | ||
| resolution: "@jupyter/ydoc@npm:3.0.5" | ||
| "@jupyter/ydoc@npm:^3.0.0 || ^4.0.0, @jupyter/ydoc@npm:^4.0.0": | ||
| version: 4.0.0 |
There was a problem hiding this comment.
We could dedup dependencies, to keep only one version of each.
jlpm dlx yarn-berry-deduplicate -s fewerHighest && jlpm install
Summary
Bumps
jupyterlab-chat's dependency pins so it can install against theJupyter Collaboration v5 alpha prerelease, which is currently the only
Jupyter Collaboration release that supports Jupyter YDoc v4.
Jupyter Collaboration is a metapackage that ships several npm packages plus the
jupyter_collaborationPython package, and they don't all carry the same majorversion. I verified the actual per-package versions at the
v5.0.0alpha0tag /published prereleases rather than assuming lockstep:
jupyter_collaboration(PyPI)5.0.0a0@jupyter/collaborative-drive(npm)5.0.0-alpha.0@jupyter/docprovider(npm)5.0.0-alpha.0jupyter_ydoc(transitive, viajupyter-server-ydoc)>=4.0.0b0,<5.0.0@jupyter/ydoc(transitive, viacollaborative-drive)^4.0.0-a3Changes
python/jupyterlab-chat/pyproject.toml—jupyter_collaboration>=4,<5→jupyter_collaboration>=4,<6. This keeps v4support while allowing the
5.0.0a0prerelease. The existingjupyter_ydoc(
<5.0.0) andpycrdt(<0.15.0) pins already satisfy what the alpha pullsin (
jupyter_ydoc 4.x,pycrdt 0.14.x), so they're unchanged.packages/jupyterlab-chat/package.jsonandpackages/jupyterlab-chat-extension/package.json—@jupyter/collaborative-drive^4.4.0→^4.4.0 || ^5.0.0-alpha.0. This isthe one npm dependency jupyter-chat declares from the metapackage, and it
reaches
5.0.0-alpha.0at the v5 alpha. The@jupyter/ydocrange(
^3.0.0 || ^4.0.0) already allows the v4 that the alpha depends on, so it'sunchanged.
yarn.lock— regenerated;@jupyter/collaborative-drivenow resolves to5.0.0-alpha.0(with@jupyter/ydoc 4.x).Verification
pip install --pre "jupyter_collaboration>=5.0.0a0,<6"resolves cleanly andinstalls
jupyter-collaboration 5.0.0a0,jupyter-ydoc 4.1.1,pycrdt 0.14.1.jlpm eslint:checkandjlpm prettier:checkpass.