[Debian-science-sagemath] nbsphinx 0.5: issue with ipywidgets

Dima Pasechnik dimpase at gmail.com
Wed Jan 8 14:23:45 GMT 2020


On Thu, Jan 2, 2020 at 10:42 PM Ximin Luo <infinity0 at debian.org> wrote:
>
> Gordon Ball:
> > On Mon, Dec 30, 2019 at 11:11:38PM +0800, Dima Pasechnik wrote:
> >> On Mon, Dec 30, 2019 at 10:41 PM Jerome BENOIT <calculus at rezozer.net> wrote:
> >>>
> >>>
> >>>
> >>> On 30/12/2019 16:58, Gordon Ball wrote:
> >>>> On Mon, Dec 30, 2019 at 03:06:46PM +0400, Jerome BENOIT wrote:
> >>>>> Hello, I am on my way to package  the latest version of nbsphinx.
> >>>>> Now nbsphinx uses ipywidgets. At one point is import ipywidgets.embed
> >>>>> but it appears that embed.py is not distributed while it exists upstream.
> >>>>> I am not that familiar with python: is it a ipywidgets packaging bug ?
> >>>>> an upstream nbsphinx bug ? may I use a workin around ?
> >>>>> Thanks in advance, Jerome
> >>>>
> >>>> I haven't looked in detail, but I would guess that it might be because
> >>>> we currently package a pretty outdated version of ipywidgets (6.0,
> >>>> current upstream is 7.5).

Sagemath has ipywidgets 7.4.2, and it has been so for some time
https://github.com/sagemath/sage/blob/develop/build/pkgs/ipywidgets/package-version.txt


> >>
> >> these old versions are most probably due to the need to maintain
> >> python2/3 compatibility.
> >> Not sure what's Debian plan on this is.
> >>
> >
> > This is not the case. Python2.7 support has already been dropped from
> > this package. The problem isn't the python libraries, which are
> > uncomplicated, but the build required for the accompanying javascript
> > library which provides the client-side/embedded implentation of the
> > widget. Upgrading from the current version requires several new packages
> > (phosphor, bits of jupyterlab), either packaging or emulating the build
> > tool they use (lerna), dealing with incompatibilities in their preferred
> > typescript version and the debian version, and finally bringing it all
> > together into a working build. Ximin did a heroic amount of work in the
> > past getting version 6 to work, and I haven't found time to do the same
> > for version 7.

Given that 7.4.2 is already in Sagemath, I kind of doubt there must be
still a lot of effort
needed on this in Debian.

> >
> >>>>
> >>>> The build for ipywidgets is a big javascript mess. Barring extra help,
> >>>> it's probably unlikely to change soon.
> >>>>
> >>>
> >>> Thanks for the prompt reply. Unfortunately I cannot help.
> >>> For the record, I have just push an intermediate version of the package at Salsa.
> >>>
> >>> Cheers, Jerome
> >>>
>
> Hi Jerome, I would not hold my breath for ipywidgets 7. Instead I would look for ways to patch nbsphinx 0.5 to avoid using ipywidgets altogether.
>
> The problem with ipywidgets and much of the npm ecosystem in general is that it is not really free software, but binary blobs masquerading as free software. npm packages are uploaded as pre-built javascript blobs, often minified or generated from typescript or purescript, there is no standardised CI process to ensure that the build process is repeatable and doesn't depend on e.g. the developer's specific version of typescript they used when they ran "npm publish". Often when converting these into Debian packages, you run into stupid build errors that take a while to debug. ipywidgets itself (like other larger npm projects) also keep changing their build tools, their internal packaging structure, their external dependencies, and there's no economically efficient way a volunteer team can keep up with it.
>
> The way some other FOSS distros package ipywidgets javascript is to cheat and use the binary blobs directly, but that is effectively like embedding windows EXE into your FOSS software. We don't accept that in Debian, there are a very few unfortunate exceptions like CPU microcode, but certainly we cannot make an exception for something as non-critical as a UI library.
>
> X
>
> --
> GPG: ed25519/56034877E1F87C35
> GPG: rsa4096/1318EFAC5FBBDBCE
> https://github.com/infinity0/pubkeys.git
>
> _______________________________________________
> Debian-science-sagemath mailing list
> Debian-science-sagemath at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-sagemath



More information about the Debian-science-sagemath mailing list