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

Move widgetsnbextension, jupyterlab_widgets from install_requires to extras_require #3080

Closed
wants to merge 1 commit into from

Conversation

mkoeppe
Copy link

@mkoeppe mkoeppe commented Feb 2, 2021

A longstanding TODO in the ipywidgets setup.py: "Dynamically add [the dependency on widgetsnbextension] only if notebook 4.x is installed in this interpreter, to allow ipywidgets to be installed on bare kernels."

Such conditional dependencies, of course, are incompatible with modern Python packaging.

Recent versions of ipywidgets have added another dependency that is in the way of the goal of installs on bare kernels: an extras_require that pulls in all of JupyterLab via jupyterlab_widgets: ':python_version>="3.6"': ['jupyterlab_widgets>=1.0.0']

In this pull request, we change these problematic dependencies to extra_requires.

Cross-ref: https://trac.sagemath.org/ticket/31278

@martinRenou
Copy link
Member

We discussed during yesterday's meeting removing the Notebook dependency from widgets nbextension.

Concerning jupyterlab-widgets, it does not pull jupyterlab anymore, since #2995.

@mkoeppe
Copy link
Author

mkoeppe commented Feb 3, 2021

Concerning jupyterlab-widgets, it does not pull jupyterlab anymore, since #2995.

Thanks, that's good news, I had missed that.

@martinRenou
Copy link
Member

Having widgetsnbextension and jupyterlab-widgets as install dependencies makes it much more user-friendly because people can just do pip install ipywidgets and they have a working setup for both Jupyter Notebook and JupyterLab. I understand that for bare kernel installations that might not always make sense, but those extensions only bring static assets that it installs on the machine, it should do no harm (apart from the Notebook that is pulled currently).

@mkoeppe
Copy link
Author

mkoeppe commented Feb 4, 2021

If the notebook dependency is indeed dropped from widgetsnbextension (when is this going to happen?), then I would agree that the proposed change in this PR is not necessary.

@willingc
Copy link
Contributor

willingc commented Feb 4, 2021

Is this something we can move into 8.0 instead of 7.x? I'm not sure that changing behavior here makes good sense for existing users. There are a lot of breaking changes in 8.0 and this seems better suited to that.

@jasongrout
Copy link
Member

If the notebook dependency is indeed dropped from widgetsnbextension (when is this going to happen?), then I would agree that the proposed change in this PR is not necessary.

That is the current plan for 8.0.

Closing as requested, then.

@jasongrout jasongrout closed this Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants