diff --git a/build/pkgs/numpy/checksums.ini b/build/pkgs/numpy/checksums.ini index 70cc0ddaefd..886bc13768b 100644 --- a/build/pkgs/numpy/checksums.ini +++ b/build/pkgs/numpy/checksums.ini @@ -1,5 +1,5 @@ tarball=numpy-VERSION.tar.gz -sha1=6c7f2278b4ddd113b30821e7e4d5f246dc3ee735 -md5=8b2692a511a3795f3af8af2cd7566a15 -cksum=3950457778 +sha1=a3f9d79d7852f5d35ff35693fc31d17ea270d2d0 +md5=69bd28f07afbeed2bb6ecd467afcd469 +cksum=3599108965 upstream_url=https://pypi.io/packages/source/n/numpy/numpy-VERSION.tar.gz diff --git a/build/pkgs/numpy/dependencies b/build/pkgs/numpy/dependencies index 63faafe335a..712b5be5e5e 100644 --- a/build/pkgs/numpy/dependencies +++ b/build/pkgs/numpy/dependencies @@ -1,4 +1,4 @@ - $(BLAS) gfortran | $(PYTHON_TOOLCHAIN) pkgconfig cython $(PYTHON) +$(BLAS) gfortran | $(PYTHON_TOOLCHAIN) pkgconfig cython meson_python $(PYTHON) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/numpy/lapack_conf.py b/build/pkgs/numpy/lapack_conf.py deleted file mode 100644 index eeb9ffaf72c..00000000000 --- a/build/pkgs/numpy/lapack_conf.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 - -import pkgconfig, os - -conf_file=open('site.cfg', 'w') - -pc_blas = pkgconfig.parse('cblas blas') -pc_lapack = pkgconfig.parse('lapack') - -if os.environ['UNAME'] == 'Darwin': - # on macOS, if openblas is available (the default), use it instead of the - # macOS Accelerate framework - if 'openblas' in pc_blas.get('libraries', []): - conf_file.write('[openblas]\n') - conf_file.write('libraries = '+', '.join(pc_blas['libraries'])+'\n') - inc_dir = pc_blas['include_dirs'] - if len(inc_dir) > 0: - conf_file.write('include_dirs = '+ ':'.join(inc_dir)+'\n') - lib_dir = pc_blas['library_dirs'] - if len(lib_dir) > 0: - conf_file.write('library_dirs = '+ ':'.join(lib_dir)+'\n') -else: - conf_file.write('[blas]\n') - inc_dir = pc_blas['include_dirs'] - if len(inc_dir) > 0: - conf_file.write('include_dirs = '+ ':'.join(inc_dir)+'\n') - lib_dir = pc_blas['library_dirs'] - if len(lib_dir) > 0: - conf_file.write('library_dirs = '+ ':'.join(lib_dir)+'\n') - conf_file.write('blas_libs = '+', '.join(pc_blas['libraries'])+'\n') - conf_file.write('[lapack]\n') - lib_dir = pc_lapack['library_dirs'] - if len(lib_dir) > 0: - conf_file.write('library_dirs = '+ ':'.join(lib_dir)+'\n') - conf_file.write('lapack_libs = '+', '.join(pc_lapack['libraries'])+'\n') - -conf_file.close() diff --git a/build/pkgs/numpy/package-version.txt b/build/pkgs/numpy/package-version.txt index ca8ec414e78..5ff8c4f5d2a 100644 --- a/build/pkgs/numpy/package-version.txt +++ b/build/pkgs/numpy/package-version.txt @@ -1 +1 @@ -1.23.5 +1.26.0 diff --git a/build/pkgs/numpy/patches/21891.patch b/build/pkgs/numpy/patches/21891.patch deleted file mode 100644 index 095fa894ebb..00000000000 --- a/build/pkgs/numpy/patches/21891.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c7894260aaf36c447dd091bf622c7c2bcdb15a28 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Thu, 30 Jun 2022 13:18:46 -0700 -Subject: [PATCH] setup.py: Remove check for SETUPTOOLS_USE_DISTUTILS - ---- - setup.py | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/setup.py b/setup.py -index 353b6c09693..2bc70173eca 100755 ---- a/setup.py -+++ b/setup.py -@@ -85,17 +85,6 @@ - # so that it is in sys.modules - import numpy.distutils.command.sdist - import setuptools --if int(setuptools.__version__.split('.')[0]) >= 60: -- # setuptools >= 60 switches to vendored distutils by default; this -- # may break the numpy build, so make sure the stdlib version is used -- try: -- setuptools_use_distutils = os.environ['SETUPTOOLS_USE_DISTUTILS'] -- except KeyError: -- os.environ['SETUPTOOLS_USE_DISTUTILS'] = "stdlib" -- else: -- if setuptools_use_distutils != "stdlib": -- raise RuntimeError("setuptools versions >= '60.0.0' require " -- "SETUPTOOLS_USE_DISTUTILS=stdlib in the environment") - - # Initialize cmdclass from versioneer - from numpy.distutils.core import numpy_cmdclass diff --git a/build/pkgs/numpy/patches/cython3-legacy.patch b/build/pkgs/numpy/patches/cython3-legacy.patch deleted file mode 100644 index dfcb9c4a69c..00000000000 --- a/build/pkgs/numpy/patches/cython3-legacy.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/tools/cythonize.py b/tools/cythonize.py -index 002b2fa..c04422e 100755 ---- a/tools/cythonize.py -+++ b/tools/cythonize.py -@@ -47,6 +47,7 @@ def process_pyx(fromfile, tofile): - flags = ['-3', '--fast-fail'] - if tofile.endswith('.cxx'): - flags.append('--cplus') -+ flags += ['--directive', 'legacy_implicit_noexcept=true'] - - subprocess.check_call( - [sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile]) diff --git a/build/pkgs/numpy/spkg-install.in b/build/pkgs/numpy/spkg-install.in index e28660f393f..baebfd466a7 100644 --- a/build/pkgs/numpy/spkg-install.in +++ b/build/pkgs/numpy/spkg-install.in @@ -3,57 +3,33 @@ cd src set -e -if [ `uname` = "Darwin" ]; then - unset ATLAS - unset BLAS - unset LAPACK - # https://github.com/sagemath/sage/issues/34110#comment:35 - # The fix for "reciprocal" (affected by a clang compiler bug) in - # https://github.com/numpy/numpy/pull/19926 relies on -ftrapping-math - # being used when Apple clang v12+ is used. - # But numpy.distutils.ccompiler only sets this flag when - # $CC contains the string "clang" -- missing the case CC=/usr/bin/gcc. - # So we set it here explicitly if the compiler supports the flag. - export CFLAGS="$(testcflags.sh $CFLAGS -ftrapping-math)" -else - export {ATLAS,PTATLAS,OPENBLAS,MKL,MKLROOT}=None - export LDFLAGS="${LDFLAGS} -shared" -fi +# https://github.com/scipy/scipy/issues/16536 - meson breaks when CXX="g++ -std=gnu++11" +# -- this also affects numpy +export CXX=$(echo "$CXX" | sed 's/-std=[a-z0-9+]*//g') if [ "$UNAME" = "CYGWIN" ]; then # Trac #30643 export CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE" fi -# Trac #32746: pkg-config omits -I and -L flags that refer to directories -# that are already on CPATH, LIBRARY_PATH. -# But our script tries to obtain the list of include_dirs and library_dirs -# from pkg-config! -(unset CPATH LIBRARY_PATH; python3 ../lapack_conf.py) - -# Make sure that the fortran objects are compiled with -fPIC -export FFLAGS="$FFLAGS -fPIC" -export FCFLAGS="$FCFLAGS -fPIC" - if [ "$SAGE_FAT_BINARY" = "yes" ]; then export NUMPY_FCONFIG="--cpu-baseline=NONE" else export NUMPY_FCONFIG="" fi -# Trac #32423: Fix 32-bit builds on x86_64 -ARCH=$($CC -dumpmachine 2>/dev/null || echo unknown) -case "$ARCH" in - *x86_64*) - ;; - *) - export NPY_DISABLE_SVML=1 - ;; -esac - -################################################ - -# Trac #33138: numpy is a PEP 517 package, so the crucial "--build-option"s would be ignored. -eval sdh_pip_install --no-use-pep517 \ - $(eval sdh_prefix_args "--build-option" build ${NUMPY_CONFIG} ${NUMPY_FCONFIG}) \ - . +### Per https://github.com/numpy/numpy/releases/tag/v1.26.0b1 +### "NumPy-specific build customization": +### +### The NPY_* environment variables which control BLAS/LAPACK, SIMD, +### threading, and other such options are no longer supported, nor is +### a site.cfg file to select BLAS and LAPACK. Instead, there are +### command-line flags that can be passed to the build via pip/build's +### config-settings interface. These flags are all listed in +### https://github.com/numpy/numpy/blob/main/meson_options.txt +### +### 1.26.0b1 temporarily vendors Meson and meson-python +### http://scipy.github.io/devdocs/building/index.html + + +sdh_pip_install . diff --git a/build/pkgs/pip/checksums.ini b/build/pkgs/pip/checksums.ini index 1ae66fbc20a..9b6376d1abb 100644 --- a/build/pkgs/pip/checksums.ini +++ b/build/pkgs/pip/checksums.ini @@ -1,5 +1,5 @@ tarball=pip-VERSION.tar.gz -sha1=29167fffe19874a74247fe92f4fdba1bb1221c61 -md5=996f58a94fe0b8b82b6795c42bd171ba -cksum=537001443 +sha1=4bdfd8e976b5122cf55f4f4740f7305f1ffa4310 +md5=e9b1226701a56ee3fcc81aba60d25d75 +cksum=1940746834 upstream_url=https://pypi.io/packages/source/p/pip/pip-VERSION.tar.gz diff --git a/build/pkgs/pip/package-version.txt b/build/pkgs/pip/package-version.txt index 4c3dad97552..3f833b5b536 100644 --- a/build/pkgs/pip/package-version.txt +++ b/build/pkgs/pip/package-version.txt @@ -1 +1 @@ -22.3.1 +23.2.1 diff --git a/build/pkgs/setuptools/SPKG.rst b/build/pkgs/setuptools/SPKG.rst index a50e171a98d..bb69c65b66a 100644 --- a/build/pkgs/setuptools/SPKG.rst +++ b/build/pkgs/setuptools/SPKG.rst @@ -7,13 +7,6 @@ Description setuptools is the classical build system for Python packages, a collection of enhancements to the Python distutils. -This package represents version 63.x of ``setuptools``. -Sage installs this version to provide the build system -for non-PEP 517 packages. In particular, Sage uses it -for building ``numpy``, whose build system ``numpy.distutils`` -is not compatible with newer versions of ``setuptools``, -see https://github.com/numpy/numpy/pull/22154 - License ------- diff --git a/build/pkgs/setuptools/checksums.ini b/build/pkgs/setuptools/checksums.ini index d47099a8019..150e3c25335 100644 --- a/build/pkgs/setuptools/checksums.ini +++ b/build/pkgs/setuptools/checksums.ini @@ -1,5 +1,5 @@ tarball=setuptools-VERSION.tar.gz -sha1=b14b8e2cf965fdb6870ebfccee50c751c056f757 -md5=02a0e4dc4fa13168904e8769a077aa26 -cksum=2734084418 +sha1=b0c9b16863c57d70adc22651906eea7eaee09803 +md5=d967ca2ba7f46db887daee2d5c9bd6a2 +cksum=2346145273 upstream_url=https://pypi.io/packages/source/s/setuptools/setuptools-VERSION.tar.gz diff --git a/build/pkgs/setuptools/install-requires.txt b/build/pkgs/setuptools/install-requires.txt index e0cf7c9b5dc..c12b5900873 100644 --- a/build/pkgs/setuptools/install-requires.txt +++ b/build/pkgs/setuptools/install-requires.txt @@ -1 +1,3 @@ -setuptools >=49.6.0, <64 +# 68.1.0 Promote pyproject.toml's [tool.setuptools] out of beta. +# 68.1.1 Fix editable install finder handling of nested packages +setuptools >= 68.1.1 diff --git a/build/pkgs/setuptools/package-version.txt b/build/pkgs/setuptools/package-version.txt index fe3c6688881..fc312b9c8c1 100644 --- a/build/pkgs/setuptools/package-version.txt +++ b/build/pkgs/setuptools/package-version.txt @@ -1 +1 @@ -63.4.3 +68.2.2 diff --git a/build/pkgs/setuptools_wheel/SPKG.rst b/build/pkgs/setuptools_wheel/SPKG.rst index b77a6679f8f..c78602a296a 100644 --- a/build/pkgs/setuptools_wheel/SPKG.rst +++ b/build/pkgs/setuptools_wheel/SPKG.rst @@ -3,6 +3,3 @@ setuptools_wheel: Build the setuptools package as a wheel After installing setuptools and wheel, we build a wheel of setuptools to complete the set of wheels stored in our wheelhouse. - -This version of setuptools is suitable for PEP 517/518/660 builds, -but it is not suitable for building ``numpy``. diff --git a/build/pkgs/setuptools_wheel/checksums.ini b/build/pkgs/setuptools_wheel/checksums.ini deleted file mode 100644 index 8db0d8c3016..00000000000 --- a/build/pkgs/setuptools_wheel/checksums.ini +++ /dev/null @@ -1,5 +0,0 @@ -tarball=setuptools-VERSION.tar.gz -sha1=2875e8f9a12d8a971461b36e2d1bd64a3497e0f2 -md5=1fd8bd04b0bed95ad6c81f03b1c080bc -cksum=1462078737 -upstream_url=https://pypi.io/packages/source/s/setuptools/setuptools-VERSION.tar.gz diff --git a/build/pkgs/setuptools_wheel/checksums.ini b/build/pkgs/setuptools_wheel/checksums.ini new file mode 120000 index 00000000000..4f64d3ce107 --- /dev/null +++ b/build/pkgs/setuptools_wheel/checksums.ini @@ -0,0 +1 @@ +../setuptools/checksums.ini \ No newline at end of file diff --git a/build/pkgs/setuptools_wheel/install-requires.txt b/build/pkgs/setuptools_wheel/install-requires.txt deleted file mode 100644 index d3767a68c8f..00000000000 --- a/build/pkgs/setuptools_wheel/install-requires.txt +++ /dev/null @@ -1 +0,0 @@ -setuptools >= 65.6 diff --git a/build/pkgs/setuptools_wheel/install-requires.txt b/build/pkgs/setuptools_wheel/install-requires.txt new file mode 120000 index 00000000000..c5cfb4ff0a9 --- /dev/null +++ b/build/pkgs/setuptools_wheel/install-requires.txt @@ -0,0 +1 @@ +../setuptools/install-requires.txt \ No newline at end of file diff --git a/build/pkgs/setuptools_wheel/package-version.txt b/build/pkgs/setuptools_wheel/package-version.txt deleted file mode 100644 index c1a8c8394ad..00000000000 --- a/build/pkgs/setuptools_wheel/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -65.6.3 diff --git a/build/pkgs/setuptools_wheel/package-version.txt b/build/pkgs/setuptools_wheel/package-version.txt new file mode 120000 index 00000000000..5268dbec8f6 --- /dev/null +++ b/build/pkgs/setuptools_wheel/package-version.txt @@ -0,0 +1 @@ +../setuptools/package-version.txt \ No newline at end of file diff --git a/src/sage/repl/ipython_kernel/kernel.py b/src/sage/repl/ipython_kernel/kernel.py index 73681716aa2..db7554eed59 100644 --- a/src/sage/repl/ipython_kernel/kernel.py +++ b/src/sage/repl/ipython_kernel/kernel.py @@ -16,7 +16,18 @@ # *************************************************************************** import sys -from ipykernel.ipkernel import IPythonKernel +import warnings +with warnings.catch_warnings(): + # When upstream pydevd (as opposed to the bundled version) is used + # with debugpy, a PEP 420 warning is emitted. Debugpy and/or + # pydevd will eventually work around this, but as of September + # 2023, hiding the warning gives us more flexibility in the + # versions of those packages that we can accept. + warnings.filterwarnings("ignore", + message=r".*pkg_resources\.declare_namespace", + category=DeprecationWarning) + from ipykernel.ipkernel import IPythonKernel + from ipykernel.zmqshell import ZMQInteractiveShell from traitlets import Type