Trouble understanding `sage -optional` answer

27 views
Skip to first unread message

Emmanuel Charpentier

unread,
May 4, 2021, 10:00:55 AMMay 4
to sage-support

Dear list

Trying to list the installed optional packages, I innocently typed :

charpent@zen-book-flip:~$ sage -optional | grep -v not_instal

The answer left me stimyed :

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/misc/package.py:114: UserWarning: failed to fetch the version of pkg='ore_algebra' at https://pypi.org/pypi/ore_algebra/json
  warnings.warn("failed to fetch the version of pkg={!r} at {}".format(pkg, url))

This, I understand as the impossibility of reaching the repository of ore-package . Shit happens..

[package]...............................[latest version] ([version])

cmdstanpy...............................? (0.9.75)
cypari2.................................? (2.1.2)
dot2tex.................................2.11.3.p0 (2.11.3.p0)
fricas..................................1.3.6 (1.3.6)
gap_jupyter.............................0.9 (0.9)
gap_packages............................4.11.0.p1 (4.11.0.p1)
json5...................................? (0.9.5)
jupyter_kernel_gap......................? (0.9)
jupyter_kernel_singular.................? (0.9.7)
jupyterlab..............................3.0.9 (2.2.9)
jupyterlab_server.......................? (1.2.0)
kenzo...................................1.1.9 (1.1.9)
libsemigroups...........................1.0.9 (1.0.9)
pandas..................................? (1.2.3)
pysingular..............................0.9.7 (0.9.7)
python_dateutil.........................? (2.8.1)
sagemath_standard.......................? (9.3rc5)
singular_jupyter........................0.9.7 (0.9.7)
tqdm....................................? (4.59.0)
ujson...................................? (4.0.2)

Some of these results are marked ? as available versions ; this, I interpret as Python packages installed viapip(either by me (e. g.cmdstanpy`) or by another installer).

jupyterlab installed version is 2.2.9, whereas the available version is 3.0.9.why hasn’t it upgraded during the last Sage upgrade ?

Can someone confirm these interpretations ?


Matthias Koeppe

unread,
May 4, 2021, 1:04:10 PMMay 4
to sage-support
On Tuesday, May 4, 2021 at 7:00:55 AM UTC-7 Emmanuel Charpentier wrote:

Trying to list the installed optional packages, I innocently typed :

charpent@zen-book-flip:~$ sage -optional | grep -v not_instal

The answer left me stimyed :

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/misc/package.py:114: UserWarning: failed to fetch the version of pkg='ore_algebra' at https://pypi.org/pypi/ore_algebra/json
  warnings.warn("failed to fetch the version of pkg={!r} at {}".format(pkg, url))

This, I understand as the impossibility of reaching the repository of ore-package

"sage-optional" uses PyPI to determine available versions of pip packages (see https://doc.sagemath.org/html/en/developer/packaging.html#package-source-types for the definition). 

The ore-algebra project, unfortunately, does not make proper releases; the Sage package is keyed to a particular commit in the project's github.
You can help by convincing the project maintainers to follow the best practices for Python packages: making releases and publishing them on PyPI.

[package]...............................[latest version] ([version])

cmdstanpy...............................? (0.9.75)
cypari2.................................? (2.1.2)
dot2tex.................................2.11.3.p0 (2.11.3.p0)
fricas..................................1.3.6 (1.3.6)
gap_jupyter.............................0.9 (0.9)
gap_packages............................4.11.0.p1 (4.11.0.p1)
json5...................................? (0.9.5)
jupyter_kernel_gap......................? (0.9)
jupyter_kernel_singular.................? (0.9.7)
jupyterlab..............................3.0.9 (2.2.9)
jupyterlab_server.......................? (1.2.0)
kenzo...................................1.1.9 (1.1.9)
libsemigroups...........................1.0.9 (1.0.9)
pandas..................................? (1.2.3)
pysingular..............................0.9.7 (0.9.7)
python_dateutil.........................? (2.8.1)
sagemath_standard.......................? (9.3rc5)
singular_jupyter........................0.9.7 (0.9.7)
tqdm....................................? (4.59.0)
ujson...................................? (4.0.2)

Some of these results are marked ? as available versions ; this, I interpret as Python packages installed viapip(either by me (e. g.cmdstanpy`) or by another installer).

jupyterlab installed version is 2.2.9, whereas the available version is 3.0.9.why hasn’t it upgraded during the last Sage upgrade ?

Our jupyterlab package, added in https://trac.sagemath.org/ticket/26059, is a pip package. It uses the following version specification: 

$ cat build/pkgs/jupyterlab/requirements.txt
jupyterlab ~= 2.2.5 

I would hope that in the Sage 9.4 series, we can upgrade ipython/jupyter/jupyterlab. There is already a ticket for this task: https://trac.sagemath.org/ticket/31280 – help is welcome.


 

slelievre

unread,
May 5, 2021, 9:55:18 AMMay 5
to sage-support
2021-05-04 17:04:10 UTC, Matthias Koeppe:
>
> On Tuesday, May 4, 2021 at 7:00:55 AM UTC-7 Emmanuel Charpentier:
> >
> > Trying to list the installed optional packages, I innocently typed :
> >
> > $ sage -optional | grep -v not_instal
> >
> > The answer left me stimyed :
> >
> > .../sage/misc/package.py:114: UserWarning: failed
> > to fetch the version of pkg='ore_algebra' at
> > warnings.warn("failed to fetch the version of pkg={!r} at {}".format(pkg, url))
>
> This, I understand as the impossibility of reaching the repository of ore-package.
>
> "sage-optional" uses PyPI to determine available versions of pip packages (see
> for the definition).
>
> The ore-algebra project, unfortunately, does not make proper releases;
> the Sage package is keyed to a particular commit in the project's github.
>
> [ ...]
>
> You can help by convincing the project maintainers to follow
> the best practices for Python packages: making releases and
> publishing them on PyPI.

I opened an issue for that on the ore_algebra issue tracker:


Please someone expand on concrete best practice instructions
or provide links to such instructions.


Reply all
Reply to author
Forward
0 new messages