Skip to content

Allow Jupyter Collaboration v5 alpha (Jupyter YDoc v4 support)#462

Open
dlqqq wants to merge 1 commit into
jupyterlab:mainfrom
dlqqq:bump-jupyter-collaboration-v5-alpha
Open

Allow Jupyter Collaboration v5 alpha (Jupyter YDoc v4 support)#462
dlqqq wants to merge 1 commit into
jupyterlab:mainfrom
dlqqq:bump-jupyter-collaboration-v5-alpha

Conversation

@dlqqq

@dlqqq dlqqq commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Bumps jupyterlab-chat's dependency pins so it can install against the
Jupyter 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_collaboration Python package, and they don't all carry the same major
version. I verified the actual per-package versions at the v5.0.0alpha0 tag /
published prereleases rather than assuming lockstep:

Package Version at v5 alpha
jupyter_collaboration (PyPI) 5.0.0a0
@jupyter/collaborative-drive (npm) 5.0.0-alpha.0
@jupyter/docprovider (npm) 5.0.0-alpha.0
jupyter_ydoc (transitive, via jupyter-server-ydoc) >=4.0.0b0,<5.0.0
@jupyter/ydoc (transitive, via collaborative-drive) ^4.0.0-a3

Changes

  • python/jupyterlab-chat/pyproject.toml
    jupyter_collaboration>=4,<5jupyter_collaboration>=4,<6. This keeps v4
    support while allowing the 5.0.0a0 prerelease. The existing jupyter_ydoc
    (<5.0.0) and pycrdt (<0.15.0) pins already satisfy what the alpha pulls
    in (jupyter_ydoc 4.x, pycrdt 0.14.x), so they're unchanged.
  • packages/jupyterlab-chat/package.json and
    packages/jupyterlab-chat-extension/package.json
    @jupyter/collaborative-drive ^4.4.0^4.4.0 || ^5.0.0-alpha.0. This is
    the one npm dependency jupyter-chat declares from the metapackage, and it
    reaches 5.0.0-alpha.0 at the v5 alpha. The @jupyter/ydoc range
    (^3.0.0 || ^4.0.0) already allows the v4 that the alpha depends on, so it's
    unchanged.
  • yarn.lock — regenerated; @jupyter/collaborative-drive now resolves to
    5.0.0-alpha.0 (with @jupyter/ydoc 4.x).

Verification

  • pip install --pre "jupyter_collaboration>=5.0.0a0,<6" resolves cleanly and
    installs jupyter-collaboration 5.0.0a0, jupyter-ydoc 4.1.1,
    pycrdt 0.14.1.
  • Python test suite passes against the alpha (19 passed).
  • Frontend builds successfully; jlpm eslint:check and jlpm prettier:check
    pass.

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).
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Binder 👈 Launch a Binder on branch dlqqq/jupyter-chat/bump-jupyter-collaboration-v5-alpha

@dlqqq dlqqq added the bug Something isn't working label Jul 7, 2026
@dlqqq dlqqq requested a review from brichet July 7, 2026 22:18
@dlqqq

dlqqq commented Jul 7, 2026

Copy link
Copy Markdown
Member Author

@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:

pip install jupyterlab jupyter-chat

Since without the --pre flag, pip will just install JupyterLab v4.6 but only Jupyter Collaboration v4. v4 doesn't support Jupyter YDoc v4 in its version range so their environments will still complain in the browser logs and jupyter labextension list. This will be fixed once the Jupyter Collaboration v5 official release is out.

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 brichet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Comment thread yarn.lock
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

@brichet brichet Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could dedup dependencies, to keep only one version of each.

jlpm dlx yarn-berry-deduplicate -s fewerHighest && jlpm install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants