Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge tag '9.5.rc3' into public/scalar_elliptic_curve_endomorphisms
Browse files Browse the repository at this point in the history
SageMath version 9.5.rc3, Release Date: 2022-01-18
  • Loading branch information
yyyyx4 committed Jan 21, 2022
2 parents c00beb1 + 8ea92d5 commit 131930f
Show file tree
Hide file tree
Showing 26 changed files with 134 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .homebrew-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export PKG_CONFIG_PATH
LIBRARY_PATH="$HOMEBREW/lib$LIBRARY_PATH"
[ -z "$CPATH" ] || CPATH=":${CPATH}"
CPATH="$HOMEBREW/include$CPATH"
for l in readline bzip2 ntl polymake; do
for l in readline bzip2 ntl polymake libpng bdw-gc primesieve; do
if [ -d "$HOMEBREW/opt/$l/lib" ]; then
LIBRARY_PATH="$HOMEBREW/opt/$l/lib:$LIBRARY_PATH"
fi
Expand Down
10 changes: 5 additions & 5 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.5.rc0",
"version": "9.5.rc0",
"title": "sagemath/sage: 9.5.rc3",
"version": "9.5.rc3",
"upload_type": "software",
"publication_date": "2022-01-09",
"publication_date": "2022-01-18",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,13 +15,13 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.5.rc0",
"identifier": "https://github.com/sagemath/sage/tree/9.5.rc3",
"relation": "isSupplementTo"
},
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
"relation": "isNewVersionOf"
}
]
}
2 changes: 1 addition & 1 deletion .zenodo.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{
"scheme": "doi",
"identifier": "10.5281/zenodo.593563",
"relation": "isVersionOf"
"relation": "isNewVersionOf"
}
]
}
11 changes: 11 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 9.5
doi: 10.5281/zenodo.593563
date-released: 2022-01-18
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.5.rc0, Release Date: 2022-01-09
SageMath version 9.5.rc3, Release Date: 2022-01-18
9 changes: 6 additions & 3 deletions build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ fi
# is accessible by this python; this is to guard on Cygwin against Pythons
# installed somewhere else in Windows.

# Trac #29285: Do not accept pythons that manipulate PATH, such as
# the shims provided by pyenv.

# Trac #30008: Make it work even if the environment tries to sabotage UTF-8
# operation in Python 3.0.x-3.6.x by setting LC_ALL=C or similar.

Expand All @@ -47,7 +50,7 @@ PYTHONS="python python3 python3.10 python3.9 python3.8 python3.7 python2.7 pytho
for PY in $PYTHONS; do
PYTHON="$(PATH="$SAGE_ORIG_PATH" command -v $PY)"
if [ -n "$PYTHON" ]; then
if "$PYTHON" -c "import argparse; import urllib; from hashlib import sha1; from ssl import HAS_SNI; assert HAS_SNI; from os import listdir; listdir(\"$(pwd)\");" 2>/dev/null; then
if CHECK_PATH="$PATH" "$PYTHON" -c "import argparse; import urllib; from hashlib import sha1; from ssl import HAS_SNI; assert HAS_SNI; from os import listdir, environ; listdir(\"$(pwd)\"); assert environ[\"PATH\"] == environ[\"CHECK_PATH\"];" 2>/dev/null; then
exec "$PYTHON" "$@"
fi
fi
Expand All @@ -56,10 +59,10 @@ done
for PY in $PYTHONS; do
PYTHON="$(PATH="$SAGE_ORIG_PATH" command -v $PY)"
if [ -n "$PYTHON" ]; then
if "$PYTHON" -c "import argparse; import urllib; from hashlib import sha1; from os import listdir; listdir(\"$(pwd)\");" 2>/dev/null; then
if CHECK_PATH="$PATH" "$PYTHON" -c "import argparse; import urllib; from hashlib import sha1; from os import listdir, environ; listdir(\"$(pwd)\"); assert environ[\"PATH\"] == environ[\"CHECK_PATH\"];" 2>/dev/null; then
exec "$PYTHON" "$@"
fi
fi
done
echo >&2 "$0: error: none of $PYTHONS is a suitable Python with urllib"
echo >&2 "$0: error: none of $PYTHONS is a suitable Python"
exit 1
5 changes: 5 additions & 0 deletions build/bin/sage-pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ PIP=pip3
# running pip. This is implemented in the Python script sage-flock
LOCK="$SAGE_LOCAL/var/lock/$PIP.lock"

# Trac #33155: Pythons installed using the python.org macOS installers
# for Python < 3.10 identify macOS Big Sur and newer as "10.16", causing
# pip to refuse to install wheels tagged macosx_11_0_x86_64
export SYSTEM_VERSION_COMPAT=0

# Finally actually do the installation (the "SHARED" tells pip2/3-lock
# to apply a shared lock)
sage-flock -s $LOCK $PYTHON -m pip install $pip_install_flags "$@"
Expand Down
9 changes: 8 additions & 1 deletion build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ else
AM_V_at =
endif

# Trac #33125: Handle make options -n, -t, -q
ifeq ($(foreach flag, n t q, $(findstring $(flag),$(filter-out --%,$(MAKEFLAGS)))),)
PLUS = +
else
PLUS =
endif

# List of targets that can be run using `sage -i` or `sage -f`
# These should generally have an associated -clean target for `sage -f` to
# work correctly
Expand Down Expand Up @@ -603,7 +610,7 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3)
$(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)

$(1)-$(4)-no-deps:
+@if [ -z '$$($(4))' ]; then \
$(PLUS)@if [ -z '$$($(4))' ]; then \
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
echo "$$($(4)_DISABLED_MESSAGE)" 2>&1; \
exit 1; \
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=90c6a61858cddd0d4e3b65b05d899c742356a82e
md5=eddfeb607a50616c02ca39dbfaae91a5
cksum=3731009361
sha1=82db5472ac5d29950254ec45b1f448dbc4f8e9f0
md5=92c171e5c495c2c2f601d49f89cdaa36
cksum=3258581436
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
464e8c3d08cd20837a05fc6afa7386f89a309133
ad7e1731c0dd97d79084a0c3baa0022ba4cfff69
4 changes: 4 additions & 0 deletions build/pkgs/cryptominisat/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ cd src
sdh_cmake -DUSE_GAUSS='ON' $EXTRA_OPTS
sdh_make VERBOSE=ON
sdh_make_install VERBOSE=ON

cd pycryptosat

sdh_pip_install .
7 changes: 4 additions & 3 deletions build/pkgs/iml/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=iml-VERSION.tar.bz2
sha1=72355b1f4c4df8cd3ecf5fcbcbd72c9ad9afdba7
md5=362f1a6a1d2df0c5f0ab41e5d2c87ac7
cksum=507867168
sha1=8aba468a62e6fb0584be9b014350b734663c0670
md5=a8083e70c0c4378f69eb772c1eeed6f0
cksum=2793221462
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/33195/iml-1.0.4p2.tar.bz2
2 changes: 1 addition & 1 deletion build/pkgs/iml/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4p1.p2
1.0.4p2.p2
4 changes: 3 additions & 1 deletion build/pkgs/iml/spkg-src
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

VERSION="1.0.4"
PATCHLEVEL="p1"
PATCHLEVEL="p2"

if [ $# -ne 0 ]; then
UPSTREAM_SOURCE_DIRECTORY=$1
Expand All @@ -22,4 +22,6 @@ else
fi

mv "iml-$VERSION" "iml-$VERSION$PATCHLEVEL"
# Regenerate build scripts
(cd "iml-$VERSION$PATCHLEVEL" && autoreconf -fi)
tar cjf "iml-$VERSION$PATCHLEVEL.tar.bz2" "iml-$VERSION$PATCHLEVEL"
4 changes: 3 additions & 1 deletion build/pkgs/numpy/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- shell-script -*-
cd src

set -e
Expand Down Expand Up @@ -39,6 +40,7 @@ fi

################################################

eval sdh_pip_install \
# 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}) \
.
2 changes: 1 addition & 1 deletion build/pkgs/ore_algebra/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/mkauers/ore_algebra@6826ac49b4cdf66a563449aced21a2fd1fd085c9#egg=ore_algebra
git+https://github.com/mkauers/ore_algebra@cfcb386f2cc1d3e044c71dfb149444355b16d775#egg=ore_algebra
7 changes: 0 additions & 7 deletions build/pkgs/pyzmq/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
cd src

# Generate setup.cfg
cat > setup.cfg <<EOF
[global]
no_libzmq_extension = True
EOF

# Configure and install
sdh_pip_install .
7 changes: 5 additions & 2 deletions build/pkgs/qhull/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ SAGE_SPKG_CONFIGURE([qhull], [
], [
AC_MSG_RESULT([no. Install qhull])
sage_spkg_install_qhull=yes
]) dnl CHECK_HEADER
]) dnl COMPARE_VERSION
]), dnl CHECK_HEADER
], [
AC_MSG_RESULT([no. Install qhull])
sage_spkg_install_qhull=yes
]) dnl AX_COMPARE_VERSION
]) dnl IF
m4_popdef([SAGE_QHULL_MINVER])
])
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.5.rc0
9.5.rc3
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.5.rc0
9.5.rc3
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sage version information for shell scripts
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='9.5.rc0'
SAGE_RELEASE_DATE='2022-01-09'
SAGE_VERSION_BANNER='SageMath version 9.5.rc0, Release Date: 2022-01-09'
SAGE_VERSION='9.5.rc3'
SAGE_RELEASE_DATE='2022-01-18'
SAGE_VERSION_BANNER='SageMath version 9.5.rc3, Release Date: 2022-01-18'
41 changes: 25 additions & 16 deletions src/doc/en/installation/launching.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,20 @@ convenience, it is possible to link your installation of SageMath into
your Jupyter installation, adding it to the list of available kernels
that can be selected in the notebook or JupyterLab interface.

If ``$SAGE_LOCAL`` is the installation prefix of your Sage
installation (the default is ``$SAGE_ROOT/local``) and you can start
the Jupyter notebook by typing ``jupyter notebook``, then the
following command will install SageMath as a new kernel.
Assuming that SageMath can be invoked by typing ``sage``, you can use

.. CODE-BLOCK:: bash
jupyter kernelspec install --user $SAGE_LOCAL/share/jupyter/kernels/sagemath
sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/sagemath'
to find the location of the SageMath kernel description.

Assuming that the Jupyter notebook can be started by typing ``jupyter notebook``,
the following command will install SageMath as a new kernel.

