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

Should most collaboration python packages depend on jupyterlab? #425

Closed
krassowski opened this issue Jan 7, 2025 · 7 comments · Fixed by #429
Closed

Should most collaboration python packages depend on jupyterlab? #425

krassowski opened this issue Jan 7, 2025 · 7 comments · Fixed by #429
Labels
bug Something isn't working

Comments

@krassowski
Copy link
Member

Description

It looks like:

de-facto require JupyterLab. We currently do not have a minimum pin which means that adding new features is tricky if these requires newer JupyterLab versions. Even in case of Jupyter Notebook 7, it still depends on JupyterLab.

The only argument against it I can see is the slight possibility that third-party packages could use JupyterLab extension mechanism and could consume extension provided by the above three extensions without installing JupyterLab itself.

On the other hand, jupyter-server-ydoc is not jupyterlab-specific and does not bundle a jupyterlab extension.

@krassowski krassowski added the bug Something isn't working label Jan 7, 2025
@jtpio
Copy link
Member

jtpio commented Jan 7, 2025

The only argument against it I can see is the slight possibility that third-party packages could use JupyterLab extension mechanism and could consume extension provided by the above three extensions without installing JupyterLab itself.

Another case: custom lab-based applications that only depend on jupyterlab_server, like https://github.com/jupyterlab/jupyterlab/tree/main/examples/federated for example, that may not want to bring the whole jupyterlab package as a dependency.

@krassowski
Copy link
Member Author

Maybe we can just add a dependency pin to jupyter-collaboration - this way a potential user like examples/federated can install the atomic dependencies but majority of users will be upgraded to the correct version.

@andrii-i
Copy link
Contributor

Are there any downsides to adding a JupyterLab dependency pin to jupyter-collaboration? A mechanism like this to specify which versions of JupyterLab current version of jupyter-collaboration is compatible with would help with versions mismatch issues.

@krassowski
Copy link
Member Author

During frontends meeting @jtpio brought up some historical concern about execution in wasm environments. I wonder if we could use a specifier as in jupyterlab-myst:

 "jupyter_server>=2.0.1,<3;platform_system!='Emscripten'"

https://github.com/jupyter-book/jupyterlab-myst/blob/4c70b0312aee6f2f65c18d1aeec80521c1fa5bc3/pyproject.toml#L26C4-L26C61

@andrii-i
Copy link
Contributor

andrii-i commented Jan 16, 2025

I opened #429 pinning jupyterlab>=4.4.0a2,<5.0.0 in jupyter-collaboration.

@jtpio, @krassowski I have not added platform_system!='Emscripten' yet but I'm open to do it if you think it makes sense. My only concern is if it's necessary now or if it might be a premature optimization. Also I'm not very well versed in wasm and wasm compilers, would adding Emscripten to the exceptions be enough to cover most wasm compilers / platforms used with jupyter?

@andrii-i
Copy link
Contributor

Based on discussion during the JupyterLab call today adding platform_system!='Emscripten' exception is not necessary for now as there are no known jupyter-collaboration wasm environments so PR #429 is ready to be reviewed and merged.

@andrii-i
Copy link
Contributor

@dlqqq was able to give #429 a look and approved it. I have also talked about it during the JupyterLab call today and there were no comments. Please let me know if anyone plans to review #429 it or has any concerns about it. Otherwise I plan to merge it in a couple of days.

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
3 participants