-
Notifications
You must be signed in to change notification settings - Fork 950
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
Remove JupyterLab dependency in jupyterlab_widgets #2995
Remove JupyterLab dependency in jupyterlab_widgets #2995
Conversation
Even though jupyterlab_widgets is useless without JupyterLab, it is only a small Python package (that don't need JupyterLab) and some static files installed in the right path (share/jupyter/labextensions). I would then expect it to not depend on JupyterLab. This will allow other widgets extension to depend on the jupyterlab_widget package so that those widgets extensions can work on JupyterLab out of the box, without them depending on JupyterLab. Signed-off-by: martinRenou <[email protected]>
I think we do need some system to say which version(s) of lab the JS is compatible with though... |
We might be able to do this using conda-forge's Concerning pip, idk. |
pip is introducing a new solver this year that I think will let it do things like conda's I went back and forth on whether jupyterlab_widgets should depend on jlab or not. It's a continuation of our conversation from the workshop earlier this year, of where to draw the cutoff in the dependency. |
Sounds like the community sentiment is to not have the dependency, so let's go for it! |
:O horrraayyyy So if I understand correctly now widgets (e.g. ipympl) can just require
Based on
I went a fairly unproductive deep dive of pip documentation and that wasn't totally my conclusion, very happy to be wrong though. |
Something similar is implemented in https://pip.pypa.io/en/stable/user_guide/#constraints-files, though not quite mirroring a setup.py runtime constraint. The new solver, IIRC, keeps track of dependencies in an environment and makes sure the environment stays consistent. So I think the underlying capability is there to have something like run_constrained, even if a similar setup.py-specified constraint is not currently implemented. |
This removes the jupyterlab dependency, but we still have a run constraint. See jupyter-widgets/ipywidgets#2995
I released this as |
Just tried it with ipympl, worked great! I could use it with just notebook without installing jlab, then once I installed jlab3 it worked immediately. |
@jasongrout should we go further and make |
I'm okay with that. That would mean that other widget packages actually don't have to depend on it - they just depend on ipywidgets. |
Yes! That would be great. |
Even though jupyterlab_widgets is useless without JupyterLab, it is only a small Python package (that don't need JupyterLab) and some static files installed in the right path (share/jupyter/labextensions). I would then expect it to not depend on JupyterLab.
This will allow other widgets extension to depend on the jupyterlab_widget package so that those widgets extensions can work on JupyterLab out of the box (given that they install their static files as well), without them depending on JupyterLab.
cc. @ianhi