.. CODE-BLOCK:: bash
jupyter kernelspec install --user $(sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/sagemath')
This installs the kernel under the name ``sagemath``. If you wish to
rename it to something more specific in order to distinguish between
Expand All @@ -141,32 +147,35 @@ different installations of SageMath, you can use the additional option

.. CODE-BLOCK:: bash
jupyter kernelspec install --user $SAGE_LOCAL/share/jupyter/kernels/sagemath --name sagemath-dev-worktree
jupyter kernelspec install --user $(sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/sagemath') --name sagemath-dev-worktree
The ``jupyter kernelspec`` approach by default does lead to about 2Gb of
sagemath documentation being copied into your personal jupyter configuration
SageMath documentation being copied into your personal jupyter configuration
directory. You can avoid that by instead putting a symlink in the relevant spot.
Assuming that sagemath is properly installed, you can use
and

.. CODE-BLOCK:: bash
sage -sh -c 'ls -d $SAGE_LOCAL/share/jupyter/kernels/sagemath'
jupyter --paths
to find location of the sagemath kernel description and
to find valid data directories for your Jupyter installation.
A command along the lines of

.. CODE-BLOCK:: bash
jupyter --paths
ln -s $(sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/sagemath') $HOME/.local/share/jupyter
to find valid data directories for your jupyter installation.
A command along the lines of
can then be used to create a symlink to the SageMath kernel description
in a location where your own ``jupyter`` can find it.

If you have installed SageMath from source, the alternative command

.. CODE-BLOCK:: bash
ln -s `sage -sh -c 'ls -d $SAGE_LOCAL/share/jupyter/kernels/sagemath'` $HOME/.local/share/jupyter
ln -s $(sage -sh -c 'ls -d $SAGE_ROOT/venv/share/jupyter/kernels/sagemath') $HOME/.local/share/jupyter
can then be used to create a symlink to the sagemath kernel description
in a location where your own ``jupyter`` can find it.
creates a symlink that will stay current even if you switch to a different Python version
later.

To get the full functionality of the SageMath kernel in your global
Jupyter installation, the following Notebook Extension packages also
Expand Down
4 changes: 4 additions & 0 deletions src/sage/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='pythran')

warnings.filterwarnings('ignore', category=DeprecationWarning,
message='The distutils(.sysconfig module| package) is deprecated',
module='Cython|distutils|numpy|sage.env|sage.features')

################ end setup warnings ###############################


Expand Down
10 changes: 9 additions & 1 deletion src/sage/libs/linbox/fflas.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# distutils: extra_compile_args = FFLASFFPACK_CFLAGS
# Trac #33153: fflas-ffpack-2.4.3 is missing a return value in one of
# its functions and runs afoul of -Werror=return-type. Compounding the
# problem on openSUSE tumbleweed, the CFLAGS in python's sysconfig
# contain -Werror=return-type and wind up being used to compile this
# extension. To avoid a compilation failure on that platform, we
# temporarily append "-Wno-error=return-type" to those flags.
#
# distutils: extra_compile_args = FFLASFFPACK_CFLAGS -Wno-error=return-type
#
# distutils: include_dirs = FFLASFFPACK_INCDIR
# distutils: libraries = FFLASFFPACK_LIBRARIES
# distutils: library_dirs = FFLASFFPACK_LIBDIR
Expand Down
28 changes: 25 additions & 3 deletions src/sage/rings/integer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -7240,10 +7240,30 @@ cdef int sizeof_Integer

# We use a global Integer element to steal all the references
# from. DO NOT INITIALIZE IT AGAIN and DO NOT REFERENCE IT!
#
# Use actual calculation to avoid libgmp's new lazy allocation :trac:`31340`
cdef Integer global_dummy_Integer
global_dummy_Integer = Integer(1) - Integer(1)
global_dummy_Integer = Integer()
# Reallocate to one limb to fix :trac:`31340` and :trac:`33081`
_mpz_realloc(global_dummy_Integer.value, 1)

def _check_global_dummy_Integer():
"""
Return true if the global dummy Integer is ok.
TEST::
sage: from sage.rings.integer import _check_global_dummy_Integer
sage: _check_global_dummy_Integer()
True
"""
# Check that it has exactly one limb allocated
# This is assumed later in fast_tp_new() :trac:`33081`
cdef mpz_ptr dummy = global_dummy_Integer.value
if dummy._mp_alloc == 1 and dummy._mp_size == 0:
return True

raise AssertionError(
"global dummy Integer is corrupt (_mp_alloc = %d, _mp_size = %d)"
% (dummy._mp_alloc, dummy._mp_size))


# A global pool for performance when integers are rapidly created and destroyed.
Expand Down Expand Up @@ -7318,6 +7338,8 @@ cdef PyObject* fast_tp_new(type t, args, kwds) except NULL:
# various internals described here may change in future GMP releases.
# Applications expecting to be compatible with future releases should use
# only the documented interfaces described in previous chapters."
#
# NOTE: This assumes global_dummy_Integer.value._mp_alloc == 1
new_mpz = <mpz_ptr>((<Integer>new).value)
new_mpz._mp_d = <mp_ptr>check_malloc(GMP_LIMB_BITS >> 3)

Expand Down
6 changes: 3 additions & 3 deletions src/sage/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sage version information for Python scripts
# This file is auto-generated by the sage-update-version script, do not edit!
version = '9.5.rc0'
date = '2022-01-09'
banner = 'SageMath version 9.5.rc0, Release Date: 2022-01-09'
version = '9.5.rc3'
date = '2022-01-18'
banner = 'SageMath version 9.5.rc3, Release Date: 2022-01-18'

0 comments on commit 131930f

Please sign in to comment.