sagemath/sage

Misc pip upgrades again

Closed this issue · 37 comments

This ticket (similar to #26969) upgrades the following packages:

package         before      after
----------------------------------
bleach          3.0.2       3.1.0
certifi         2018.11.29  2019.3.9
configparser    3.5.0       3.7.4
cypari          2.1.0.p0    2.1.1
cython          0.29.5.p0   0.29.10
decorator       4.3.0       4.4.0
defusedxml      0.5.0       0.6.0
entrypoints     0.2.3       0.3

Tarballs:

CC: @slel @vbraun @embray @jdemeyer @kiwifb

Component: packages: standard

Keywords: upgrade

Author: Frédéric Chapoton

Branch/Commit: 34aba48

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/27886

comment:1

Some of these are only for Python 3: ipython, ipykernel, matplotlib, Sphinx, rpy2 (?), possibly others. In some cases (matplotlib, rpy2) we may be able to upgrade one or two minor versions and still maintain compatibility with Python 2, but we can't upgrade to the latest version yet.

slel commented
comment:2

To take into account py2 / py3, upgrade this:

package upstream             version    latest   wheel  py3     spkg name in Sage
official name                in Sage    py2-ok   sdist  only    if different
-------------------------------------------------------------------------------
Babel                        2.6.0      2.7.0    wheel          babel
backports.ssl-match-hostname 3.5.0.1    3.7.0.1  sdist          backports_ssl_match_hostname
bleach                       3.0.2      3.1.0    wheel
certifi                      2018.11.29 2019.3.9 wheel
configparser                 3.5.0      3.7.4    wheel
cvxopt                       1.1.8      1.2.3    wheel
cypari2                      2.1.0      2.1.1    sdist
Cython                       0.29.5     0.29.8   wheel          cython
decorator                    4.3.0      4.4.0    wheel
defusedxml                   0.5.0      0.6.0    wheel
entrypoints                  0.2.3      0.3      wheel
Flask                        0.10.1     1.0.3    wheel          flask
Flask-AutoIndex              0.6        0.6.2    sdist          flask_autoindex
Flask-Babel                  0.9        0.12.2   sdist          flask_babel
ipykernel                    4.8.2      4.10.0   wheel  5+
Jinja2                       2.10       2.10.1   wheel          jinja2
jsonschema                   2.6.0      3.0.1    wheel
kiwisolver                   1.0.1      1.1.0    wheel
MarkupSafe                   1.1.0      1.1.1    wheel          markupsafe
nbconvert                    5.4.0      5.5.0    wheel
networkx                     2.2        2.3      sdist
notebook                     5.7.6      5.7.8    wheel
numpy                        1.16.1     1.16.3   wheel
packaging                    18.0       19.0     wheel
path.py                      7.1        11.5.2   wheel  12+     pathpy
pexpect                      4.6.0      4.7.0    wheel
Pillow                       5.3.0      6.0.0    wheel          pillow
pip                          18.1       19.1.1   wheel
pkgconfig                    1.4.0      1.5.1    wheel
prometheus-client            0.5.0      0.6.0    sdist          prometheus_client
prompt-toolkit               1.0.15     2.0.9    wheel          prompt_toolkit
psutil                       5.2.0      5.6.2    sdist
ptyprocess                   0.5.1      0.6.0    wheel
Pygments                     2.3.1      2.4.2    wheel          pygments
pyparsing                    2.3.0      2.4.0    wheel
python-dateutil              2.5.3      2.8.0    wheel          dateutil
pytz                         2018.7     2019.1   wheel
pyzmq                        17.1.2     18.0.1   wheel
requests                     2.13.0     2.22.0   wheel
rpy2                         2.8.2      2.8.6    sdist  2.9+
scandir                      1.9.0      1.10.0   sdist
scipy                        1.2.0      1.2.1    wheel  1.3+
setuptools                   40.6.3     41.0.1   wheel
setuptools-scm               3.1.0      3.3.3    wheel          setuptools_scm
sphinxcontrib-websupport     1.1.0      1.1.2    wheel          sphinxcontrib_websupport
terminado                    0.8.1      0.8.2    wheel
tornado                      4.5.2      5.1.1    sdist  6+
Twisted                      16.3.0     19.2.0   sdist          twisted
Werkzeug                     0.14.1     0.15.4   wheel          werkzeug

Cannot upgrade this until we drop Python 2:

ipython                      5.8.0      5.8.0    wheel  6+
matplotlib                   2.2.3      2.2.3    wheel  3+
Sphinx                       1.8.5      1.8.5    wheel  2+     sphinx

Additional possible PyPI upgrades:

readline 6.3.008.p0 --> gnureadline 6.3.8
pyx 0.12.1.p0 --> 0.14.1
scons 1.2.0 --> 3.0.5
comment:4

It looks to me as though matplotlib 2.2.4 would be okay for Python 2, but nothing beyond that.

comment:5

Replying to @jhpalmieri:

It looks to me as though matplotlib 2.2.4 would be okay for Python 2, but nothing beyond that.

Using it in sage-on-gentoo.

comment:6

as in #26969, we may need to exclude "ptyprocess" and "tornado"

Volker, do you have an easy way to do this kind of batch upgrade, as you did it before ?

New commits:

1f1ec27some packages upgrade

Commit: 1f1ec27

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7d825c3some packages upgrade

Changed commit from 1f1ec27 to 7d825c3

comment:9

ok, maybe this is a good first step. Includes an update of cython.

Author: Frédéric Chapoton

comment:10

cypari does not build. Should I add back the cython trashcan patch ?

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e226ab8some packages upgrade, including cython

Changed commit from 7d825c3 to e226ab8

comment:12

ok, I have added back the cython patch. Back to needs review.

slel commented
comment:13

Updating the ticket description to reflect the actual changes.

slel commented

Description changed:

--- 
+++ 
@@ -1,58 +1,15 @@
-similar to #26969
-
-What could be updated:
+This ticket (similar to #26969) upgrades the following packages:
 
 ```
-Babel                        2.6.0      2.7.0    wheel
-backports.ssl-match-hostname 3.5.0.1    3.7.0.1  sdist
-bleach                       3.0.2      3.1.0    wheel
-certifi                      2018.11.29 2019.3.9 wheel
-configparser                 3.5.0      3.7.4    wheel
-cvxopt                       1.1.8      1.2.3    wheel
-cypari2                      2.1.0      2.1.1    sdist
-Cython                       0.29.5     0.29.8   wheel
-decorator                    4.3.0      4.4.0    wheel
-defusedxml                   0.5.0      0.6.0    wheel
-entrypoints                  0.2.3      0.3      wheel
-Flask                        0.10.1     1.0.3    wheel
-Flask-AutoIndex              0.6        0.6.2    sdist
-Flask-Babel                  0.9        0.12.2   sdist
-ipykernel                    4.8.2      5.1.1    wheel
-ipython                      5.8.0      7.5.0    wheel
-Jinja2                       2.10       2.10.1   wheel
-jsonschema                   2.6.0      3.0.1    wheel
-kiwisolver                   1.0.1      1.1.0    wheel
-MarkupSafe                   1.1.0      1.1.1    wheel
-matplotlib                   2.2.3      3.1.0    wheel
-nbconvert                    5.4.0      5.5.0    wheel
-networkx                     2.2        2.3      sdist
-notebook                     5.7.6      5.7.8    wheel
-numpy                        1.16.1     1.16.3   wheel
-packaging                    18.0       19.0     wheel
-path.py                      7.1        12.0.1   wheel
-pexpect                      4.6.0      4.7.0    wheel
-Pillow                       5.3.0      6.0.0    wheel
-pip                          18.1       19.1.1   wheel
-pkgconfig                    1.4.0      1.5.1    wheel
-prometheus-client            0.5.0      0.6.0    sdist
-prompt-toolkit               1.0.15     2.0.9    wheel
-psutil                       5.2.0      5.6.2    sdist
-ptyprocess                   0.5.1      0.6.0    wheel
-Pygments                     2.3.1      2.4.2    wheel
-pyparsing                    2.3.0      2.4.0    wheel
-python-dateutil              2.5.3      2.8.0    wheel
-pytz                         2018.7     2019.1   wheel
-pyzmq                        17.1.2     18.0.1   wheel
-requests                     2.13.0     2.22.0   wheel
-rpy2                         2.8.2      3.0.4    sdist
-scandir                      1.9.0      1.10.0   sdist
-scipy                        1.2.0      1.3.0    wheel
-setuptools                   40.6.3     41.0.1   wheel
-setuptools-scm               3.1.0      3.3.3    wheel
-Sphinx                       1.8.5      2.0.1    wheel
-sphinxcontrib-websupport     1.1.0      1.1.2    wheel
-terminado                    0.8.1      0.8.2    wheel
-tornado                      4.5.2      6.0.2    sdist
-Twisted                      16.3.0     19.2.0   sdist
-Werkzeug                     0.14.1     0.15.4   wheel
+package         before      after
+----------------------------------
+bleach          3.0.2       3.1.0
+certifi         2018.11.29  2019.3.9
+configparser    3.5.0       3.7.4
+cypari          2.1.0.p0    2.1.1
+cython          0.29.5.p0   0.29.10
+decorator       4.3.0       4.4.0
+defusedxml      0.5.0       0.6.0
+entrypoints     0.2.3       0.3
 ```
+
slel commented

Changed keywords from none to upgrade

Reviewer: John Palmieri

Description changed:

--- 
+++ 
@@ -12,4 +12,13 @@
 defusedxml      0.5.0       0.6.0
 entrypoints     0.2.3       0.3
 ```
+Tarballs:
 
+- https://files.pythonhosted.org/packages/78/5a/0df03e8735cd9c75167528299c738702437589b9c71a849489d00ffa82e8/bleach-3.1.0.tar.gz
+- https://files.pythonhosted.org/packages/06/b8/d1ea38513c22e8c906275d135818fee16ad8495985956a9b7e2bb21942a1/certifi-2019.3.9.tar.gz
+- https://files.pythonhosted.org/packages/e2/1c/83fd53748d8245cb9a3399f705c251d3fc0ce7df04450aac1cfc49dd6a0f/configparser-3.7.4.tar.gz
+- https://files.pythonhosted.org/packages/0c/d0/8b868cedd991bbb2098bbc10a0788c7d3ea6bc9dee946e1eb8424cd4b9f6/cypari2-2.1.1.tar.gz
+- https://files.pythonhosted.org/packages/e7/2e/aee8dfff93c7f5d20461ddcefd1da3d43bab18e1666a7777f4d9dbe94065/Cython-0.29.10.tar.gz
+- https://files.pythonhosted.org/packages/ba/19/1119fe7b1e49b9c8a9f154c930060f37074ea2e8f9f6558efc2eeaa417a2/decorator-4.4.0.tar.gz
+- https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz
+- https://files.pythonhosted.org/packages/b4/ef/063484f1f9ba3081e920ec9972c96664e2edb9fdc3d8669b0e3b8fc0ad7c/entrypoints-0.3.tar.gz
comment:14

Works for me on OS X, both Python 2 and 3. Others should try on other platforms.

Unfortunately it doesn't fix the Python 3 doctest failure in cpython.

comment:15

Which failure remains in the cpython folder under python3 ? Both of these :

┣ debug.pyx  # 1
┗ dict_del_by_value.pyx  # 2

or just one ? The upgrade is supposed only to fix the second file. For the first one, see #27964

comment:16

I still get both failures. I'll try make distclean and then rebuild to see if that helps.

comment:17

After make distclean, same result: both files have failures.

comment:18

And Jeroen, who knows about cython and prevented me to fix that in a naive way, seems not to be very active here at the moment.

comment:19

I see:

test_del_dictitem_by_exact_value(D, ZZ, 2)

fails, but

test_del_dictitem_by_exact_value(D, ZZ, int(2))

works. What was your naive fix? I would be tempted to use

test_del_dictitem_by_exact_value(D, ZZ, hash(2))

This is more robust, since it works in this kind of case:

sage: D = {1230981308409180310928308123: ZZ}
sage: test_del_dictitem_by_exact_value(D, ZZ, hash(1230981308409180310928308123))

while

sage: D = {1230981308409180310928308123: ZZ}
sage: test_del_dictitem_by_exact_value(D, ZZ, 1230981308409180310928308123)

fails with both Python 2 and 3. The current doctest relies on the fact that the hash of the Sage integer 2 is equal to 2, and this doesn't generalize to integers that are too large.

comment:20

ok, I will do that in another ticket, thanks for the suggestion.

see #27972

comment:21

The test_del_dictitem_by_exact_value failure is fixed upstream at cython/cython@2825103

I suggest to just apply that patch instead of "fixing" the doctest.

comment:22

But this is supposed to be in cython 0.29.3 ??

6 months ago, in #26855 you said : Fixed upstream, but not in a stable release

comment:23

It's not fixed in a Cython bugfix release it seems, but only in the next major release.

comment:24

...or maybe it was meant to be fixed in 0.29.x but forgotten.

Branch pushed to git repo; I updated commit sha1. New commits:

34aba48Add Cython patch to fix Py_hash_t conversion

Changed commit from e226ab8 to 34aba48

comment:26

This change does fix the py3 doctest failures in cpython/dict_del_by_value.pyx. I was hoping it would fix some of the doctests in integer.pyx, but it doesn't seem to have done that.

comment:27

Let's merge this into an early 8.9 beta.

Changed branch from public/27886 to 34aba48