Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75309 - [python-ipywidgets] 7.7.1 dependencies missing/wrong

Attached to Project: Community Packages
Opened by leuko (leuko) - Wednesday, 13 July 2022, 08:52 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 03 August 2022, 07:23 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Antonio Rojas (arojas)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

python-ipywidgets 7.7.1 has the following direct dependencies:

```
$ pipdeptree -p ipywidgets | grep '^ -'

- ipykernel [required: >=4.5.1, installed: 6.15.1]
- ipython [required: >=4.0.0, installed: 8.4.0]
- ipython-genutils [required: ~=0.2.0, installed: 0.2.0]
- jupyterlab-widgets [required: >=1.0.0, installed: ?]
- traitlets [required: >=4.3.1, installed: 5.3.0]
- widgetsnbextension [required: ~=3.6.0, installed: 3.6.1]
```
PKGBUILD only lists:

```
depends=('python-ipykernel' 'python-jsonschema' 'python-ipython-genutils')
```

Here is an excerpt from the [documentation](https://ipywidgets.readthedocs.io/en/stable/)

> The Jupyter Widgets framework has several components:
> ...
> ... automatically installs extensions for JupyterLab and Jupyter Notebook (the jupyterlab-widgets and widgetsnbextension packages).

I also noticed that [jupyter-widgetsnbextension](https://archlinux.org/packages/community/any/jupyter-widgetsnbextension/) depends on `python-ipywidgets`, but it should not:

```
$ pipdeptree -p widgetsnbextension

widgetsnbextension==3.6.1
- notebook [required: >=4.4.1, installed: ?]
```

Can someone confirm this?

I can open an extra ticket for `jupyter-widgetsnbextension` if this ticket is confirmed.
This task depends upon

Closed by  Antonio Rojas (arojas)
Wednesday, 03 August 2022, 07:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  python-ipywidgets 7.7.1-2
Comment by leuko (leuko) - Wednesday, 13 July 2022, 09:07 GMT
I also tested this package without `jupyterlab-widgets`. When I open `jupyter lab` and then run the following cell:

```
@interact(x=True, y=1.0)
def g(x, y):
return (x, y)
```

The widget is not shown.

The code does not error out, so `jupyterlab-widgets` and `jupyter-widgetsnbextension` could be seen as optional dependencies. In my opinion:

- At least `jupyterlab-widgets` should be a dependency, because `ipywidgets` without Jupyter notebooks does not make sense.
- The classic notebook will fade out, so `jupyter-widgetsnbextension` could stay as an optional dependency. But this leads to an error in the package `nbgrader` which uses `ipywidgets`:

```
$ nbgrader
...
pkg_resources.DistributionNotFound: The 'widgetsnbextension~=3.6.0' distribution was not found and is required by ipywidgets
```
Comment by Toolybird (Toolybird) - Saturday, 23 July 2022, 01:36 GMT
Related  FS#74339 
Comment by Antonio Rojas (arojas) - Wednesday, 03 August 2022, 07:20 GMT
Some packages (eg. sagemath) hard depend on ipywidgets even for starting up, so there are use cases for having it installed without the widgets packages

Loading...