Update numpy to 1.22.x, scipy 1.8.x, networkx 2.8.x
Closed this issue · 81 comments
These updates:
numpy1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html, https://github.com/numpy/numpy/releasesscipy1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.networkx2.8.0 https://github.com/networkx/networkx/blob/main/doc/release/release_2.7.rst requires us to drop python 3.7 support too
SciPy also has stricter compiler requirements: C++14 support. According to https://scipy.github.io/devdocs/dev/toolchain.html, GCC >= 6.3.
Related:
- #32105 Update numpy 1.21.x, scipy 1.7.x;
- #30384 NEP 29
- #29756 Meta-ticket: Review of Python 3 features that sagelib should use systematically
Next updates:
Depends on #32937
Depends on #33316
Depends on #33782
Depends on #34017
CC: @dimpase @kiwifb @sagetrac-tmonteil
Component: packages: standard
Author: Matthias Koeppe
Branch/Commit: 2534f5a
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/32423
Description changed:
---
+++
@@ -1,9 +1,10 @@
These updates:
- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html
-- `scipy` 1.8.0
+- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
Related:
+- #32105 Update numpy 1.21.x, scipy 1.7.x;
- #30384 NEP 29
- #29756 Meta-ticket: Review of Python 3 features that sagelib should use systematically
Description changed:
---
+++
@@ -2,6 +2,8 @@
- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html
- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
+
+SciPy also has stricter compiler requirements: C++14 support. According to https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html#c-and-c-language-standards, GCC >= 5.x and according to https://github.com/scipy/scipy/releases, GCC >= 6.3.
Related:
- #32105 Update numpy 1.21.x, scipy 1.7.x;Description changed:
---
+++
@@ -1,5 +1,5 @@
These updates:
-- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html
+- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html, https://github.com/numpy/numpy/releases
- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
Author: Antonio Rojas
Commit: cab17dc
Is the fix for the deprecation warning also OK for early scipy?
Then it's better to put it on a separate ticket that can be merged earlier.
(I think I would want to hold off on the scipy 1.8 upgrade for a little while - maybe it should go into Sage 9.7, not 9.6)
Description changed:
---
+++
@@ -3,7 +3,7 @@
- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
-SciPy also has stricter compiler requirements: C++14 support. According to https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html#c-and-c-language-standards, GCC >= 5.x and according to https://github.com/scipy/scipy/releases, GCC >= 6.3.
+SciPy also has stricter compiler requirements: C++14 support. According to https://scipy.github.io/devdocs/dev/toolchain.html, GCC >= 6.3.
Related:
- #32105 Update numpy 1.21.x, scipy 1.7.x;Branch pushed to git repo; I updated commit sha1. New commits:
02d017f | Move deprecation warning fix to another ticket |
Description changed:
---
+++
@@ -2,6 +2,7 @@
- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html, https://github.com/numpy/numpy/releases
- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
+- `networkx` 1.7.0 https://github.com/networkx/networkx/blob/main/doc/release/release_2.7.rst requires us to drop python 3.7 support too
SciPy also has stricter compiler requirements: C++14 support. According to https://scipy.github.io/devdocs/dev/toolchain.html, GCC >= 6.3.
Opened #33495 to fix test regressions with networkx 2.7
Description changed:
---
+++
@@ -2,7 +2,7 @@
- `numpy` 1.22.0 https://numpy.org/devdocs/release/1.22.0-notes.html, https://github.com/numpy/numpy/releases
- `scipy` 1.8.0 https://scipy.github.io/devdocs/release.1.8.0.html
will require us to drop python 3.7 support.
-- `networkx` 1.7.0 https://github.com/networkx/networkx/blob/main/doc/release/release_2.7.rst requires us to drop python 3.7 support too
+- `networkx` 2.8.0 https://github.com/networkx/networkx/blob/main/doc/release/release_2.7.rst requires us to drop python 3.7 support too
SciPy also has stricter compiler requirements: C++14 support. According to https://scipy.github.io/devdocs/dev/toolchain.html, GCC >= 6.3.
Last 10 new commits:
9419f7b | Merge #33088 |
b21789b | Drop Python 3.7 support |
25f04c3 | Merge #32937 |
1124ded | build/pkgs/gcc/spkg-configure.m4: Bump minimum version to 6.3 |
4e8b2c2 | README.md, src/doc/en/installation/source.rst: Update info on GCC versions |
9b388ea | .github/workflows/tox*.yml: Update platforms for drop of GCC < 6.3 |
b93f750 | Merge #33316 |
ab734aa | build/pkgs/numpy: Update to 1.22.3 |
570aac9 | build/pkgs/pybind11: Update to 1.8.0 |
1a46a28 | build/pkgs/networkx: Update to 2.8 |
Changed author from Antonio Rojas to Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. New commits:
e68a28f | build/pkgs/gcc/spkg-configure.m4: Fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
cb7518f | Merge tag '9.6.rc3' into t/32937/drop_python_3_7_support |
e7ff2a8 | build/pkgs/gcc/spkg-configure.m4: Fixup |
0713f53 | .github/workflows/tox*.yml: Replace ubuntu-xenial by ubuntu-xenial-toolchain-gcc_9 |
d650177 | Merge tag '9.6.rc2' into t/33316/drop_support_for_gcc___6_3_in_sage_9_7 |
a0e037f | build/bin/write-dockerfile.sh [debian]: Handle EXTRA_PATH, EXTRA_SYSTEM_PACKAGES |
dae2d08 | tox.ini (ubuntu-trusty-toolchain): Use binutils-2.26 |
33ca131 | tox.ini, .github/workflows/tox*.yml: Add ubuntu-kinetic, linuxmint-21, fedora-37 |
ec32489 | Merge #33316 |
65cfa33 | Python 3.7->3.8. in few places; bump Sage version to 9.7 in tutorial |
7619755 | Merge #32937 |
Branch pushed to git repo; I updated commit sha1. New commits:
253a8f2 | Merge tag '9.6.rc4' into t/32423/update_numpy_to_1_22_x__scipy_1_8_x___requires_dropping_python_3_7 |
scipy fails on cygwin-standard -
https://github.com/sagemath/sagetrac-mirror/runs/6436093618?check_suite_focus=true
scipy/stats/_hypotests_pythran.cpp: At global scope:
scipy/stats/_hypotests_pythran.cpp:256:10: error: expected identifier before numeric constant
256 | struct _P
| ^~
scipy/stats/_hypotests_pythran.cpp:256:10: error: expected unqualified-id before numeric constant
scipy/stats/_hypotests_pythran.cpp:584:12: error: expected nested-name-specifier before numeric constant
584 | typename _P::type<argument_type0>::result_type _P::operator()(argument_type0&& A) const
| ^~
scipy/stats/_hypotests_pythran.cpp:584:12: error: expected unqualified-id before numeric constant
scipy/stats/_hypotests_pythran.cpp:790:40: error: expected identifier before numeric constant
790 | typename __pythran__hypotests_pythran::_P::type<pythonic::types::ndarray<long,pythonic::types::pshape<long,long>>>::result_type _P0(pythonic::types::ndarray<long,pythonic::types::pshape<long,long>>&& A)
| ^~
scipy/stats/_hypotests_pythran.cpp:790:40: error: expected unqualified-id before numeric constant
scipy/stats/_hypotests_pythran.cpp:806:40: error: expected identifier before numeric constant
806 | typename
Fixed upstream in scipy/scipy#15580
There's no backport to the 1.8.x branch yet
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
2a7d18d | build/pkgs/scipy: Update to 1.8.1 |
Branch pushed to git repo; I updated commit sha1. New commits:
d4ac6a2 | build/pkgs/gast: Update to 0.5.3 |
Branch pushed to git repo; I updated commit sha1. New commits:
97557e1 | Merge tag '9.7.beta3' into t/32423/update_numpy_to_1_22_x__scipy_1_8_x___requires_dropping_python_3_7 |
Description changed:
---
+++
@@ -11,5 +11,8 @@
- #30384 NEP 29
- #29756 Meta-ticket: Review of Python 3 features that sagelib should use systematically
+Next update:
+- #34081 numpy 1.23.x, scipy 1.9.x
+This appears to break 32bit platforms - for example ubuntu-bionic-i386 (https://github.com/mkoeppe/sage/runs/7056480485?check_suite_focus=true) - numpy's build system appears to think it's building for x86_64
Same problem with numpy 1.23.0
This looks similar to numpy/numpy#14233 - recommendation there is to upgrade binutils 2.25 or higher
However, ubuntu-bionic-i386 uses binutils 2.30
Actually it's numpy/numpy#20736
The workaround export NPY_DISABLE_SVML=1 works
Fails on local-macos (2, homebrew-macos-usrlocal-standard, default, macos-latest) https://github.com/mkoeppe/sage/runs/7121386623
(tested with #33530, thus with the setuptools upgrade!)
from the log:
Processing /Users/runner/work/sage/sage/.tox/local-homebrew-macos-usrlocal-standard/local/var/tmp/sage/build/numpy-1.22.4/src
Preparing metadata (setup.py): started
Running command python setup.py egg_info
Running from numpy source directory.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/Users/runner/work/sage/sage/.tox/local-homebrew-macos-usrlocal-standard/local/var/tmp/sage/build/numpy-1.22.4/src/setup.py", line 92, in <module>
raise RuntimeError("setuptools versions >= '60.0.0' require "
RuntimeError: setuptools versions >= '60.0.0' require SETUPTOOLS_USE_DISTUTILS=stdlib in the environment
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
That's from https://github.com/numpy/numpy/blob/main/setup.py#L86
We are setting SETUPTOOLS_USE_DISTUTILS=local on homebrew to avoid homebrew's distutils.cfg, which is still present (and broken) in pre-3.10 versions:
$ find /usr/local/opt/python@3.7/ -name distutils.cfg
/usr/local/opt/python@3.7//Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/distutils.cfg
$ find /usr/local/opt/python@3.8/ -name distutils.cfg
/usr/local/opt/python@3.8//Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/distutils.cfg
$ find /usr/local/opt/python@3.9/ -name distutils.cfg
/usr/local/opt/python@3.9//Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/distutils.cfg
$ find /usr/local/opt/python@3.10/ -name distutils.cfg
$ cat /usr/local/opt/python@3.9//Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/distutils.cfg
[install]
prefix=/usr/local
[build_ext]
include_dirs=/usr/local/include:/usr/local/opt/openssl@1.1/include:/usr/local/opt/sqlite/include
library_dirs=/usr/local/lib:/usr/local/opt/openssl@1.1/lib:/usr/local/opt/sqlite/lib
This code is from numpy/numpy#20963. I'll just patch it out.
That's now numpy/numpy#21891
Branch pushed to git repo; I updated commit sha1. New commits:
2534f5a | build/pkgs/numpy/patches/21891.patch: New |
Replying to @mkoeppe:
The workaround
export NPY_DISABLE_SVML=1works
Upstream PR to make this workaround unnecessary (for i386 on x86_64): numpy/numpy#21896
Let's get this upgrade in please
Description changed:
---
+++
@@ -11,8 +11,9 @@
- #30384 NEP 29
- #29756 Meta-ticket: Review of Python 3 features that sagelib should use systematically
-Next update:
-- #34081 numpy 1.23.x, scipy 1.9.x
+Next updates:
+- #34110 numpy 1.23.x
+- #34081 scipy 1.9.x
lgtm
Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/2593290132 to Dima Pasechnik
Thanks!
Changed branch from u/mkoeppe/update_numpy_to_1_22_x__scipy_1_8_x___requires_dropping_python_3_7 to 2534f5a