[arch-commits] Commit in sagemath/repos/community-x86_64 (32 files)
Antonio Rojas
arojas at archlinux.org
Wed Nov 7 21:39:55 UTC 2018
Date: Wednesday, November 7, 2018 @ 21:39:55
Author: arojas
Revision: 403207
archrelease: copy trunk to community-x86_64
Added:
sagemath/repos/community-x86_64/PKGBUILD
(from rev 403206, sagemath/trunk/PKGBUILD)
sagemath/repos/community-x86_64/fes02.patch
(from rev 403206, sagemath/trunk/fes02.patch)
sagemath/repos/community-x86_64/latte-count.patch
(from rev 403206, sagemath/trunk/latte-count.patch)
sagemath/repos/community-x86_64/package.patch
(from rev 403206, sagemath/trunk/package.patch)
sagemath/repos/community-x86_64/sagemath-cremona.patch
(from rev 403206, sagemath/trunk/sagemath-cremona.patch)
sagemath/repos/community-x86_64/sagemath-cypari2.patch
(from rev 403206, sagemath/trunk/sagemath-cypari2.patch)
sagemath/repos/community-x86_64/sagemath-cython-0.29.patch
(from rev 403206, sagemath/trunk/sagemath-cython-0.29.patch)
sagemath/repos/community-x86_64/sagemath-env.patch
(from rev 403206, sagemath/trunk/sagemath-env.patch)
sagemath/repos/community-x86_64/sagemath-gap-4.8.patch
(from rev 403206, sagemath/trunk/sagemath-gap-4.8.patch)
sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch
(from rev 403206, sagemath/trunk/sagemath-lcalc-c++11.patch)
sagemath/repos/community-x86_64/sagemath-networkx-2.2.patch
(from rev 403206, sagemath/trunk/sagemath-networkx-2.2.patch)
sagemath/repos/community-x86_64/sagemath-numpy-1.15.patch
(from rev 403206, sagemath/trunk/sagemath-numpy-1.15.patch)
sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
(from rev 403206, sagemath/trunk/sagemath-python3-notebook.patch)
sagemath/repos/community-x86_64/sagemath-sphinx-1.8.patch
(from rev 403206, sagemath/trunk/sagemath-sphinx-1.8.patch)
sagemath/repos/community-x86_64/sagemath-threejs.patch
(from rev 403206, sagemath/trunk/sagemath-threejs.patch)
sagemath/repos/community-x86_64/test-optional.patch
(from rev 403206, sagemath/trunk/test-optional.patch)
Deleted:
sagemath/repos/community-x86_64/PKGBUILD
sagemath/repos/community-x86_64/fes02.patch
sagemath/repos/community-x86_64/latte-count.patch
sagemath/repos/community-x86_64/package.patch
sagemath/repos/community-x86_64/sagemath-cremona.patch
sagemath/repos/community-x86_64/sagemath-cypari2.patch
sagemath/repos/community-x86_64/sagemath-cython-0.29.patch
sagemath/repos/community-x86_64/sagemath-env.patch
sagemath/repos/community-x86_64/sagemath-gap-4.8.patch
sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch
sagemath/repos/community-x86_64/sagemath-networkx-2.2.patch
sagemath/repos/community-x86_64/sagemath-numpy-1.15.patch
sagemath/repos/community-x86_64/sagemath-python3-notebook.patch
sagemath/repos/community-x86_64/sagemath-sphinx-1.8.patch
sagemath/repos/community-x86_64/sagemath-threejs.patch
sagemath/repos/community-x86_64/test-optional.patch
---------------------------------+
PKGBUILD | 338 +++----
fes02.patch | 114 +-
latte-count.patch | 178 +--
package.patch | 78 -
sagemath-cremona.patch | 62 -
sagemath-cypari2.patch | 760 +++++++--------
sagemath-cython-0.29.patch | 130 +-
sagemath-env.patch | 344 +++----
sagemath-gap-4.8.patch | 52 -
sagemath-lcalc-c++11.patch | 20
sagemath-networkx-2.2.patch | 448 ++++-----
sagemath-numpy-1.15.patch | 1824 +++++++++++++++++++-------------------
sagemath-python3-notebook.patch | 54 -
sagemath-sphinx-1.8.patch | 56 -
sagemath-threejs.patch | 22
test-optional.patch | 50 -
16 files changed, 2265 insertions(+), 2265 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-11-07 21:39:10 UTC (rev 403206)
+++ PKGBUILD 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,169 +0,0 @@
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
-# Contributor: Osman Ugus <ugus11 at yahoo dot com>
-# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
-
-pkgbase=sagemath
-pkgname=(sagemath sagemath-jupyter)
-pkgver=8.4
-pkgrel=2
-pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
-arch=(x86_64)
-url="http://www.sagemath.org"
-license=(GPL)
-depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
- python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
- eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
- sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
- libgiac libhomfly libbraiding three.js openblas)
-optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
- 'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
- 'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
- 'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
- 'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
- 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
- 'coxeter: Coxeter groups implementation' 'gap-4.8-data: for computing Galois groups'
- 'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
- 'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
- 'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
- 'shared_meataxe: faster matrix arithmetic over finite fields'
- 'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
- 'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python2-pycosat: picosat SAT solver'
- 'python2-pip: to install optional packages with sage -pip')
-makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc sirocco
- mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_meataxe libfes primecount)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
- sagemath-env.patch
- package.patch
- latte-count.patch
- sagemath-python3-notebook.patch
- test-optional.patch
- fes02.patch
- sagemath-threejs.patch
- sagemath-cremona.patch
- sagemath-lcalc-c++11.patch
- sagemath-gap-4.8.patch
- sagemath-sphinx-1.8.patch
- sagemath-networkx-2.2.patch
- sagemath-cython-0.29.patch
- sagemath-numpy-1.15.patch
- sagemath-cypari2.patch)
-sha256sums=('961a21f60d251531db4b9935cfb6f67f7a207e1029288b4dc5b807f021078ab0'
- '6032ec3d0c983e70d4daa1391bc5daa0c948d350f3697932fc2e8472f0778037'
- '960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b'
- 'ef265f88ceb6caf4aac2d86ea74850861d99a63d11c94fc52b2ce88053c26d1e'
- '769fd5a9c377be61de41e1e30004dadb23818da901cceb6e1bece7712ba7cb83'
- '3a0ebda1df708f263be830751cc5ddb430ca1f685b25b08d4b6592b65b123ebe'
- '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
- '4722f9257f7b58a5dc8be2e9163ebba6d7b3ee011ff1ab9c0dbfb1330d367261'
- '7efb38ba511037feb3abbd88576323320555ba50235ddc7e3d423ca294dd42ed'
- '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
- '7304d6242bf0e8241d3d83b772d92f00f905c425b894d36a25c264edca279986'
- '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee'
- '0e3436a68cca4165d3d8519a7d4357b1a59515e9e4cc8bd816a852ca4097e274'
- 'd1af7916e21d0a4de7b3ab5d4054c6b3175b84551ea6639a2680e6102c0b990b'
- '9ef22633ae5d0dde9afe922d5616e49cea4ef6178a4991c96a258981cba674b7'
- 'ef9e2d5b7bd9c2b79121fe771a97963527d97ac9c1d6736d931f00e3eb7f540a')
-
-prepare(){
- cd sage-$pkgver
-
-# Arch-specific patches
-# assume all optional packages are installed
- patch -p0 -i ../package.patch
-# set env variables
- patch -p0 -i ../sagemath-env.patch
-# don't list optional packages when running tests
- patch -p0 -i ../test-optional.patch
-# use correct latte-count binary name
- patch -p1 -i ../latte-count.patch
-# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
- patch -p1 -i ../sagemath-python3-notebook.patch
-# fix three.js plotting backend
- patch -p1 -i ../sagemath-threejs.patch
-# don't force c++98 for lcalc (fixes build with NTL 11)
- patch -p1 -i ../sagemath-lcalc-c++11.patch
-# Adjust paths for gap-4.8
- patch -p1 -i ../sagemath-gap-4.8.patch
-# fix introspection with sphinx 1.8
- patch -p1 -i ../sagemath-sphinx-1.8.patch
-
-# Upstream patches
-# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
- patch -p1 -i ../fes02.patch
-# use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825
- patch -p1 -i ../sagemath-cremona.patch
-# Fix graph generators with networkx 2.2 https://trac.sagemath.org/ticket/26326
- patch -p1 -i ../sagemath-networkx-2.2.patch
-# Fix build with cython 0.29 https://trac.sagemath.org/ticket/25292
- patch -p1 -i ../sagemath-cython-0.29.patch
-# Fixes for numpy 1.15 https://trac.sagemath.org/ticket/25260
- patch -p1 -i ../sagemath-numpy-1.15.patch
-# Fix build with cypari 2.0 https://trac.sagemath.org/ticket/26442
- patch -p1 -i ../sagemath-cypari2.patch
-
-# use python2
- sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/*
- sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
- sed -e 's|exec ipython\b|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
- sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
-}
-
-
-build() {
- cd sage-$pkgver/src
-
- export CC=gcc
- export SAGE_ROOT="$PWD"
- export SAGE_SRC="$PWD"
- python2 setup.py build
-}
-
-package_sagemath() {
- optdepends+=('sagemath-jupyter: Jupyter kernel')
-
- cd sage-$pkgver/src
-
- export SAGE_ROOT="$PWD"
- export SAGE_LOCAL="/usr"
- export SAGE_EXTCODE="$PWD"/ext
- python2 setup.py install --root="$pkgdir" --optimize=1
-
- mkdir -p "$pkgdir"/usr/bin
- cp bin/{sage,math-readline} "$pkgdir"/usr/bin
- for _i in cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran ipynb2rst \
- ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
- run-cython runtests startuptime.py sws2rst valgrind version.sh
- do
- cp bin/sage-$_i "$pkgdir"/usr/bin
- done
-
- mkdir -p "$pkgdir"/usr/share/sage
- cp -r ext "$pkgdir"/usr/share/sage
-
-# Remove sage_setup
- rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
-
-# Split jupyter kernel
- rm -r "$pkgdir"/usr/share/jupyter
-}
-
-package_sagemath-jupyter() {
- pkgdesc='Jupyter kernel for SageMath'
- depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax jsmol)
- optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
-
- cd sage-$pkgver/src
-
- export SAGE_ROOT="$PWD"
- export SAGE_LOCAL="/usr"
-
- python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update(prefix='$pkgdir/usr')"
-# fix symlinks to assets
- for _i in $(ls ext/notebook-ipython); do
- rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
- ln -s /usr/share/sage/ext/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
- done
-}
Copied: sagemath/repos/community-x86_64/PKGBUILD (from rev 403206, sagemath/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,169 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Evgeniy Alekseev <arcanis.arch at gmail dot com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Thomas Dziedzic <gostrc at gmail dot com>
+# Contributor: Osman Ugus <ugus11 at yahoo dot com>
+# Contributor: Stefan Husmann <stefan-husmann at t-online dot de>
+
+pkgbase=sagemath
+pkgname=(sagemath sagemath-jupyter)
+pkgver=8.4
+pkgrel=3
+pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
+arch=(x86_64)
+url="http://www.sagemath.org"
+license=(GPL)
+depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rpy2 python2-fpylll python2-psutil python2-cypari2
+ python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb
+ eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox m4rie rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon
+ sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials
+ libgiac libhomfly libbraiding three.js openblas)
+optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code'
+ 'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)'
+ 'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory'
+ 'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs'
+ 'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids'
+ 'ffmpeg: to export animations to video' 'imagemagick: to show animations'
+ 'coxeter: Coxeter groups implementation' 'gap-4.8-data: for computing Galois groups'
+ 'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes'
+ 'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations'
+ 'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations'
+ 'shared_meataxe: faster matrix arithmetic over finite fields'
+ 'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation'
+ 'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python2-pycosat: picosat SAT solver'
+ 'python2-pip: to install optional packages with sage -pip')
+makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc sirocco
+ mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_meataxe libfes primecount)
+source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz"
+ sagemath-env.patch
+ package.patch
+ latte-count.patch
+ sagemath-python3-notebook.patch
+ test-optional.patch
+ fes02.patch
+ sagemath-threejs.patch
+ sagemath-cremona.patch
+ sagemath-lcalc-c++11.patch
+ sagemath-gap-4.8.patch
+ sagemath-sphinx-1.8.patch
+ sagemath-networkx-2.2.patch
+ sagemath-cython-0.29.patch
+ sagemath-numpy-1.15.patch
+ sagemath-cypari2.patch)
+sha256sums=('961a21f60d251531db4b9935cfb6f67f7a207e1029288b4dc5b807f021078ab0'
+ '6032ec3d0c983e70d4daa1391bc5daa0c948d350f3697932fc2e8472f0778037'
+ '960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b'
+ 'ef265f88ceb6caf4aac2d86ea74850861d99a63d11c94fc52b2ce88053c26d1e'
+ '769fd5a9c377be61de41e1e30004dadb23818da901cceb6e1bece7712ba7cb83'
+ '3a0ebda1df708f263be830751cc5ddb430ca1f685b25b08d4b6592b65b123ebe'
+ '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94'
+ '4722f9257f7b58a5dc8be2e9163ebba6d7b3ee011ff1ab9c0dbfb1330d367261'
+ '7efb38ba511037feb3abbd88576323320555ba50235ddc7e3d423ca294dd42ed'
+ '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0'
+ '7304d6242bf0e8241d3d83b772d92f00f905c425b894d36a25c264edca279986'
+ '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee'
+ '0e3436a68cca4165d3d8519a7d4357b1a59515e9e4cc8bd816a852ca4097e274'
+ 'd1af7916e21d0a4de7b3ab5d4054c6b3175b84551ea6639a2680e6102c0b990b'
+ '9ef22633ae5d0dde9afe922d5616e49cea4ef6178a4991c96a258981cba674b7'
+ 'ef9e2d5b7bd9c2b79121fe771a97963527d97ac9c1d6736d931f00e3eb7f540a')
+
+prepare(){
+ cd sage-$pkgver
+
+# Arch-specific patches
+# assume all optional packages are installed
+ patch -p0 -i ../package.patch
+# set env variables
+ patch -p0 -i ../sagemath-env.patch
+# don't list optional packages when running tests
+ patch -p0 -i ../test-optional.patch
+# use correct latte-count binary name
+ patch -p1 -i ../latte-count.patch
+# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package
+ patch -p1 -i ../sagemath-python3-notebook.patch
+# fix three.js plotting backend
+ patch -p1 -i ../sagemath-threejs.patch
+# don't force c++98 for lcalc (fixes build with NTL 11)
+ patch -p1 -i ../sagemath-lcalc-c++11.patch
+# Adjust paths for gap-4.8
+ patch -p1 -i ../sagemath-gap-4.8.patch
+# fix introspection with sphinx 1.8
+ patch -p1 -i ../sagemath-sphinx-1.8.patch
+
+# Upstream patches
+# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
+ patch -p1 -i ../fes02.patch
+# use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825
+ patch -p1 -i ../sagemath-cremona.patch
+# Fix graph generators with networkx 2.2 https://trac.sagemath.org/ticket/26326
+ patch -p1 -i ../sagemath-networkx-2.2.patch
+# Fix build with cython 0.29 https://trac.sagemath.org/ticket/25292
+ patch -p1 -i ../sagemath-cython-0.29.patch
+# Fixes for numpy 1.15 https://trac.sagemath.org/ticket/25260
+ patch -p1 -i ../sagemath-numpy-1.15.patch
+# Fix build with cypari 2.0 https://trac.sagemath.org/ticket/26442
+ patch -p1 -i ../sagemath-cypari2.patch
+
+# use python2
+ sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/*
+ sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py
+ sed -e 's|exec ipython\b|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage
+ sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython
+}
+
+
+build() {
+ cd sage-$pkgver/src
+
+ export CC=gcc
+ export SAGE_ROOT="$PWD"
+ export SAGE_SRC="$PWD"
+ python2 setup.py build
+}
+
+package_sagemath() {
+ optdepends+=('sagemath-jupyter: Jupyter kernel')
+
+ cd sage-$pkgver/src
+
+ export SAGE_ROOT="$PWD"
+ export SAGE_LOCAL="/usr"
+ export SAGE_EXTCODE="$PWD"/ext
+ python2 setup.py install --root="$pkgdir" --optimize=1
+
+ mkdir -p "$pkgdir"/usr/bin
+ cp bin/{sage,math-readline} "$pkgdir"/usr/bin
+ for _i in cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran ipynb2rst \
+ ipython massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run \
+ run-cython runtests startuptime.py sws2rst valgrind version.sh
+ do
+ cp bin/sage-$_i "$pkgdir"/usr/bin
+ done
+
+ mkdir -p "$pkgdir"/usr/share/sage
+ cp -r ext "$pkgdir"/usr/share/sage
+
+# Remove sage_setup
+ rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup
+
+# Split jupyter kernel
+ rm -r "$pkgdir"/usr/share/jupyter
+}
+
+package_sagemath-jupyter() {
+ pkgdesc='Jupyter kernel for SageMath'
+ depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax jsmol)
+ optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter')
+
+ cd sage-$pkgver/src
+
+ export SAGE_ROOT="$PWD"
+ export SAGE_LOCAL="/usr"
+
+ python2 -c "from sage.repl.ipython_kernel.install import SageKernelSpec; SageKernelSpec.update(prefix='$pkgdir/usr')"
+# fix symlinks to assets
+ for _i in $(ls ext/notebook-ipython); do
+ rm "$pkgdir"/usr/share/jupyter/kernels/sagemath/$_i
+ ln -s /usr/share/sage/ext/notebook-ipython/$_i "$pkgdir"/usr/share/jupyter/kernels/sagemath/
+ done
+}
Deleted: fes02.patch
===================================================================
--- fes02.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ fes02.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,57 +0,0 @@
-From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
-From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
-Date: Thu, 19 Sep 2013 10:31:11 +0200
-Subject: updating the libFES binding to match a change in the interface
-
----
- src/sage/libs/fes.pyx | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
-index 40b9c23..d188cf0 100644
---- a/src/sage/libs/fes.pyx
-+++ b/src/sage/libs/fes.pyx
-@@ -1,17 +1,19 @@
- """
--Binding for the FES library.
-+Binding for the libFES library.
-
- Finding solutions of systems of boolean equations by exhaustive
- search, via the fes library. This is usually (much) faster than
- computing a Groebner basis, except in special cases where the latter
- is particularly easy.
-
--The FES library is presently only able to deal with polynomials in 64
-+More information is available at [http://www.lifl.fr/~bouillag/fes].
-+
-+The libFES library is presently only able to deal with polynomials in 64
- variables. Performing a full exhaustive search over 64 variables will
- take a **long** time. The number of variables can be artificially
- reduced to 64 by specializing some of them.
-
--Note that the FES library **requires** at least of the equations to be
-+Note that the libFES library **requires** at least of the equations to be
- non-linear.
-
- AUTHORS:
-@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
- cdef extern from "fes_interface.h":
- ctypedef int (*solution_callback_t)(void *, uint64_t)
-
-- void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
-+ void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
-
-
- from sage.rings.integer import Integer
-@@ -217,7 +217,7 @@ def exhaustive_search(eqs, max_sols=Infinity, verbose=False):
-
- # ------- runs the library
- sig_on()
-- exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
-+ exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
- sig_off()
-
- # ------- frees memory occupied by the dense representation of the equations
---
-cgit v1.0-1-gd88e
-
Copied: sagemath/repos/community-x86_64/fes02.patch (from rev 403206, sagemath/trunk/fes02.patch)
===================================================================
--- fes02.patch (rev 0)
+++ fes02.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,57 @@
+From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001
+From: Charles Bouillaguet <charles.bouillaguet at lifl.fr>
+Date: Thu, 19 Sep 2013 10:31:11 +0200
+Subject: updating the libFES binding to match a change in the interface
+
+---
+ src/sage/libs/fes.pyx | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx
+index 40b9c23..d188cf0 100644
+--- a/src/sage/libs/fes.pyx
++++ b/src/sage/libs/fes.pyx
+@@ -1,17 +1,19 @@
+ """
+-Binding for the FES library.
++Binding for the libFES library.
+
+ Finding solutions of systems of boolean equations by exhaustive
+ search, via the fes library. This is usually (much) faster than
+ computing a Groebner basis, except in special cases where the latter
+ is particularly easy.
+
+-The FES library is presently only able to deal with polynomials in 64
++More information is available at [http://www.lifl.fr/~bouillag/fes].
++
++The libFES library is presently only able to deal with polynomials in 64
+ variables. Performing a full exhaustive search over 64 variables will
+ take a **long** time. The number of variables can be artificially
+ reduced to 64 by specializing some of them.
+
+-Note that the FES library **requires** at least of the equations to be
++Note that the libFES library **requires** at least of the equations to be
+ non-linear.
+
+ AUTHORS:
+@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t
+ cdef extern from "fes_interface.h":
+ ctypedef int (*solution_callback_t)(void *, uint64_t)
+
+- void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose)
++ void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T)
+
+
+ from sage.rings.integer import Integer
+@@ -217,7 +217,7 @@ def exhaustive_search(eqs, max_sols=Infinity, verbose=False):
+
+ # ------- runs the library
+ sig_on()
+- exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose)
++ exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, <void *> internal_state, verbose, 0)
+ sig_off()
+
+ # ------- frees memory occupied by the dense representation of the equations
+--
+cgit v1.0-1-gd88e
+
Deleted: latte-count.patch
===================================================================
--- latte-count.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ latte-count.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,89 +0,0 @@
-diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
-index 268af9db0d..70d41dfa30 100644
---- a/src/sage/geometry/polyhedron/base_ZZ.py
-+++ b/src/sage/geometry/polyhedron/base_ZZ.py
-@@ -171,7 +171,7 @@ class Polyhedron_ZZ(Polyhedron_base):
- sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True) # optional - latte_int
- This is LattE integrale ...
- ...
-- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
-+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
- ...
- sage: p # optional - latte_int
- 1/2*t^2 + 3/2*t + 1
-@@ -179,7 +179,7 @@ class Polyhedron_ZZ(Polyhedron_base):
- sage: p = P.ehrhart_polynomial(dual=True, verbose=True) # optional - latte_int
- This is LattE integrale ...
- ...
-- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
-+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
- ...
- sage: p # optional - latte_int
- 1/2*t^2 + 3/2*t + 1
-@@ -187,7 +187,7 @@ class Polyhedron_ZZ(Polyhedron_base):
- sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True) # optional - latte_int
- This is LattE integrale ...
- ...
-- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
-+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
- ...
- sage: p # optional - latte_int
- 1/2*t^2 + 3/2*t + 1
-@@ -195,7 +195,7 @@ class Polyhedron_ZZ(Polyhedron_base):
- sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True) # optional - latte_int
- This is LattE integrale ...
- ...
-- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
-+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
- ...
- sage: p # optional - latte_int
- 1/2*t^2 + 3/2*t + 1
-@@ -207,7 +207,7 @@ class Polyhedron_ZZ(Polyhedron_base):
- ...
- RuntimeError: LattE integrale program failed (exit code 1):
- ...
-- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
-+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
- Unknown command/option --bim-bam-boum=19
- """
- if self.is_empty():
-diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
-index 066cedd401..302b39910d 100644
---- a/src/sage/interfaces/latte.py
-+++ b/src/sage/interfaces/latte.py
-@@ -93,7 +93,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
- sage: n = count(cddin, cdd=True, verbose=True, raw_output=True) # optional - latte_int
- This is LattE integrale ...
- ...
-- Invocation: count '--redundancy-check=none' --cdd /dev/stdin
-+ Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
- ...
- Total Unimodular Cones: ...
- Maximum number of simplicial cones in memory at once: ...
-@@ -112,7 +112,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
- # Check that LattE is present
- Latte().require()
-
-- args = ['count']
-+ args = ['latte-count']
- if ehrhart_polynomial and multivariate_generating_function:
- raise ValueError
- if ehrhart_polynomial:
-diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
-index 63d227fd35..040a5cf1f9 100644
---- a/src/sage/features/latte.py
-+++ b/src/sage/features/latte.py
-@@ -10,10 +10,10 @@ from . import Executable, Feature, FeatureTestResult
-
- class Latte_count(Executable):
- r"""
-- Feature for the executable ``count`` from the LattE suite.
-+ Feature for the executable ``latte-count`` from the LattE suite.
- """
- def __init__(self):
-- Executable.__init__(self, "count", executable="count", spkg="latte_int", url="https://www.math.ucdavis.edu/~latte/software.php")
-+ Executable.__init__(self, "latte-count", executable="latte-count", spkg="latte_int", url="https://www.math.ucdavis.edu/~latte/software.php")
-
- class Latte_integrate(Executable):
- r"""
-
Copied: sagemath/repos/community-x86_64/latte-count.patch (from rev 403206, sagemath/trunk/latte-count.patch)
===================================================================
--- latte-count.patch (rev 0)
+++ latte-count.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,89 @@
+diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py
+index 268af9db0d..70d41dfa30 100644
+--- a/src/sage/geometry/polyhedron/base_ZZ.py
++++ b/src/sage/geometry/polyhedron/base_ZZ.py
+@@ -171,7 +171,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+ sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True) # optional - latte_int
+ This is LattE integrale ...
+ ...
+- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
++ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin
+ ...
+ sage: p # optional - latte_int
+ 1/2*t^2 + 3/2*t + 1
+@@ -179,7 +179,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+ sage: p = P.ehrhart_polynomial(dual=True, verbose=True) # optional - latte_int
+ This is LattE integrale ...
+ ...
+- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
++ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin
+ ...
+ sage: p # optional - latte_int
+ 1/2*t^2 + 3/2*t + 1
+@@ -187,7 +187,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+ sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True) # optional - latte_int
+ This is LattE integrale ...
+ ...
+- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
++ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin
+ ...
+ sage: p # optional - latte_int
+ 1/2*t^2 + 3/2*t + 1
+@@ -195,7 +195,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+ sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True) # optional - latte_int
+ This is LattE integrale ...
+ ...
+- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
++ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin
+ ...
+ sage: p # optional - latte_int
+ 1/2*t^2 + 3/2*t + 1
+@@ -207,7 +207,7 @@ class Polyhedron_ZZ(Polyhedron_base):
+ ...
+ RuntimeError: LattE integrale program failed (exit code 1):
+ ...
+- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
++ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin
+ Unknown command/option --bim-bam-boum=19
+ """
+ if self.is_empty():
+diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py
+index 066cedd401..302b39910d 100644
+--- a/src/sage/interfaces/latte.py
++++ b/src/sage/interfaces/latte.py
+@@ -93,7 +93,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+ sage: n = count(cddin, cdd=True, verbose=True, raw_output=True) # optional - latte_int
+ This is LattE integrale ...
+ ...
+- Invocation: count '--redundancy-check=none' --cdd /dev/stdin
++ Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin
+ ...
+ Total Unimodular Cones: ...
+ Maximum number of simplicial cones in memory at once: ...
+@@ -112,7 +112,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False,
+ # Check that LattE is present
+ Latte().require()
+
+- args = ['count']
++ args = ['latte-count']
+ if ehrhart_polynomial and multivariate_generating_function:
+ raise ValueError
+ if ehrhart_polynomial:
+diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py
+index 63d227fd35..040a5cf1f9 100644
+--- a/src/sage/features/latte.py
++++ b/src/sage/features/latte.py
+@@ -10,10 +10,10 @@ from . import Executable, Feature, FeatureTestResult
+
+ class Latte_count(Executable):
+ r"""
+- Feature for the executable ``count`` from the LattE suite.
++ Feature for the executable ``latte-count`` from the LattE suite.
+ """
+ def __init__(self):
+- Executable.__init__(self, "count", executable="count", spkg="latte_int", url="https://www.math.ucdavis.edu/~latte/software.php")
++ Executable.__init__(self, "latte-count", executable="latte-count", spkg="latte_int", url="https://www.math.ucdavis.edu/~latte/software.php")
+
+ class Latte_integrate(Executable):
+ r"""
+
Deleted: package.patch
===================================================================
--- package.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ package.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,39 +0,0 @@
---- src/sage/misc/package.py.orig 2014-11-23 15:58:13.000000000 +0100
-+++ src/sage/misc/package.py 2015-01-22 20:32:25.651383902 +0100
-@@ -328,7 +328,7 @@
- Use the framework provided by :mod:`sage.features` to check
- whether a library is installed and functional.
- """
-- return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
-+ return True
-
- def package_versions(package_type, local=False):
- r"""
---- src/sage_setup/optional_extension.py.orig 2016-10-19 18:35:10.092577510 +0000
-+++ src/sage_setup/optional_extension.py 2016-10-19 18:38:13.514765366 +0000
-@@ -21,8 +21,6 @@
- from distutils.extension import Extension
- from sage.misc.package import list_packages
-
--all_packages = list_packages(local=True)
--
-
- class CythonizeExtension(Extension):
- """
-@@ -76,15 +74,7 @@
- condition = kwds.pop("condition")
- except KeyError:
- pkg = kwds.pop("package")
-- from sage.misc.package import is_package_installed
-- try:
-- pkginfo = all_packages[pkg]
-- except KeyError:
-- # Might be an installed old-style package
-- condition = is_package_installed(pkg)
-- else:
-- condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
--
-+ condition = True
- if condition:
- return Extension(*args, **kwds)
- else:
Copied: sagemath/repos/community-x86_64/package.patch (from rev 403206, sagemath/trunk/package.patch)
===================================================================
--- package.patch (rev 0)
+++ package.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,39 @@
+--- src/sage/misc/package.py.orig 2014-11-23 15:58:13.000000000 +0100
++++ src/sage/misc/package.py 2015-01-22 20:32:25.651383902 +0100
+@@ -328,7 +328,7 @@
+ Use the framework provided by :mod:`sage.features` to check
+ whether a library is installed and functional.
+ """
+- return any(p.split('-')[0] == package for p in installed_packages(exclude_pip))
++ return True
+
+ def package_versions(package_type, local=False):
+ r"""
+--- src/sage_setup/optional_extension.py.orig 2016-10-19 18:35:10.092577510 +0000
++++ src/sage_setup/optional_extension.py 2016-10-19 18:38:13.514765366 +0000
+@@ -21,8 +21,6 @@
+ from distutils.extension import Extension
+ from sage.misc.package import list_packages
+
+-all_packages = list_packages(local=True)
+-
+
+ class CythonizeExtension(Extension):
+ """
+@@ -76,15 +74,7 @@
+ condition = kwds.pop("condition")
+ except KeyError:
+ pkg = kwds.pop("package")
+- from sage.misc.package import is_package_installed
+- try:
+- pkginfo = all_packages[pkg]
+- except KeyError:
+- # Might be an installed old-style package
+- condition = is_package_installed(pkg)
+- else:
+- condition = (pkginfo["installed_version"] == pkginfo["remote_version"])
+-
++ condition = True
+ if condition:
+ return Extension(*args, **kwds)
+ else:
Deleted: sagemath-cremona.patch
===================================================================
--- sagemath-cremona.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-cremona.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,31 +0,0 @@
-diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py
-index 3f8dd62..ed5726a 100644
---- a/src/sage/databases/cremona.py
-+++ b/src/sage/databases/cremona.py
-@@ -53,7 +53,7 @@ from sage.misc.prandom import randint
-
- import sage.schemes.elliptic_curves.constructor as elliptic
- from .sql_db import SQLDatabase, verify_column
--from sage.misc.package import is_package_installed
-+from sage.features.databases import DatabaseCremona
- from sage.env import CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR
- from sage.misc.all import walltime
-
-@@ -825,7 +825,7 @@ class MiniCremonaDatabase(SQLDatabase):
- if N < self.largest_conductor():
- message = "There is no elliptic curve with label " + label \
- + " in the database"
-- elif is_package_installed('database_cremona_ellcurve'):
-+ elif DatabaseCremona().is_present():
- message = "There is no elliptic curve with label " + label \
- + " in the currently available databases"
- else:
-@@ -1673,7 +1673,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None):
- if name is None and not set_global:
- return _db
- if set_global and name is None:
-- if is_package_installed('database_cremona_ellcurve'):
-+ if DatabaseCremona().is_present():
- name = 'cremona'
- else:
- name = 'cremona mini'
Copied: sagemath/repos/community-x86_64/sagemath-cremona.patch (from rev 403206, sagemath/trunk/sagemath-cremona.patch)
===================================================================
--- sagemath-cremona.patch (rev 0)
+++ sagemath-cremona.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,31 @@
+diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py
+index 3f8dd62..ed5726a 100644
+--- a/src/sage/databases/cremona.py
++++ b/src/sage/databases/cremona.py
+@@ -53,7 +53,7 @@ from sage.misc.prandom import randint
+
+ import sage.schemes.elliptic_curves.constructor as elliptic
+ from .sql_db import SQLDatabase, verify_column
+-from sage.misc.package import is_package_installed
++from sage.features.databases import DatabaseCremona
+ from sage.env import CREMONA_MINI_DATA_DIR, CREMONA_LARGE_DATA_DIR
+ from sage.misc.all import walltime
+
+@@ -825,7 +825,7 @@ class MiniCremonaDatabase(SQLDatabase):
+ if N < self.largest_conductor():
+ message = "There is no elliptic curve with label " + label \
+ + " in the database"
+- elif is_package_installed('database_cremona_ellcurve'):
++ elif DatabaseCremona().is_present():
+ message = "There is no elliptic curve with label " + label \
+ + " in the currently available databases"
+ else:
+@@ -1673,7 +1673,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None):
+ if name is None and not set_global:
+ return _db
+ if set_global and name is None:
+- if is_package_installed('database_cremona_ellcurve'):
++ if DatabaseCremona().is_present():
+ name = 'cremona'
+ else:
+ name = 'cremona mini'
Deleted: sagemath-cypari2.patch
===================================================================
--- sagemath-cypari2.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-cypari2.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,380 +0,0 @@
-diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pxd
-b/src/sage/rings/finite_rings/element_pari_ffelt.pxd
-index 10885d4..0b66436 100644
---- a/src/sage/rings/finite_rings/element_pari_ffelt.pxd
-+++ b/src/sage/rings/finite_rings/element_pari_ffelt.pxd
-@@ -1,9 +1,12 @@
- from cypari2.types cimport GEN
- from sage.rings.finite_rings.element_base cimport FinitePolyExtElement
-
-+
- cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
-- cdef GEN val # PARI t_FFELT describing the element
-- cdef void* chunk # memory block containing the data
-- cdef FiniteFieldElement_pari_ffelt _new(FiniteFieldElement_pari_ffelt self)
-- cdef void construct(FiniteFieldElement_pari_ffelt self, GEN g)
-- cdef void construct_from(FiniteFieldElement_pari_ffelt self, object x) except *
-+ # PARI t_FFELT describing the element.
-+ # This holds a reference to a PARI clone.
-+ cdef GEN val
-+
-+ cdef FiniteFieldElement_pari_ffelt _new(self)
-+ cdef void construct(self, GEN g)
-+ cdef int construct_from(self, x) except -1
-diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-index 78a35fe..727a058 100644
---- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-+++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-@@ -24,7 +24,7 @@ from cysignals.signals cimport sig_on, sig_off
- from cypari2.paridecl cimport *
- from cypari2.paripriv cimport *
- from sage.libs.pari.convert_gmp cimport _new_GEN_from_mpz_t
--from cypari2.stack cimport new_gen, clear_stack, deepcopy_to_python_heap
-+from cypari2.stack cimport new_gen, new_gen_noclear, clear_stack
- from cypari2.gen cimport Gen as pari_gen, objtogen
-
- from .element_base cimport FinitePolyExtElement
-@@ -316,7 +316,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- 0
- """
-
-- def __init__(FiniteFieldElement_pari_ffelt self, object parent, object x):
-+ def __init__(self, parent, x):
- """
- Initialise ``self`` with the given ``parent`` and value
- converted from ``x``.
-@@ -335,13 +335,14 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- self._parent = parent
- self.construct_from(x)
-
-- def __dealloc__(FiniteFieldElement_pari_ffelt self):
-+ def __dealloc__(self):
- """
-- Cython deconstructor.
-+ Cython destructor.
- """
-- sig_free(self.chunk)
-+ if self.val is not NULL:
-+ gunclone_deep(self.val)
-
-- cdef FiniteFieldElement_pari_ffelt _new(FiniteFieldElement_pari_ffelt self):
-+ cdef FiniteFieldElement_pari_ffelt _new(self):
- """
- Create an empty element with the same parent as ``self``.
- """
-@@ -350,17 +351,17 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- x._parent = self._parent
- return x
-
-- cdef void construct(FiniteFieldElement_pari_ffelt self, GEN g):
-+ cdef void construct(self, GEN g):
- """
- Initialise ``self`` to the FFELT ``g``, reset the PARI stack,
- and call sig_off().
-
- This should be called exactly once on every instance.
- """
-- self.val = deepcopy_to_python_heap(g, &self.chunk)
-+ self.val = gcloneref(g)
- clear_stack()
-
-- cdef void construct_from(FiniteFieldElement_pari_ffelt self, object x) except *:
-+ cdef int construct_from(self, x) except -1:
- """
- Initialise ``self`` to an FFELT constructed from the Sage
- object `x`.
-@@ -424,29 +425,29 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sig_on()
- if gequal0(x_GEN):
- self.construct(FF_zero(g))
-- return
-+ return 0
- elif gequal1(x_GEN):
- self.construct(FF_1(g))
-- return
-+ return 0
-
- t = typ(x_GEN)
- if t == t_FFELT:
- if FF_samefield(x_GEN, g):
- self.construct(x_GEN)
-- return
-+ return 0
- elif t == t_INT:
- self.construct(_INT_to_FFELT(g, x_GEN))
-- return
-+ return 0
- elif t == t_INTMOD:
- if gequal0(modii(gel(x_GEN, 1), FF_p_i(g))):
- self.construct(_INT_to_FFELT(g, gel(x_GEN, 2)))
-- return
-+ return 0
- elif t == t_FRAC:
- if not gequal0(modii(gel(x_GEN, 2), FF_p_i(g))):
- elt = FF_div(_INT_to_FFELT(g, gel(x_GEN, 1)),
- _INT_to_FFELT(g, gel(x_GEN, 2)))
- self.construct(elt)
-- return
-+ return 0
- sig_off()
- raise TypeError(f"unable to convert PARI {x.type()} to finite field element")
-
-@@ -460,7 +461,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sig_on()
- if n == 0:
- self.construct(FF_zero(g))
-- return
-+ return 0
- if t == t_FF_FpXQ:
- f = cgetg(n + 2, t_POL)
- set_gel(f, 1, gmael(g, 2, 1))
-@@ -515,7 +516,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- else:
- raise TypeError("no coercion defined")
-
-- def _repr_(FiniteFieldElement_pari_ffelt self):
-+ def _repr_(self):
- """
- Return the string representation of ``self``.
-
-@@ -525,10 +526,9 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sage: c^20 # indirect doctest
- c^4 + 2*c^3
- """
-- sig_on()
-- return str(new_gen(self.val))
-+ return str(new_gen_noclear(self.val))
-
-- def __hash__(FiniteFieldElement_pari_ffelt self):
-+ def __hash__(self):
- """
- Return the hash of ``self``. This is by definition equal to
- the hash of ``self.polynomial()``.
-@@ -542,7 +542,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- return hash(self.polynomial())
-
-- def __reduce__(FiniteFieldElement_pari_ffelt self):
-+ def __reduce__(self):
- """
- For pickling.
-
-@@ -554,7 +554,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- return unpickle_FiniteFieldElement_pari_ffelt, (self._parent, str(self))
-
-- def __copy__(FiniteFieldElement_pari_ffelt self):
-+ def __copy__(self):
- """
- Return a copy of ``self``.
-
-@@ -701,7 +701,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- (<FiniteFieldElement_pari_ffelt>right).val))
- return x
-
-- def is_zero(FiniteFieldElement_pari_ffelt self):
-+ def is_zero(self):
- """
- Return ``True`` if ``self`` equals 0.
-
-@@ -715,7 +715,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- return bool(FF_equal0(self.val))
-
-- def is_one(FiniteFieldElement_pari_ffelt self):
-+ def is_one(self):
- """
- Return ``True`` if ``self`` equals 1.
-
-@@ -729,7 +729,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- return bool(FF_equal1(self.val))
-
-- def is_unit(FiniteFieldElement_pari_ffelt self):
-+ def is_unit(self):
- """
- Return ``True`` if ``self`` is non-zero.
-
-@@ -743,7 +743,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
-
- __nonzero__ = is_unit
-
-- def __pos__(FiniteFieldElement_pari_ffelt self):
-+ def __pos__(self):
- """
- Unitary positive operator...
-
-@@ -755,7 +755,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- return self
-
-- def __neg__(FiniteFieldElement_pari_ffelt self):
-+ def __neg__(self):
- """
- Negation.
-
-@@ -770,7 +770,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- x.construct(FF_neg_i((<FiniteFieldElement_pari_ffelt>self).val))
- return x
-
-- def __invert__(FiniteFieldElement_pari_ffelt self):
-+ def __invert__(self):
- """
- Return the multiplicative inverse of ``self``.
-
-@@ -791,7 +791,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- x.construct(FF_inv((<FiniteFieldElement_pari_ffelt>self).val))
- return x
-
-- def __pow__(FiniteFieldElement_pari_ffelt self, object exp, object other):
-+ def __pow__(FiniteFieldElement_pari_ffelt self, exp, other):
- """
- Exponentiation.
-
-@@ -836,7 +836,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- x.construct(FF_pow(self.val, (<pari_gen>exp).g))
- return x
-
-- def polynomial(FiniteFieldElement_pari_ffelt self, name=None):
-+ def polynomial(self, name=None):
- """
- Return the unique representative of ``self`` as a polynomial
- over the prime field whose degree is less than the degree of
-@@ -889,7 +889,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sig_on()
- return self._parent.polynomial_ring(var)(new_gen(FF_minpoly(self.val)))
-
-- def charpoly(FiniteFieldElement_pari_ffelt self, object var='x'):
-+ def charpoly(self, var='x'):
- """
- Return the characteristic polynomial of ``self``.
-
-@@ -907,7 +907,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sig_on()
- return self._parent.polynomial_ring(var)(new_gen(FF_charpoly(self.val)))
-
-- def is_square(FiniteFieldElement_pari_ffelt self):
-+ def is_square(self):
- """
- Return ``True`` if and only if ``self`` is a square in the
- finite field.
-@@ -938,7 +938,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sig_off()
- return bool(i)
-
-- def sqrt(FiniteFieldElement_pari_ffelt self, extend=False, all=False):
-+ def sqrt(self, extend=False, all=False):
- """
- Return a square root of ``self``, if it exists.
-
-@@ -1015,7 +1015,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- else:
- raise ValueError("element is not a square")
-
-- def log(FiniteFieldElement_pari_ffelt self, object base):
-+ def log(self, base):
- """
- Return a discrete logarithm of ``self`` with respect to the
- given base.
-@@ -1087,7 +1087,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- x = FF_log(self.val, (<FiniteFieldElement_pari_ffelt>base).val, base_order)
- return Integer(new_gen(x))
-
-- def multiplicative_order(FiniteFieldElement_pari_ffelt self):
-+ def multiplicative_order(self):
- """
- Returns the order of ``self`` in the multiplicative group.
-
-@@ -1106,7 +1106,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- order = FF_order(self.val, NULL)
- return Integer(new_gen(order))
-
-- def lift(FiniteFieldElement_pari_ffelt self):
-+ def lift(self):
- """
- If ``self`` is an element of the prime field, return a lift of
- this element to an integer.
-@@ -1192,10 +1192,6 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- """
- Return a PARI object representing ``self``.
-
-- INPUT:
--
-- - var -- ignored
--
- EXAMPLES::
-
- sage: k.<a> = FiniteField(3^3, impl='pari_ffelt')
-@@ -1203,8 +1199,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- sage: b.__pari__()
- a^2 + 2*a + 1
- """
-- sig_on()
-- return new_gen(self.val)
-+ return new_gen_noclear(self.val)
-
- def _pari_init_(self):
- """
-diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-index ff73a1f..fba303a 100644
---- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-+++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
-@@ -869,7 +869,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
- Univariate Polynomial Ring in beta over Finite Field of size 3
- """
- sig_on()
-- return self._parent.polynomial_ring(name)(new_gen(FF_to_FpXQ_i(self.val)))
-+ return self._parent.polynomial_ring(name)(new_gen(FF_to_FpXQ(self.val)))
-
- def minpoly(self, var='x'):
- """
-diff --git a/src/sage/rings/number_field/maps.py b/src/sage/rings/number_field/maps.py
-index 1727c13..5717227 100644
---- a/src/sage/rings/number_field/maps.py
-+++ b/src/sage/rings/number_field/maps.py
-@@ -358,7 +358,7 @@ class MapRelativeNumberFieldToRelativeVectorSpace(NumberFieldIsomorphism):
- g = g(beta).lift()
- # Convert the coefficients to elements of the base field.
- B, from_B, _ = K.absolute_base_field()
-- return self.codomain()([from_B(B(z.lift(), check=False)) for z in g.Vecrev(-K.relative_degree())])
-+ return self.codomain()([from_B(B(z.lift(), check=False)) for z in g.Vecrev(K.relative_degree())])
-
-
- class NameChangeMap(NumberFieldIsomorphism):
-diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx
-index 2b5504a..8bd32dd 100644
---- a/src/sage/rings/polynomial/polynomial_element.pyx
-+++ b/src/sage/rings/polynomial/polynomial_element.pyx
-@@ -4364,8 +4364,7 @@ cdef class Polynomial(CommutativeAlgebraElement):
- sage: G.prod() == g
- True
- """
-- pols = G[0]
-- exps = G[1]
-+ pols, exps = G
- R = self._parent
- F = [(R(f), int(e)) for f, e in zip(pols, exps)]
-
-diff --git a/src/sage/rings/power_series_pari.pyx b/src/sage/rings/power_series_pari.pyx
-index e37e0a3..2e03ade 100644
---- a/src/sage/rings/power_series_pari.pyx
-+++ b/src/sage/rings/power_series_pari.pyx
-@@ -678,7 +678,8 @@ cdef class PowerSeries_pari(PowerSeries):
- g = g.truncate()
- if typ(g.g) == t_POL and varn(g.g) == vn:
- # t_POL has 2 codewords. Use new_ref instead of g[i] for speed.
-- return [R(g.new_ref(gel(g.g, i))) for i in range(2, lg(g.g))]
-+ G = g.fixGEN()
-+ return [R(g.new_ref(gel(G, i))) for i in range(2, lg(G))]
- else:
- return [R(g)]
-
-@@ -729,6 +730,7 @@ cdef class PowerSeries_pari(PowerSeries):
- return []
-
- cdef pari_gen g = self.g
-+ g.fixGEN()
- cdef long l, m
-
- R = self.base_ring()
Copied: sagemath/repos/community-x86_64/sagemath-cypari2.patch (from rev 403206, sagemath/trunk/sagemath-cypari2.patch)
===================================================================
--- sagemath-cypari2.patch (rev 0)
+++ sagemath-cypari2.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,380 @@
+diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pxd
+b/src/sage/rings/finite_rings/element_pari_ffelt.pxd
+index 10885d4..0b66436 100644
+--- a/src/sage/rings/finite_rings/element_pari_ffelt.pxd
++++ b/src/sage/rings/finite_rings/element_pari_ffelt.pxd
+@@ -1,9 +1,12 @@
+ from cypari2.types cimport GEN
+ from sage.rings.finite_rings.element_base cimport FinitePolyExtElement
+
++
+ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+- cdef GEN val # PARI t_FFELT describing the element
+- cdef void* chunk # memory block containing the data
+- cdef FiniteFieldElement_pari_ffelt _new(FiniteFieldElement_pari_ffelt self)
+- cdef void construct(FiniteFieldElement_pari_ffelt self, GEN g)
+- cdef void construct_from(FiniteFieldElement_pari_ffelt self, object x) except *
++ # PARI t_FFELT describing the element.
++ # This holds a reference to a PARI clone.
++ cdef GEN val
++
++ cdef FiniteFieldElement_pari_ffelt _new(self)
++ cdef void construct(self, GEN g)
++ cdef int construct_from(self, x) except -1
+diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
+b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
+index 78a35fe..727a058 100644
+--- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
++++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
+@@ -24,7 +24,7 @@ from cysignals.signals cimport sig_on, sig_off
+ from cypari2.paridecl cimport *
+ from cypari2.paripriv cimport *
+ from sage.libs.pari.convert_gmp cimport _new_GEN_from_mpz_t
+-from cypari2.stack cimport new_gen, clear_stack, deepcopy_to_python_heap
++from cypari2.stack cimport new_gen, new_gen_noclear, clear_stack
+ from cypari2.gen cimport Gen as pari_gen, objtogen
+
+ from .element_base cimport FinitePolyExtElement
+@@ -316,7 +316,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ 0
+ """
+
+- def __init__(FiniteFieldElement_pari_ffelt self, object parent, object x):
++ def __init__(self, parent, x):
+ """
+ Initialise ``self`` with the given ``parent`` and value
+ converted from ``x``.
+@@ -335,13 +335,14 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ self._parent = parent
+ self.construct_from(x)
+
+- def __dealloc__(FiniteFieldElement_pari_ffelt self):
++ def __dealloc__(self):
+ """
+- Cython deconstructor.
++ Cython destructor.
+ """
+- sig_free(self.chunk)
++ if self.val is not NULL:
++ gunclone_deep(self.val)
+
+- cdef FiniteFieldElement_pari_ffelt _new(FiniteFieldElement_pari_ffelt self):
++ cdef FiniteFieldElement_pari_ffelt _new(self):
+ """
+ Create an empty element with the same parent as ``self``.
+ """
+@@ -350,17 +351,17 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ x._parent = self._parent
+ return x
+
+- cdef void construct(FiniteFieldElement_pari_ffelt self, GEN g):
++ cdef void construct(self, GEN g):
+ """
+ Initialise ``self`` to the FFELT ``g``, reset the PARI stack,
+ and call sig_off().
+
+ This should be called exactly once on every instance.
+ """
+- self.val = deepcopy_to_python_heap(g, &self.chunk)
++ self.val = gcloneref(g)
+ clear_stack()
+
+- cdef void construct_from(FiniteFieldElement_pari_ffelt self, object x) except *:
++ cdef int construct_from(self, x) except -1:
+ """
+ Initialise ``self`` to an FFELT constructed from the Sage
+ object `x`.
+@@ -424,29 +425,29 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sig_on()
+ if gequal0(x_GEN):
+ self.construct(FF_zero(g))
+- return
++ return 0
+ elif gequal1(x_GEN):
+ self.construct(FF_1(g))
+- return
++ return 0
+
+ t = typ(x_GEN)
+ if t == t_FFELT:
+ if FF_samefield(x_GEN, g):
+ self.construct(x_GEN)
+- return
++ return 0
+ elif t == t_INT:
+ self.construct(_INT_to_FFELT(g, x_GEN))
+- return
++ return 0
+ elif t == t_INTMOD:
+ if gequal0(modii(gel(x_GEN, 1), FF_p_i(g))):
+ self.construct(_INT_to_FFELT(g, gel(x_GEN, 2)))
+- return
++ return 0
+ elif t == t_FRAC:
+ if not gequal0(modii(gel(x_GEN, 2), FF_p_i(g))):
+ elt = FF_div(_INT_to_FFELT(g, gel(x_GEN, 1)),
+ _INT_to_FFELT(g, gel(x_GEN, 2)))
+ self.construct(elt)
+- return
++ return 0
+ sig_off()
+ raise TypeError(f"unable to convert PARI {x.type()} to finite field element")
+
+@@ -460,7 +461,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sig_on()
+ if n == 0:
+ self.construct(FF_zero(g))
+- return
++ return 0
+ if t == t_FF_FpXQ:
+ f = cgetg(n + 2, t_POL)
+ set_gel(f, 1, gmael(g, 2, 1))
+@@ -515,7 +516,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ else:
+ raise TypeError("no coercion defined")
+
+- def _repr_(FiniteFieldElement_pari_ffelt self):
++ def _repr_(self):
+ """
+ Return the string representation of ``self``.
+
+@@ -525,10 +526,9 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sage: c^20 # indirect doctest
+ c^4 + 2*c^3
+ """
+- sig_on()
+- return str(new_gen(self.val))
++ return str(new_gen_noclear(self.val))
+
+- def __hash__(FiniteFieldElement_pari_ffelt self):
++ def __hash__(self):
+ """
+ Return the hash of ``self``. This is by definition equal to
+ the hash of ``self.polynomial()``.
+@@ -542,7 +542,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ return hash(self.polynomial())
+
+- def __reduce__(FiniteFieldElement_pari_ffelt self):
++ def __reduce__(self):
+ """
+ For pickling.
+
+@@ -554,7 +554,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ return unpickle_FiniteFieldElement_pari_ffelt, (self._parent, str(self))
+
+- def __copy__(FiniteFieldElement_pari_ffelt self):
++ def __copy__(self):
+ """
+ Return a copy of ``self``.
+
+@@ -701,7 +701,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ (<FiniteFieldElement_pari_ffelt>right).val))
+ return x
+
+- def is_zero(FiniteFieldElement_pari_ffelt self):
++ def is_zero(self):
+ """
+ Return ``True`` if ``self`` equals 0.
+
+@@ -715,7 +715,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ return bool(FF_equal0(self.val))
+
+- def is_one(FiniteFieldElement_pari_ffelt self):
++ def is_one(self):
+ """
+ Return ``True`` if ``self`` equals 1.
+
+@@ -729,7 +729,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ return bool(FF_equal1(self.val))
+
+- def is_unit(FiniteFieldElement_pari_ffelt self):
++ def is_unit(self):
+ """
+ Return ``True`` if ``self`` is non-zero.
+
+@@ -743,7 +743,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+
+ __nonzero__ = is_unit
+
+- def __pos__(FiniteFieldElement_pari_ffelt self):
++ def __pos__(self):
+ """
+ Unitary positive operator...
+
+@@ -755,7 +755,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ return self
+
+- def __neg__(FiniteFieldElement_pari_ffelt self):
++ def __neg__(self):
+ """
+ Negation.
+
+@@ -770,7 +770,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ x.construct(FF_neg_i((<FiniteFieldElement_pari_ffelt>self).val))
+ return x
+
+- def __invert__(FiniteFieldElement_pari_ffelt self):
++ def __invert__(self):
+ """
+ Return the multiplicative inverse of ``self``.
+
+@@ -791,7 +791,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ x.construct(FF_inv((<FiniteFieldElement_pari_ffelt>self).val))
+ return x
+
+- def __pow__(FiniteFieldElement_pari_ffelt self, object exp, object other):
++ def __pow__(FiniteFieldElement_pari_ffelt self, exp, other):
+ """
+ Exponentiation.
+
+@@ -836,7 +836,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ x.construct(FF_pow(self.val, (<pari_gen>exp).g))
+ return x
+
+- def polynomial(FiniteFieldElement_pari_ffelt self, name=None):
++ def polynomial(self, name=None):
+ """
+ Return the unique representative of ``self`` as a polynomial
+ over the prime field whose degree is less than the degree of
+@@ -889,7 +889,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sig_on()
+ return self._parent.polynomial_ring(var)(new_gen(FF_minpoly(self.val)))
+
+- def charpoly(FiniteFieldElement_pari_ffelt self, object var='x'):
++ def charpoly(self, var='x'):
+ """
+ Return the characteristic polynomial of ``self``.
+
+@@ -907,7 +907,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sig_on()
+ return self._parent.polynomial_ring(var)(new_gen(FF_charpoly(self.val)))
+
+- def is_square(FiniteFieldElement_pari_ffelt self):
++ def is_square(self):
+ """
+ Return ``True`` if and only if ``self`` is a square in the
+ finite field.
+@@ -938,7 +938,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sig_off()
+ return bool(i)
+
+- def sqrt(FiniteFieldElement_pari_ffelt self, extend=False, all=False):
++ def sqrt(self, extend=False, all=False):
+ """
+ Return a square root of ``self``, if it exists.
+
+@@ -1015,7 +1015,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ else:
+ raise ValueError("element is not a square")
+
+- def log(FiniteFieldElement_pari_ffelt self, object base):
++ def log(self, base):
+ """
+ Return a discrete logarithm of ``self`` with respect to the
+ given base.
+@@ -1087,7 +1087,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ x = FF_log(self.val, (<FiniteFieldElement_pari_ffelt>base).val, base_order)
+ return Integer(new_gen(x))
+
+- def multiplicative_order(FiniteFieldElement_pari_ffelt self):
++ def multiplicative_order(self):
+ """
+ Returns the order of ``self`` in the multiplicative group.
+
+@@ -1106,7 +1106,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ order = FF_order(self.val, NULL)
+ return Integer(new_gen(order))
+
+- def lift(FiniteFieldElement_pari_ffelt self):
++ def lift(self):
+ """
+ If ``self`` is an element of the prime field, return a lift of
+ this element to an integer.
+@@ -1192,10 +1192,6 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ """
+ Return a PARI object representing ``self``.
+
+- INPUT:
+-
+- - var -- ignored
+-
+ EXAMPLES::
+
+ sage: k.<a> = FiniteField(3^3, impl='pari_ffelt')
+@@ -1203,8 +1199,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ sage: b.__pari__()
+ a^2 + 2*a + 1
+ """
+- sig_on()
+- return new_gen(self.val)
++ return new_gen_noclear(self.val)
+
+ def _pari_init_(self):
+ """
+diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
+index ff73a1f..fba303a 100644
+--- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx
++++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx
+@@ -869,7 +869,7 @@ cdef class FiniteFieldElement_pari_ffelt(FinitePolyExtElement):
+ Univariate Polynomial Ring in beta over Finite Field of size 3
+ """
+ sig_on()
+- return self._parent.polynomial_ring(name)(new_gen(FF_to_FpXQ_i(self.val)))
++ return self._parent.polynomial_ring(name)(new_gen(FF_to_FpXQ(self.val)))
+
+ def minpoly(self, var='x'):
+ """
+diff --git a/src/sage/rings/number_field/maps.py b/src/sage/rings/number_field/maps.py
+index 1727c13..5717227 100644
+--- a/src/sage/rings/number_field/maps.py
++++ b/src/sage/rings/number_field/maps.py
+@@ -358,7 +358,7 @@ class MapRelativeNumberFieldToRelativeVectorSpace(NumberFieldIsomorphism):
+ g = g(beta).lift()
+ # Convert the coefficients to elements of the base field.
+ B, from_B, _ = K.absolute_base_field()
+- return self.codomain()([from_B(B(z.lift(), check=False)) for z in g.Vecrev(-K.relative_degree())])
++ return self.codomain()([from_B(B(z.lift(), check=False)) for z in g.Vecrev(K.relative_degree())])
+
+
+ class NameChangeMap(NumberFieldIsomorphism):
+diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx
+index 2b5504a..8bd32dd 100644
+--- a/src/sage/rings/polynomial/polynomial_element.pyx
++++ b/src/sage/rings/polynomial/polynomial_element.pyx
+@@ -4364,8 +4364,7 @@ cdef class Polynomial(CommutativeAlgebraElement):
+ sage: G.prod() == g
+ True
+ """
+- pols = G[0]
+- exps = G[1]
++ pols, exps = G
+ R = self._parent
+ F = [(R(f), int(e)) for f, e in zip(pols, exps)]
+
+diff --git a/src/sage/rings/power_series_pari.pyx b/src/sage/rings/power_series_pari.pyx
+index e37e0a3..2e03ade 100644
+--- a/src/sage/rings/power_series_pari.pyx
++++ b/src/sage/rings/power_series_pari.pyx
+@@ -678,7 +678,8 @@ cdef class PowerSeries_pari(PowerSeries):
+ g = g.truncate()
+ if typ(g.g) == t_POL and varn(g.g) == vn:
+ # t_POL has 2 codewords. Use new_ref instead of g[i] for speed.
+- return [R(g.new_ref(gel(g.g, i))) for i in range(2, lg(g.g))]
++ G = g.fixGEN()
++ return [R(g.new_ref(gel(G, i))) for i in range(2, lg(G))]
+ else:
+ return [R(g)]
+
+@@ -729,6 +730,7 @@ cdef class PowerSeries_pari(PowerSeries):
+ return []
+
+ cdef pari_gen g = self.g
++ g.fixGEN()
+ cdef long l, m
+
+ R = self.base_ring()
Deleted: sagemath-cython-0.29.patch
===================================================================
--- sagemath-cython-0.29.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-cython-0.29.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,65 +0,0 @@
-diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd
-index b8cc019..c7a1d8e 100644
---- a/src/sage/arith/long.pxd
-+++ b/src/sage/arith/long.pxd
-@@ -19,7 +19,7 @@ from cpython.object cimport Py_SIZE
- from cpython.int cimport PyInt_AS_LONG
- from cpython.long cimport PyLong_AsLong
- from cpython.number cimport PyNumber_Index, PyIndex_Check
--from cpython.longintrepr cimport PyLongObject, PyLong_SHIFT, digit
-+from cpython.longintrepr cimport py_long, PyLong_SHIFT, digit
-
- from sage.libs.gmp.mpz cimport mpz_fits_slong_p, mpz_get_si
- from sage.rings.integer_fake cimport is_Integer, Integer_AS_MPZ
-@@ -208,7 +208,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err):
- return 0
-
- # x is a Python "long" (called "int" on Python 3)
-- cdef const digit* D = (<PyLongObject*>x).ob_digit
-+ cdef const digit* D = (<py_long>x).ob_digit
- cdef Py_ssize_t size = Py_SIZE(x)
-
- # We assume that PyLong_SHIFT is 15 on a 32-bit system and 30 on a
-diff --git a/src/sage/libs/gmp/pylong.pyx b/src/sage/libs/gmp/pylong.pyx
-index 168e485..9c214f6 100644
---- a/src/sage/libs/gmp/pylong.pyx
-+++ b/src/sage/libs/gmp/pylong.pyx
-@@ -28,7 +28,7 @@ AUTHORS:
- from cpython.object cimport Py_SIZE
- from cpython.int cimport PyInt_FromLong
- from cpython.long cimport PyLong_FromLong
--from cpython.longintrepr cimport _PyLong_New, PyLongObject, digit, PyLong_SHIFT
-+from cpython.longintrepr cimport _PyLong_New, py_long, digit, PyLong_SHIFT
- from .mpz cimport *
-
- cdef extern from *:
-@@ -54,7 +54,7 @@ cdef mpz_get_pylong_large(mpz_srcptr z):
- cdef size_t nbits = mpz_sizeinbase(z, 2)
- cdef size_t pylong_size = (nbits + PyLong_SHIFT - 1) // PyLong_SHIFT
- L = _PyLong_New(pylong_size)
-- mpz_export((<PyLongObject*>L).ob_digit, NULL,
-+ mpz_export(L.ob_digit, NULL,
- -1, sizeof(digit), 0, PyLong_nails, z)
- if mpz_sgn(z) < 0:
- # Set correct size (use a pointer to hack around Cython's
-@@ -91,7 +91,7 @@ cdef int mpz_set_pylong(mpz_ptr z, L) except -1:
- if pylong_size < 0:
- pylong_size = -pylong_size
- mpz_import(z, pylong_size, -1, sizeof(digit), 0, PyLong_nails,
-- (<PyLongObject*>L).ob_digit)
-+ (<py_long>L).ob_digit)
- if Py_SIZE(L) < 0:
- mpz_neg(z, z)
-
-diff --git a/src/setup.py b/src/setup.py
-index 6a89cf8..bc8fe12 100755
---- a/src/setup.py
-+++ b/src/setup.py
-@@ -284,6 +284,7 @@ class sage_build_cython(Command):
- cdivision=True,
- embedsignature=True,
- fast_getattr=True,
-+ language_level="2",
- preliminary_late_includes_cy28=True,
- profile=self.profile,
- )
Copied: sagemath/repos/community-x86_64/sagemath-cython-0.29.patch (from rev 403206, sagemath/trunk/sagemath-cython-0.29.patch)
===================================================================
--- sagemath-cython-0.29.patch (rev 0)
+++ sagemath-cython-0.29.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,65 @@
+diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd
+index b8cc019..c7a1d8e 100644
+--- a/src/sage/arith/long.pxd
++++ b/src/sage/arith/long.pxd
+@@ -19,7 +19,7 @@ from cpython.object cimport Py_SIZE
+ from cpython.int cimport PyInt_AS_LONG
+ from cpython.long cimport PyLong_AsLong
+ from cpython.number cimport PyNumber_Index, PyIndex_Check
+-from cpython.longintrepr cimport PyLongObject, PyLong_SHIFT, digit
++from cpython.longintrepr cimport py_long, PyLong_SHIFT, digit
+
+ from sage.libs.gmp.mpz cimport mpz_fits_slong_p, mpz_get_si
+ from sage.rings.integer_fake cimport is_Integer, Integer_AS_MPZ
+@@ -208,7 +208,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err):
+ return 0
+
+ # x is a Python "long" (called "int" on Python 3)
+- cdef const digit* D = (<PyLongObject*>x).ob_digit
++ cdef const digit* D = (<py_long>x).ob_digit
+ cdef Py_ssize_t size = Py_SIZE(x)
+
+ # We assume that PyLong_SHIFT is 15 on a 32-bit system and 30 on a
+diff --git a/src/sage/libs/gmp/pylong.pyx b/src/sage/libs/gmp/pylong.pyx
+index 168e485..9c214f6 100644
+--- a/src/sage/libs/gmp/pylong.pyx
++++ b/src/sage/libs/gmp/pylong.pyx
+@@ -28,7 +28,7 @@ AUTHORS:
+ from cpython.object cimport Py_SIZE
+ from cpython.int cimport PyInt_FromLong
+ from cpython.long cimport PyLong_FromLong
+-from cpython.longintrepr cimport _PyLong_New, PyLongObject, digit, PyLong_SHIFT
++from cpython.longintrepr cimport _PyLong_New, py_long, digit, PyLong_SHIFT
+ from .mpz cimport *
+
+ cdef extern from *:
+@@ -54,7 +54,7 @@ cdef mpz_get_pylong_large(mpz_srcptr z):
+ cdef size_t nbits = mpz_sizeinbase(z, 2)
+ cdef size_t pylong_size = (nbits + PyLong_SHIFT - 1) // PyLong_SHIFT
+ L = _PyLong_New(pylong_size)
+- mpz_export((<PyLongObject*>L).ob_digit, NULL,
++ mpz_export(L.ob_digit, NULL,
+ -1, sizeof(digit), 0, PyLong_nails, z)
+ if mpz_sgn(z) < 0:
+ # Set correct size (use a pointer to hack around Cython's
+@@ -91,7 +91,7 @@ cdef int mpz_set_pylong(mpz_ptr z, L) except -1:
+ if pylong_size < 0:
+ pylong_size = -pylong_size
+ mpz_import(z, pylong_size, -1, sizeof(digit), 0, PyLong_nails,
+- (<PyLongObject*>L).ob_digit)
++ (<py_long>L).ob_digit)
+ if Py_SIZE(L) < 0:
+ mpz_neg(z, z)
+
+diff --git a/src/setup.py b/src/setup.py
+index 6a89cf8..bc8fe12 100755
+--- a/src/setup.py
++++ b/src/setup.py
+@@ -284,6 +284,7 @@ class sage_build_cython(Command):
+ cdivision=True,
+ embedsignature=True,
+ fast_getattr=True,
++ language_level="2",
+ preliminary_late_includes_cy28=True,
+ profile=self.profile,
+ )
Deleted: sagemath-env.patch
===================================================================
--- sagemath-env.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-env.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,172 +0,0 @@
---- src/bin/sage-env.orig 2015-01-06 10:46:04.469687605 +0100
-+++ src/bin/sage-env 2015-01-06 10:49:59.547762019 +0100
-@@ -111,41 +111,7 @@
- }
-
-
--# New value for SAGE_ROOT: either SAGE_ROOT (if given)
--# or a guessed value based on pwd.
--if [ -n "$SAGE_ROOT" ]; then
-- NEW_SAGE_ROOT="$SAGE_ROOT"
--elif [ -f sage -a -d build ]; then
-- NEW_SAGE_ROOT="."
--elif [ -f ../../sage -a -d ../../build ]; then
-- NEW_SAGE_ROOT="../.."
--else
-- # No idea what SAGE_ROOT should be...
-- echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
-- echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
-- return 1
--fi
--
--# Make NEW_SAGE_ROOT absolute
--NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
--
--# Sanity check NEW_SAGE_ROOT
--if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
-- :
--else
-- echo >&2 "Error: SAGE_ROOT is set to a bad value:"
-- echo >&2 "SAGE_ROOT=$SAGE_ROOT"
-- echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
-- echo >&2 "or SAGE_ROOT/local/bin/ directory."
-- return 1
--fi
--
--# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
--if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
-- echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
-- echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
-- echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
--fi
-+NEW_SAGE_ROOT="/usr"
-
-
- # Don't execute the commands more than once for the same version of
-@@ -174,33 +174,9 @@
- export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
-
- export SAGE_ROOT="$NEW_SAGE_ROOT"
-+export SAGE_LOCAL='/usr'
-+export SAGE_SCRIPTS_DIR='/usr/bin'
-
--
--# sage-env must know where the Sage's script files are.
--# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
--# be exported.
--if [ -z "$SAGE_SCRIPTS_DIR" ]; then
-- if [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
-- SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
-- elif [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
-- SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
-- else
-- echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
-- return 1
-- fi
--elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
-- echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
-- echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
-- echo >&2 "You must correct it or erase it and rerun this script"
-- return 1
--fi
--
--# Set environment variables (like SAGE_LOCAL) depending on ./configure
--. "$SAGE_SCRIPTS_DIR/sage-env-config"
--if [ $? -ne 0 ]; then
-- echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
-- return 1
--fi
-
- # The compilers are set in order of priority by
- # 1) environment variables
-@@ -296,8 +296,9 @@
- export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
- export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
- export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
--export SAGE_SRC="$SAGE_ROOT/src"
--export SAGE_DOC_SRC="$SAGE_SRC/doc"
-+export GAP_ROOT_DIR="/usr/lib/gap-4.8"
-+export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
-+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
- export SAGE_DOC="$SAGE_SHARE/doc/sage"
-
- if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
-@@ -403,29 +403,8 @@
- export SAGE_STARTUP_FILE
- fi
-
-+export LIBMTX="$DOT_SAGE/meataxe"
-+[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
--if [ "$PYTHON_EGG_CACHE" = "" ]; then
-- PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
-- export PYTHON_EGG_CACHE
--fi
--
--# Set PYTHONUSERBASE to avoid picking up non-Sage versions of
--# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612.
--#
--# For more history (it used to be PYTHONNOUSERSITE=yes which killed
--# the ability to do "sage -pip install PACKAGE --user"), see
--# http://trac.sagemath.org/ticket/14243 and
--# http://trac.sagemath.org/ticket/18955.
--
--if [ "$PYTHONUSERBASE" = "" ]; then
-- PYTHONUSERBASE="$DOT_SAGE/local"
-- export PYTHONUSERBASE
--fi
--
--if [ -n "$PYTHONHOME" ]; then
-- >&2 echo "Warning: PYTHONHOME must not be set when running Sage, clearing env..."
-- unset PYTHONHOME
--fi
--
- LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
- export LDFLAGS
-
-@@ -489,8 +489,6 @@
- fi
- fi
-
--export MAXIMA_PREFIX="$SAGE_LOCAL"
--export MAXIMA_USERDIR="$DOT_SAGE/maxima"
-
- PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
-
-@@ -601,9 +601,6 @@
- LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
- fi
-
--# See trac 7186 -- this is needed if ecl is moved
--ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
--
- # Handle parallel building/testing/...
- # See Trac Ticket #12016
- # First, figure out the right values for SAGE_NUM_THREADS (default
---- src/sage/env.py.orig 2017-12-07 19:51:25.554281539 +0000
-+++ src/sage/env.py 2017-12-07 19:51:42.787654650 +0000
-@@ -117,13 +117,13 @@
- _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
-
- # bunch of sage directories and files
--_add_variable_or_fallback('SAGE_ROOT', None)
--_add_variable_or_fallback('SAGE_LOCAL', None)
-+_add_variable_or_fallback('SAGE_ROOT', '')
-+_add_variable_or_fallback('SAGE_LOCAL', '/usr')
- _add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
- _add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
- _add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share'))
-
--_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_ROOT', 'src'))
-+_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_LOCAL', 'lib', 'python2.7', 'site-packages'))
-
- try:
- sitepackages_dirs = site.getsitepackages()
-@@ -164,7 +164,7 @@
- _add_variable_or_fallback('GRAPHS_DATA_DIR', opj('$SAGE_SHARE','graphs'))
- _add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
- _add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
--_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','gap','latest'))
-+_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','lib','gap-4.8'))
- _add_variable_or_fallback('THEBE_DIR', opj('$SAGE_SHARE','thebe'))
- _add_variable_or_fallback('COMBINATORIAL_DESIGN_DATA_DIR', opj('$SAGE_SHARE', 'combinatorial_designs'))
- _add_variable_or_fallback('CREMONA_MINI_DATA_DIR', opj('$SAGE_SHARE', 'cremona'))
Copied: sagemath/repos/community-x86_64/sagemath-env.patch (from rev 403206, sagemath/trunk/sagemath-env.patch)
===================================================================
--- sagemath-env.patch (rev 0)
+++ sagemath-env.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,172 @@
+--- src/bin/sage-env.orig 2015-01-06 10:46:04.469687605 +0100
++++ src/bin/sage-env 2015-01-06 10:49:59.547762019 +0100
+@@ -111,41 +111,7 @@
+ }
+
+
+-# New value for SAGE_ROOT: either SAGE_ROOT (if given)
+-# or a guessed value based on pwd.
+-if [ -n "$SAGE_ROOT" ]; then
+- NEW_SAGE_ROOT="$SAGE_ROOT"
+-elif [ -f sage -a -d build ]; then
+- NEW_SAGE_ROOT="."
+-elif [ -f ../../sage -a -d ../../build ]; then
+- NEW_SAGE_ROOT="../.."
+-else
+- # No idea what SAGE_ROOT should be...
+- echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this"
+- echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory."
+- return 1
+-fi
+-
+-# Make NEW_SAGE_ROOT absolute
+-NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P`
+-
+-# Sanity check NEW_SAGE_ROOT
+-if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then
+- :
+-else
+- echo >&2 "Error: SAGE_ROOT is set to a bad value:"
+- echo >&2 "SAGE_ROOT=$SAGE_ROOT"
+- echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT"
+- echo >&2 "or SAGE_ROOT/local/bin/ directory."
+- return 1
+-fi
+-
+-# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT
+-if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then
+- echo >&2 "Warning: overwriting SAGE_ROOT environment variable:"
+- echo >&2 "Old SAGE_ROOT=$SAGE_ROOT"
+- echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT"
+-fi
++NEW_SAGE_ROOT="/usr"
+
+
+ # Don't execute the commands more than once for the same version of
+@@ -174,33 +174,9 @@
+ export SAGE_ENV_SOURCED=$SAGE_ENV_VERSION
+
+ export SAGE_ROOT="$NEW_SAGE_ROOT"
++export SAGE_LOCAL='/usr'
++export SAGE_SCRIPTS_DIR='/usr/bin'
+
+-
+-# sage-env must know where the Sage's script files are.
+-# Note that SAGE_SCRIPTS_DIR is only used here, so it does not need to
+-# be exported.
+-if [ -z "$SAGE_SCRIPTS_DIR" ]; then
+- if [ -n "$SAGE_LOCAL" ] && [ -f "$SAGE_LOCAL/bin/sage-env-config" ]; then
+- SAGE_SCRIPTS_DIR="$SAGE_LOCAL/bin"
+- elif [ -f "$SAGE_ROOT/src/bin/sage-env-config" ]; then
+- SAGE_SCRIPTS_DIR="$SAGE_ROOT/src/bin"
+- else
+- echo >&2 "Error: You must set either the SAGE_LOCAL or SAGE_SCRIPTS_DIR environment variable to run this"
+- return 1
+- fi
+-elif [ ! -f "$SAGE_SCRIPTS_DIR/sage-env-config" ]; then
+- echo >&2 "Error: SAGE_SCRIPTS_DIR is set to a bad value:"
+- echo >&2 "SAGE_SCRIPTS_DIR=$SAGE_SCRIPTS_DIR"
+- echo >&2 "You must correct it or erase it and rerun this script"
+- return 1
+-fi
+-
+-# Set environment variables (like SAGE_LOCAL) depending on ./configure
+-. "$SAGE_SCRIPTS_DIR/sage-env-config"
+-if [ $? -ne 0 ]; then
+- echo >&2 "Error: failed to source $SAGE_SCRIPTS_DIR/sage-env-config"
+- return 1
+-fi
+
+ # The compilers are set in order of priority by
+ # 1) environment variables
+@@ -296,8 +296,9 @@
+ export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed"
+ export SAGE_SPKG_SCRIPTS="$SAGE_LOCAL/var/lib/sage/scripts"
+ export SAGE_LOGS="$SAGE_ROOT/logs/pkgs"
+-export SAGE_SRC="$SAGE_ROOT/src"
+-export SAGE_DOC_SRC="$SAGE_SRC/doc"
++export GAP_ROOT_DIR="/usr/lib/gap-4.8"
++export SAGE_SRC="$SAGE_LOCAL/lib/python2.7/site-packages"
++export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage"
+ export SAGE_DOC="$SAGE_SHARE/doc/sage"
+
+ if [ -z "${SAGE_ORIG_PATH_SET}" ]; then
+@@ -403,29 +403,8 @@
+ export SAGE_STARTUP_FILE
+ fi
+
++export LIBMTX="$DOT_SAGE/meataxe"
++[[ -d $LIBMTX ]] || mkdir -p $LIBMTX # Create meataxe data dir
+-if [ "$PYTHON_EGG_CACHE" = "" ]; then
+- PYTHON_EGG_CACHE="$DOT_SAGE/.python-eggs"
+- export PYTHON_EGG_CACHE
+-fi
+-
+-# Set PYTHONUSERBASE to avoid picking up non-Sage versions of
+-# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612.
+-#
+-# For more history (it used to be PYTHONNOUSERSITE=yes which killed
+-# the ability to do "sage -pip install PACKAGE --user"), see
+-# http://trac.sagemath.org/ticket/14243 and
+-# http://trac.sagemath.org/ticket/18955.
+-
+-if [ "$PYTHONUSERBASE" = "" ]; then
+- PYTHONUSERBASE="$DOT_SAGE/local"
+- export PYTHONUSERBASE
+-fi
+-
+-if [ -n "$PYTHONHOME" ]; then
+- >&2 echo "Warning: PYTHONHOME must not be set when running Sage, clearing env..."
+- unset PYTHONHOME
+-fi
+-
+ LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS"
+ export LDFLAGS
+
+@@ -489,8 +489,6 @@
+ fi
+ fi
+
+-export MAXIMA_PREFIX="$SAGE_LOCAL"
+-export MAXIMA_USERDIR="$DOT_SAGE/maxima"
+
+ PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB
+
+@@ -601,9 +601,6 @@
+ LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH
+ fi
+
+-# See trac 7186 -- this is needed if ecl is moved
+-ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR
+-
+ # Handle parallel building/testing/...
+ # See Trac Ticket #12016
+ # First, figure out the right values for SAGE_NUM_THREADS (default
+--- src/sage/env.py.orig 2017-12-07 19:51:25.554281539 +0000
++++ src/sage/env.py 2017-12-07 19:51:42.787654650 +0000
+@@ -117,13 +117,13 @@
+ _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid())
+
+ # bunch of sage directories and files
+-_add_variable_or_fallback('SAGE_ROOT', None)
+-_add_variable_or_fallback('SAGE_LOCAL', None)
++_add_variable_or_fallback('SAGE_ROOT', '')
++_add_variable_or_fallback('SAGE_LOCAL', '/usr')
+ _add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
+ _add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include'))
+ _add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share'))
+
+-_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_ROOT', 'src'))
++_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_LOCAL', 'lib', 'python2.7', 'site-packages'))
+
+ try:
+ sitepackages_dirs = site.getsitepackages()
+@@ -164,7 +164,7 @@
+ _add_variable_or_fallback('GRAPHS_DATA_DIR', opj('$SAGE_SHARE','graphs'))
+ _add_variable_or_fallback('ELLCURVE_DATA_DIR',opj('$SAGE_SHARE','ellcurves'))
+ _add_variable_or_fallback('POLYTOPE_DATA_DIR',opj('$SAGE_SHARE','reflexive_polytopes'))
+-_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','gap','latest'))
++_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','lib','gap-4.8'))
+ _add_variable_or_fallback('THEBE_DIR', opj('$SAGE_SHARE','thebe'))
+ _add_variable_or_fallback('COMBINATORIAL_DESIGN_DATA_DIR', opj('$SAGE_SHARE', 'combinatorial_designs'))
+ _add_variable_or_fallback('CREMONA_MINI_DATA_DIR', opj('$SAGE_SHARE', 'cremona'))
Deleted: sagemath-gap-4.8.patch
===================================================================
--- sagemath-gap-4.8.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-gap-4.8.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,26 +0,0 @@
-diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py
-index 177fc1b6eb..51c67bdd09 100644
---- a/src/sage/interfaces/gap.py
-+++ b/src/sage/interfaces/gap.py
-@@ -202,7 +202,7 @@ import string
-
- first_try = True
-
--gap_cmd = "gap -r"
-+gap_cmd = "gap-4.8 -r"
- if platform.processor() == 'ia64' and os.path.exists('/usr/bin/prctl'):
- # suppress unaligned access to 0x..., ip=0x... warnings
- gap_cmd = 'prctl --unaligned=silent ' + gap_cmd
-diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
-index 7bffcfc00d..51dad178d5 100644
---- a/src/sage/libs/gap/util.pyx
-+++ b/src/sage/libs/gap/util.pyx
-@@ -170,7 +170,7 @@ def gap_root():
- if os.path.exists(GAP_ROOT_DIR):
- return GAP_ROOT_DIR
- print('The gap-4.5.5.spkg (or later) seems to be not installed!')
-- gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
-+ gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')).read().splitlines()
- gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
- gapdir = gapdir.split('"')[1]
- gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)
Copied: sagemath/repos/community-x86_64/sagemath-gap-4.8.patch (from rev 403206, sagemath/trunk/sagemath-gap-4.8.patch)
===================================================================
--- sagemath-gap-4.8.patch (rev 0)
+++ sagemath-gap-4.8.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,26 @@
+diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py
+index 177fc1b6eb..51c67bdd09 100644
+--- a/src/sage/interfaces/gap.py
++++ b/src/sage/interfaces/gap.py
+@@ -202,7 +202,7 @@ import string
+
+ first_try = True
+
+-gap_cmd = "gap -r"
++gap_cmd = "gap-4.8 -r"
+ if platform.processor() == 'ia64' and os.path.exists('/usr/bin/prctl'):
+ # suppress unaligned access to 0x..., ip=0x... warnings
+ gap_cmd = 'prctl --unaligned=silent ' + gap_cmd
+diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx
+index 7bffcfc00d..51dad178d5 100644
+--- a/src/sage/libs/gap/util.pyx
++++ b/src/sage/libs/gap/util.pyx
+@@ -170,7 +170,7 @@ def gap_root():
+ if os.path.exists(GAP_ROOT_DIR):
+ return GAP_ROOT_DIR
+ print('The gap-4.5.5.spkg (or later) seems to be not installed!')
+- gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap')).read().splitlines()
++ gap_sh = open(os.path.join(SAGE_LOCAL, 'bin', 'gap-4.8')).read().splitlines()
+ gapdir = filter(lambda dir:dir.strip().startswith('GAP_DIR'), gap_sh)[0]
+ gapdir = gapdir.split('"')[1]
+ gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)
Deleted: sagemath-lcalc-c++11.patch
===================================================================
--- sagemath-lcalc-c++11.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-lcalc-c++11.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,10 +0,0 @@
---- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
-@@ -1,6 +1,5 @@
- # Lcalc requires GNU extensions, it does not strictly conform to any
- # C++ standard: https://trac.sagemath.org/ticket/23341
--# distutils: extra_compile_args = -std=gnu++98
-
- cdef extern from "lcalc_sage.h":
- ctypedef struct doublevec "std::vector<double>":
-
Copied: sagemath/repos/community-x86_64/sagemath-lcalc-c++11.patch (from rev 403206, sagemath/trunk/sagemath-lcalc-c++11.patch)
===================================================================
--- sagemath-lcalc-c++11.patch (rev 0)
+++ sagemath-lcalc-c++11.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,10 @@
+--- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd
++++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd
+@@ -1,6 +1,5 @@
+ # Lcalc requires GNU extensions, it does not strictly conform to any
+ # C++ standard: https://trac.sagemath.org/ticket/23341
+-# distutils: extra_compile_args = -std=gnu++98
+
+ cdef extern from "lcalc_sage.h":
+ ctypedef struct doublevec "std::vector<double>":
+
Deleted: sagemath-networkx-2.2.patch
===================================================================
--- sagemath-networkx-2.2.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-networkx-2.2.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,224 +0,0 @@
-diff --git a/src/sage/graphs/digraph_generators.py b/src/sage/graphs/digraph_generators.py
-index d0023e9..a478727 100644
---- a/src/sage/graphs/digraph_generators.py
-+++ b/src/sage/graphs/digraph_generators.py
-@@ -1108,7 +1108,7 @@ class DiGraphGenerators():
-
- - ``kernel`` - the attachment kernel
-
-- - ``seed`` - for the random number generator
-+ - ``seed`` - a ``random.Random`` seed for the random number generator
-
-
- EXAMPLES::
-@@ -1124,7 +1124,7 @@ class DiGraphGenerators():
- Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return DiGraph(networkx.gn_graph(n, kernel, seed=seed))
-
-@@ -1144,7 +1144,7 @@ class DiGraphGenerators():
-
- - ``n`` - number of vertices.
-
-- - ``seed`` - for the random number generator
-+ - ``seed`` - a ``random.Random`` seed for the random number generator
-
-
- EXAMPLES::
-@@ -1160,7 +1160,7 @@ class DiGraphGenerators():
- Copying, Phys. Rev. E vol. 71 (2005), p. 036118.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return DiGraph(networkx.gnc_graph(n, seed=seed))
-
-@@ -1355,7 +1355,7 @@ class DiGraphGenerators():
-
- - ``p`` - redirection probability
-
-- - ``seed`` - for the random number generator.
-+ - ``seed`` - a ``random.Random`` seed for the random number generator.
-
-
- EXAMPLES::
-@@ -1371,7 +1371,7 @@ class DiGraphGenerators():
- Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return DiGraph(networkx.gnc_graph(n, seed=seed))
-
-diff --git a/src/sage/graphs/generators/random.py b/src/sage/graphs/generators/random.py
-index 06a5203..5b1e3ce 100644
---- a/src/sage/graphs/generators/random.py
-+++ b/src/sage/graphs/generators/random.py
-@@ -30,7 +30,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'):
-
- - ``p`` -- probability of an edge
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- - ``fast`` -- boolean set to True (default) to use the algorithm with
- time complexity in `O(n+m)` proposed in [BatBra2005]_. It is designed
-@@ -106,7 +106,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'):
- raise ValueError("The probability p must be in [0..1].")
-
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- if p == 1:
- from sage.graphs.generators.basic import CompleteGraph
- return CompleteGraph(n)
-@@ -140,7 +140,7 @@ def RandomBarabasiAlbert(n, m, seed=None):
-
- - ``m`` - number of edges to attach from each new node
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES:
-
-@@ -175,7 +175,7 @@ def RandomBarabasiAlbert(n, m, seed=None):
-
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return Graph(networkx.barabasi_albert_graph(n,m,seed=seed))
-
-@@ -625,7 +625,7 @@ def RandomGNM(n, m, dense=False, seed=None):
- - ``dense`` - whether to use NetworkX's
- dense_gnm_random_graph or gnm_random_graph
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES: We show the edge list of a random graph on 5 nodes with
- 10 edges.
-@@ -658,7 +658,7 @@ def RandomGNM(n, m, dense=False, seed=None):
- sage: G.show() # long time
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- if dense:
- return Graph(networkx.dense_gnm_random_graph(n, m, seed=seed))
-@@ -688,7 +688,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None):
- - ``p`` - the probability of adding a new edge for
- each edge
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES: We show the edge list of a random graph on 7 nodes with 2
- "nearest neighbors" and probability `p = 0.2`::
-@@ -708,7 +708,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None):
- 99, 2566-2572.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return Graph(networkx.newman_watts_strogatz_graph(n, k, p, seed=seed))
-
-@@ -728,7 +728,7 @@ def RandomHolmeKim(n, m, p, seed=None):
- - ``p`` - probability of adding a triangle after
- adding a random edge.
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- From the NetworkX documentation: The average clustering has a hard
- time getting above a certain cutoff that depends on m. This cutoff
-@@ -764,7 +764,7 @@ def RandomHolmeKim(n, m, p, seed=None):
- with tunable clustering, Phys. Rev. E (2002). vol 65, no 2, 026107.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return Graph(networkx.powerlaw_cluster_graph(n, m, p, seed=seed))
-
-@@ -838,7 +838,7 @@ def RandomLobster(n, p, q, seed=None):
- - ``q`` - probability of adding an edge (claw) to the
- arms
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES: We show the edge list of a random graph with 3 backbone
- nodes and probabilities `p = 0.7` and `q = 0.3`::
-@@ -852,7 +852,7 @@ def RandomLobster(n, p, q, seed=None):
- sage: G.show() # long time
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return Graph(networkx.random_lobster(n, p, q, seed=seed))
-
-@@ -943,7 +943,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None):
- - ``tries`` - number of attempts to adjust sequence to
- make a tree
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES: We show the edge list of a random graph with 10 nodes and
- a power law exponent of 2.
-@@ -960,7 +960,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None):
- ....: G.show() # random output, long time
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- try:
- return Graph(networkx.random_powerlaw_tree(n, gamma, seed=seed, tries=tries))
-@@ -981,7 +981,7 @@ def RandomRegular(d, n, seed=None):
-
- - ``d`` - degree
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
-
- EXAMPLES: We show the edge list of a random graph with 8 nodes each
-@@ -1009,7 +1009,7 @@ def RandomRegular(d, n, seed=None):
- regular graphs quickly. Prob. and Comp. 8 (1999), pp 377-396.
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- try:
- N = networkx.random_regular_graph(d, n, seed=seed)
-@@ -1034,7 +1034,7 @@ def RandomShell(constructor, seed=None):
- - ``d`` - the ratio of inter (next) shell edges to
- intra shell edges
-
-- - ``seed`` -- integer seed for random number generator (default ``None``).
-+ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
-
- EXAMPLES::
-
-@@ -1044,7 +1044,7 @@ def RandomShell(constructor, seed=None):
- sage: G.show() # long time
- """
- if seed is None:
-- seed = current_randstate().long_seed()
-+ seed = current_randstate().c_random()
- import networkx
- return Graph(networkx.random_shell_graph(constructor, seed=seed))
-
Copied: sagemath/repos/community-x86_64/sagemath-networkx-2.2.patch (from rev 403206, sagemath/trunk/sagemath-networkx-2.2.patch)
===================================================================
--- sagemath-networkx-2.2.patch (rev 0)
+++ sagemath-networkx-2.2.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,224 @@
+diff --git a/src/sage/graphs/digraph_generators.py b/src/sage/graphs/digraph_generators.py
+index d0023e9..a478727 100644
+--- a/src/sage/graphs/digraph_generators.py
++++ b/src/sage/graphs/digraph_generators.py
+@@ -1108,7 +1108,7 @@ class DiGraphGenerators():
+
+ - ``kernel`` - the attachment kernel
+
+- - ``seed`` - for the random number generator
++ - ``seed`` - a ``random.Random`` seed for the random number generator
+
+
+ EXAMPLES::
+@@ -1124,7 +1124,7 @@ class DiGraphGenerators():
+ Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return DiGraph(networkx.gn_graph(n, kernel, seed=seed))
+
+@@ -1144,7 +1144,7 @@ class DiGraphGenerators():
+
+ - ``n`` - number of vertices.
+
+- - ``seed`` - for the random number generator
++ - ``seed`` - a ``random.Random`` seed for the random number generator
+
+
+ EXAMPLES::
+@@ -1160,7 +1160,7 @@ class DiGraphGenerators():
+ Copying, Phys. Rev. E vol. 71 (2005), p. 036118.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return DiGraph(networkx.gnc_graph(n, seed=seed))
+
+@@ -1355,7 +1355,7 @@ class DiGraphGenerators():
+
+ - ``p`` - redirection probability
+
+- - ``seed`` - for the random number generator.
++ - ``seed`` - a ``random.Random`` seed for the random number generator.
+
+
+ EXAMPLES::
+@@ -1371,7 +1371,7 @@ class DiGraphGenerators():
+ Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return DiGraph(networkx.gnc_graph(n, seed=seed))
+
+diff --git a/src/sage/graphs/generators/random.py b/src/sage/graphs/generators/random.py
+index 06a5203..5b1e3ce 100644
+--- a/src/sage/graphs/generators/random.py
++++ b/src/sage/graphs/generators/random.py
+@@ -30,7 +30,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'):
+
+ - ``p`` -- probability of an edge
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ - ``fast`` -- boolean set to True (default) to use the algorithm with
+ time complexity in `O(n+m)` proposed in [BatBra2005]_. It is designed
+@@ -106,7 +106,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'):
+ raise ValueError("The probability p must be in [0..1].")
+
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ if p == 1:
+ from sage.graphs.generators.basic import CompleteGraph
+ return CompleteGraph(n)
+@@ -140,7 +140,7 @@ def RandomBarabasiAlbert(n, m, seed=None):
+
+ - ``m`` - number of edges to attach from each new node
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES:
+
+@@ -175,7 +175,7 @@ def RandomBarabasiAlbert(n, m, seed=None):
+
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return Graph(networkx.barabasi_albert_graph(n,m,seed=seed))
+
+@@ -625,7 +625,7 @@ def RandomGNM(n, m, dense=False, seed=None):
+ - ``dense`` - whether to use NetworkX's
+ dense_gnm_random_graph or gnm_random_graph
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES: We show the edge list of a random graph on 5 nodes with
+ 10 edges.
+@@ -658,7 +658,7 @@ def RandomGNM(n, m, dense=False, seed=None):
+ sage: G.show() # long time
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ if dense:
+ return Graph(networkx.dense_gnm_random_graph(n, m, seed=seed))
+@@ -688,7 +688,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None):
+ - ``p`` - the probability of adding a new edge for
+ each edge
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES: We show the edge list of a random graph on 7 nodes with 2
+ "nearest neighbors" and probability `p = 0.2`::
+@@ -708,7 +708,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None):
+ 99, 2566-2572.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return Graph(networkx.newman_watts_strogatz_graph(n, k, p, seed=seed))
+
+@@ -728,7 +728,7 @@ def RandomHolmeKim(n, m, p, seed=None):
+ - ``p`` - probability of adding a triangle after
+ adding a random edge.
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ From the NetworkX documentation: The average clustering has a hard
+ time getting above a certain cutoff that depends on m. This cutoff
+@@ -764,7 +764,7 @@ def RandomHolmeKim(n, m, p, seed=None):
+ with tunable clustering, Phys. Rev. E (2002). vol 65, no 2, 026107.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return Graph(networkx.powerlaw_cluster_graph(n, m, p, seed=seed))
+
+@@ -838,7 +838,7 @@ def RandomLobster(n, p, q, seed=None):
+ - ``q`` - probability of adding an edge (claw) to the
+ arms
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES: We show the edge list of a random graph with 3 backbone
+ nodes and probabilities `p = 0.7` and `q = 0.3`::
+@@ -852,7 +852,7 @@ def RandomLobster(n, p, q, seed=None):
+ sage: G.show() # long time
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return Graph(networkx.random_lobster(n, p, q, seed=seed))
+
+@@ -943,7 +943,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None):
+ - ``tries`` - number of attempts to adjust sequence to
+ make a tree
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES: We show the edge list of a random graph with 10 nodes and
+ a power law exponent of 2.
+@@ -960,7 +960,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None):
+ ....: G.show() # random output, long time
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ try:
+ return Graph(networkx.random_powerlaw_tree(n, gamma, seed=seed, tries=tries))
+@@ -981,7 +981,7 @@ def RandomRegular(d, n, seed=None):
+
+ - ``d`` - degree
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+
+ EXAMPLES: We show the edge list of a random graph with 8 nodes each
+@@ -1009,7 +1009,7 @@ def RandomRegular(d, n, seed=None):
+ regular graphs quickly. Prob. and Comp. 8 (1999), pp 377-396.
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ try:
+ N = networkx.random_regular_graph(d, n, seed=seed)
+@@ -1034,7 +1034,7 @@ def RandomShell(constructor, seed=None):
+ - ``d`` - the ratio of inter (next) shell edges to
+ intra shell edges
+
+- - ``seed`` -- integer seed for random number generator (default ``None``).
++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``).
+
+ EXAMPLES::
+
+@@ -1044,7 +1044,7 @@ def RandomShell(constructor, seed=None):
+ sage: G.show() # long time
+ """
+ if seed is None:
+- seed = current_randstate().long_seed()
++ seed = current_randstate().c_random()
+ import networkx
+ return Graph(networkx.random_shell_graph(constructor, seed=seed))
+
Deleted: sagemath-numpy-1.15.patch
===================================================================
--- sagemath-numpy-1.15.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-numpy-1.15.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,912 +0,0 @@
-diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
-index d64a4ac..ee729b0 100644
---- a/src/doc/en/faq/faq-usage.rst
-+++ b/src/doc/en/faq/faq-usage.rst
-@@ -341,7 +341,7 @@ ints. For example::
- sage: RealNumber = float; Integer = int
- sage: from scipy import stats
- sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
-- Ttest_indResult(statistic=0.076752955645333687, pvalue=0.94070490247380478)
-+ Ttest_indResult(statistic=0.0767529..., pvalue=0.940704...)
- sage: stats.uniform(0,15).ppf([0.5,0.7])
- array([ 7.5, 10.5])
-
-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-index 314811c..e5f54ec 100644
---- a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-+++ b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
-@@ -48,11 +48,13 @@ we could do the following.
- sage: B = numpy.array([1.0]*5)
- sage: B.shape=(5,1)
- sage: print(B)
-- [[ 1.]
-- [ 1.]
-- [ 1.]
-- [ 1.]
-- [ 1.]]
-+ [[1.]
-+ [1.]
-+ [1.]
-+ [1.]
-+ [1.]]
-+
-+
- sage: print(A)
- [ 2.00e+00 3.00e+00 0 0 0 ]
- [ 3.00e+00 0 4.00e+00 0 6.00e+00]
-diff --git a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-index 5b89cd7..e50b2ea 100644
---- a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-+++ b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
-@@ -84,7 +84,7 @@ well as take slices
- sage: l[3]
- 3.0
- sage: l[3:6]
-- array([ 3., 4., 5.])
-+ array([3., 4., 5.])
-
- You can do basic arithmetic operations
-
-@@ -147,11 +147,11 @@ also do matrix vector multiplication, and matrix addition
- sage: n = numpy.matrix([[1,2],[3,4]],dtype=float)
- sage: v = numpy.array([[1],[2]],dtype=float)
- sage: n*v
-- matrix([[ 5.],
-- [ 11.]])
-+ matrix([[ 5.],
-+ [11.]])
- sage: n+n
-- matrix([[ 2., 4.],
-- [ 6., 8.]])
-+ matrix([[2., 4.],
-+ [6., 8.]])
-
- If ``n`` was created with :meth:`numpy.array`, then to do matrix vector
- multiplication, you would use ``numpy.dot(n,v)``.
-@@ -170,11 +170,11 @@ to manipulate
- 22., 23., 24.])
- sage: n.shape=(5,5)
- sage: n
-- array([[ 0., 1., 2., 3., 4.],
-- [ 5., 6., 7., 8., 9.],
-- [ 10., 11., 12., 13., 14.],
-- [ 15., 16., 17., 18., 19.],
-- [ 20., 21., 22., 23., 24.]])
-+ array([[ 0., 1., 2., 3., 4.],
-+ [ 5., 6., 7., 8., 9.],
-+ [10., 11., 12., 13., 14.],
-+ [15., 16., 17., 18., 19.],
-+ [20., 21., 22., 23., 24.]])
-
- This changes the one-dimensional array into a `5\times 5` array.
-
-@@ -187,8 +187,8 @@ NumPy arrays can be sliced as well
- sage: n=numpy.array(range(25),dtype=float)
- sage: n.shape=(5,5)
- sage: n[2:4,1:3]
-- array([[ 11., 12.],
-- [ 16., 17.]])
-+ array([[11., 12.],
-+ [16., 17.]])
-
- It is important to note that the sliced matrices are references to
- the original
-@@ -224,8 +224,8 @@ Some particularly useful commands are
-
- sage: x=numpy.arange(0,2,.1,dtype=float)
- sage: x
-- array([ 0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ,
-- 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
-+ array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2,
-+ 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
-
- You can see that :meth:`numpy.arange` creates an array of floats increasing by 0.1
- from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained by example
-@@ -240,10 +240,11 @@ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained b
- sage: Integer=int
- sage: n=r_[0.0:5.0]
- sage: n
-- array([ 0., 1., 2., 3., 4.])
-+ array([0., 1., 2., 3., 4.])
- sage: n=r_[0.0:5.0, [0.0]*5]
- sage: n
-- array([ 0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
-+ array([0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
-+
-
- :meth:`numpy.r_` provides a shorthand for constructing NumPy arrays efficiently.
- Note in the above ``0.0:5.0`` was shorthand for ``0.0, 1.0, 2.0, 3.0, 4.0``.
-@@ -255,7 +256,7 @@ intervals. We can do this as follows
- ::
-
- sage: r_[0.0:5.0:11*j]
-- array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
-+ array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
-
- The notation ``0.0:5.0:11*j`` expands to a list of 11 equally space
- points between 0 and 5 including both endpoints. Note that ``j`` is the
-@@ -287,23 +288,23 @@ an equally spaced grid with `\Delta x = \Delta y = .25` for
- sage: y=numpy.r_[0.0:1.0:5*j]
- sage: xx,yy= meshgrid(x,y)
- sage: xx
-- array([[ 0. , 0.25, 0.5 , 0.75, 1. ],
-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
-- [ 0. , 0.25, 0.5 , 0.75, 1. ],
-- [ 0. , 0.25, 0.5 , 0.75, 1. ]])
-+ array([[0. , 0.25, 0.5 , 0.75, 1. ],
-+ [0. , 0.25, 0.5 , 0.75, 1. ],
-+ [0. , 0.25, 0.5 , 0.75, 1. ],
-+ [0. , 0.25, 0.5 , 0.75, 1. ],
-+ [0. , 0.25, 0.5 , 0.75, 1. ]])
- sage: yy
-- array([[ 0. , 0. , 0. , 0. , 0. ],
-- [ 0.25, 0.25, 0.25, 0.25, 0.25],
-- [ 0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
-- [ 0.75, 0.75, 0.75, 0.75, 0.75],
-- [ 1. , 1. , 1. , 1. , 1. ]])
-+ array([[0. , 0. , 0. , 0. , 0. ],
-+ [0.25, 0.25, 0.25, 0.25, 0.25],
-+ [0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
-+ [0.75, 0.75, 0.75, 0.75, 0.75],
-+ [1. , 1. , 1. , 1. , 1. ]])
- sage: f(xx,yy)
-- array([[ 0. , 0.0625, 0.25 , 0.5625, 1. ],
-- [ 0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
-- [ 0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
-- [ 0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
-- [ 1. , 1.0625, 1.25 , 1.5625, 2. ]])
-+ array([[0. , 0.0625, 0.25 , 0.5625, 1. ],
-+ [0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
-+ [0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
-+ [0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
-+ [1. , 1.0625, 1.25 , 1.5625, 2. ]])
-
- You can see that :meth:`numpy.meshgrid` produces a pair of matrices, here denoted
- `xx` and `yy`, such that `(xx[i,j],yy[i,j])` has coordinates
-@@ -324,7 +325,7 @@ equation `Ax=b` do
- sage: b=numpy.array(range(1,6))
- sage: x=linalg.solve(A,b)
- sage: numpy.dot(A,x)
-- array([ 1., 2., 3., 4., 5.])
-+ array([1., 2., 3., 4., 5.])
-
- This creates a random 5x5 matrix ``A``, and solves `Ax=b` where
- ``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg`
-diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx
-index 60f37f7..4ac3ded 100644
---- a/src/sage/calculus/riemann.pyx
-+++ b/src/sage/calculus/riemann.pyx
-@@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
- sage: zval = numpy.array([[0, 1, 1000],[.2+.3j,1,-.3j],[0,0,0]],dtype = numpy.complex128)
- sage: deriv = numpy.array([[.1]],dtype = numpy.float64)
- sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,False,0.001)
-- array([[[ 1., 1., 1.],
-- [ 1., 1., 1.],
-- [ 1., 1., 1.]],
-+ array([[[1., 1., 1.],
-+ [1., 1., 1.],
-+ [1., 1., 1.]],
- <BLANKLINE>
-- [[ 1., 1., 1.],
-- [ 0., 0., 0.],
-- [ 1., 1., 1.]],
-+ [[1., 1., 1.],
-+ [0., 0., 0.],
-+ [1., 1., 1.]],
- <BLANKLINE>
-- [[ 1., 1., 1.],
-- [ 1., 1., 1.],
-- [ 1., 1., 1.]]])
-+ [[1., 1., 1.],
-+ [1., 1., 1.],
-+ [1., 1., 1.]]])
-
- sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,True,0.001)
-- array([[[ 1. , 1. , 1. ],
-- [ 1. , 0.05558355, 0.05558355],
-- [ 0.17301243, 0. , 0. ]],
-+ array([[[1. , 1. , 1. ],
-+ [1. , 0.05558355, 0.05558355],
-+ [0.17301243, 0. , 0. ]],
- <BLANKLINE>
-- [[ 1. , 0.96804683, 0.48044583],
-- [ 0. , 0. , 0. ],
-- [ 0.77351965, 0.5470393 , 1. ]],
-+ [[1. , 0.96804683, 0.48044583],
-+ [0. , 0. , 0. ],
-+ [0.77351965, 0.5470393 , 1. ]],
- <BLANKLINE>
-- [[ 1. , 1. , 1. ],
-- [ 1. , 1. , 1. ],
-- [ 1. , 1. , 1. ]]])
-+ [[1. , 1. , 1. ],
-+ [1. , 1. , 1. ],
-+ [1. , 1. , 1. ]]])
- """
- cdef Py_ssize_t i, j, imax, jmax
- cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
-@@ -1279,14 +1279,14 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim = 2] z_values):
- sage: from sage.calculus.riemann import complex_to_rgb
- sage: import numpy
- sage: complex_to_rgb(numpy.array([[0, 1, 1000]], dtype = numpy.complex128))
-- array([[[ 1. , 1. , 1. ],
-- [ 1. , 0.05558355, 0.05558355],
-- [ 0.17301243, 0. , 0. ]]])
-+ array([[[1. , 1. , 1. ],
-+ [1. , 0.05558355, 0.05558355],
-+ [0.17301243, 0. , 0. ]]])
-
- sage: complex_to_rgb(numpy.array([[0, 1j, 1000j]], dtype = numpy.complex128))
-- array([[[ 1. , 1. , 1. ],
-- [ 0.52779177, 1. , 0.05558355],
-- [ 0.08650622, 0.17301243, 0. ]]])
-+ array([[[1. , 1. , 1. ],
-+ [0.52779177, 1. , 0.05558355],
-+ [0.08650622, 0.17301243, 0. ]]])
-
-
- TESTS::
-diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
-index 37fb7aa..2569c0d 100644
---- a/src/sage/combinat/fully_packed_loop.py
-+++ b/src/sage/combinat/fully_packed_loop.py
-@@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False):
- sage: _make_color_list(5, ['blue', 'red'])
- ['blue', 'red', 'blue', 'red', 'blue']
- sage: _make_color_list(5, color_map='summer')
-- [(0.0, 0.5, 0.40000000000000002),
-- (0.25098039215686274, 0.62549019607843137, 0.40000000000000002),
-- (0.50196078431372548, 0.75098039215686274, 0.40000000000000002),
-- (0.75294117647058822, 0.87647058823529411, 0.40000000000000002),
-- (1.0, 1.0, 0.40000000000000002)]
-+ [(0.0, 0.5, 0.4),
-+ (0.25098039215686274, 0.6254901960784314, 0.4),
-+ (0.5019607843137255, 0.7509803921568627, 0.4),
-+ (0.7529411764705882, 0.8764705882352941, 0.4),
-+ (1.0, 1.0, 0.4)]
- sage: _make_color_list(8, ['blue', 'red'], randomize=True)
- ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue']
- """
-diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx
-index 2877936..3ab0282 100644
---- a/src/sage/finance/time_series.pyx
-+++ b/src/sage/finance/time_series.pyx
-@@ -111,8 +111,8 @@ cdef class TimeSeries:
-
- sage: import numpy
- sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
-- array([[ 1., 2.],
-- [ 3., 4.]])
-+ array([[1., 2.],
-+ [3., 4.]])
- sage: finance.TimeSeries(v)
- [1.0000, 2.0000, 3.0000, 4.0000]
- sage: finance.TimeSeries(v[:,0])
-@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
-
- sage: w[0] = 20
- sage: w
-- array([ 20. , -3. , 4.5, -2. ])
-+ array([20. , -3. , 4.5, -2. ])
- sage: v
- [20.0000, -3.0000, 4.5000, -2.0000]
-
- If you want a separate copy do not give the ``copy=False`` option. ::
-
- sage: z = v.numpy(); z
-- array([ 20. , -3. , 4.5, -2. ])
-+ array([20. , -3. , 4.5, -2. ])
- sage: z[0] = -10
- sage: v
- [20.0000, -3.0000, 4.5000, -2.0000]
-diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py
-index aff552f..7a6df93 100644
---- a/src/sage/functions/hyperbolic.py
-+++ b/src/sage/functions/hyperbolic.py
-@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: coth(a)
-- array([ 1.03731472, 1.00496982, 1.00067115])
-+ array([1.03731472, 1.00496982, 1.00067115])
- """
- return 1.0 / tanh(x)
-
-@@ -267,7 +267,7 @@ class Function_sech(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: sech(a)
-- array([ 0.26580223, 0.09932793, 0.03661899])
-+ array([0.26580223, 0.09932793, 0.03661899])
- """
- return 1.0 / cosh(x)
-
-@@ -318,7 +318,7 @@ class Function_csch(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: csch(a)
-- array([ 0.27572056, 0.09982157, 0.03664357])
-+ array([0.27572056, 0.09982157, 0.03664357])
- """
- return 1.0 / sinh(x)
-
-@@ -586,7 +586,7 @@ class Function_arccoth(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2,5)
- sage: acoth(a)
-- array([ 0.54930614, 0.34657359, 0.25541281])
-+ array([0.54930614, 0.34657359, 0.25541281])
- """
- return arctanh(1.0 / x)
-
-diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
-index bae363c..386ba4d 100644
---- a/src/sage/functions/orthogonal_polys.py
-+++ b/src/sage/functions/orthogonal_polys.py
-@@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction):
- sage: z2 = numpy.array([[1,2],[1,2]])
- sage: z3 = numpy.array([1,2,3.])
- sage: chebyshev_T(1,z)
-- array([ 1., 2.])
-+ array([1., 2.])
- sage: chebyshev_T(1,z2)
-- array([[ 1., 2.],
-- [ 1., 2.]])
-+ array([[1., 2.],
-+ [1., 2.]])
- sage: chebyshev_T(1,z3)
-- array([ 1., 2., 3.])
-+ array([1., 2., 3.])
- sage: chebyshev_T(z,0.1)
- array([ 0.1 , -0.98])
- """
-@@ -1095,12 +1095,12 @@ class Func_chebyshev_U(ChebyshevFunction):
- sage: z2 = numpy.array([[1,2],[1,2]])
- sage: z3 = numpy.array([1,2,3.])
- sage: chebyshev_U(1,z)
-- array([ 2., 4.])
-+ array([2., 4.])
- sage: chebyshev_U(1,z2)
-- array([[ 2., 4.],
-- [ 2., 4.]])
-+ array([[2., 4.],
-+ [2., 4.]])
- sage: chebyshev_U(1,z3)
-- array([ 2., 4., 6.])
-+ array([2., 4., 6.])
- sage: chebyshev_U(z,0.1)
- array([ 0.2 , -0.96])
- """
-diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
-index 1883daa..9885222 100644
---- a/src/sage/functions/other.py
-+++ b/src/sage/functions/other.py
-@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
- sage: import numpy
- sage: a = numpy.linspace(0,2,6)
- sage: ceil(a)
-- array([ 0., 1., 1., 2., 2., 2.])
-+ array([0., 1., 1., 2., 2., 2.])
-
- Test pickling::
-
-@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
- sage: import numpy
- sage: a = numpy.linspace(0,2,6)
- sage: floor(a)
-- array([ 0., 0., 0., 1., 1., 2.])
-+ array([0., 0., 0., 1., 1., 2.])
- sage: floor(x)._sympy_()
- floor(x)
-
-@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
- sage: import numpy
- sage: a = numpy.arange(2,5)
- sage: sqrt(a)
-- array([ 1.41421356, 1.73205081, 2. ])
-+ array([1.41421356, 1.73205081, 2. ])
- """
- if isinstance(x, float):
- return math.sqrt(x)
-diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py
-index 1e021de..56635ca 100644
---- a/src/sage/functions/spike_function.py
-+++ b/src/sage/functions/spike_function.py
-@@ -157,7 +157,7 @@ class SpikeFunction:
- sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
- A spike function with spikes at [-3.0, -1.0, 2.0]
- sage: P = S.plot_fft_abs(8)
-- sage: p = P[0]; p.ydata
-+ sage: p = P[0]; p.ydata # abs tol 1e-8
- [5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055]
- """
- w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
-@@ -176,8 +176,8 @@ class SpikeFunction:
- sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
- A spike function with spikes at [-3.0, -1.0, 2.0]
- sage: P = S.plot_fft_arg(8)
-- sage: p = P[0]; p.ydata
-- [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...]
-+ sage: p = P[0]; p.ydata # abs tol 1e-8
-+ [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477]
- """
- w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
- xmin, xmax = self._ranges(xmin, xmax)
-diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
-index 501e7ff..5f76091 100644
---- a/src/sage/functions/trig.py
-+++ b/src/sage/functions/trig.py
-@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: arccot(a)
-- array([ 0.46364761, 0.32175055, 0.24497866])
-+ array([0.46364761, 0.32175055, 0.24497866])
- """
- return math.pi/2 - arctan(x)
-
-@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: arccsc(a)
-- array([ 0.52359878, 0.33983691, 0.25268026])
-+ array([0.52359878, 0.33983691, 0.25268026])
- """
- return arcsin(1.0/x)
-
-@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
- sage: import numpy
- sage: a = numpy.arange(2, 5)
- sage: arcsec(a)
-- array([ 1.04719755, 1.23095942, 1.31811607])
-+ array([1.04719755, 1.23095942, 1.31811607])
- """
- return arccos(1.0/x)
-
-@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction):
- sage: a = numpy.linspace(1, 3, 3)
- sage: b = numpy.linspace(3, 6, 3)
- sage: atan2(a, b)
-- array([ 0.32175055, 0.41822433, 0.46364761])
-+ array([0.32175055, 0.41822433, 0.46364761])
-
- sage: atan2(1,a)
-- array([ 0.78539816, 0.46364761, 0.32175055])
-+ array([0.78539816, 0.46364761, 0.32175055])
-
- sage: atan2(a, 1)
-- array([ 0.78539816, 1.10714872, 1.24904577])
-+ array([0.78539816, 1.10714872, 1.24904577])
-
- TESTS::
-
-diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
-index 12136f1..491bf22 100644
---- a/src/sage/matrix/constructor.pyx
-+++ b/src/sage/matrix/constructor.pyx
-@@ -503,8 +503,8 @@ def matrix(*args, **kwds):
- [7 8 9]
- Full MatrixSpace of 3 by 3 dense matrices over Integer Ring
- sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n
-- array([[ 1. , 0.5 ],
-- [ 0.33333333, 0.25 ]])
-+ array([[1. , 0.5 ],
-+ [0.33333333, 0.25 ]])
- sage: matrix(QQ, n)
- [ 1 1/2]
- [1/3 1/4]
-diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx
-index c4d7368..8d51651 100644
---- a/src/sage/matrix/matrix_double_dense.pyx
-+++ b/src/sage/matrix/matrix_double_dense.pyx
-@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense):
- [ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]
- [6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]
- sage: B.condition()
-+ doctest:warning
-+ ...
-+ ComplexWarning: Casting complex values to real discards the imaginary part
- 203.851798...
- sage: B.condition(p='frob')
- 203.851798...
-@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense):
- True
- sage: B = A.change_ring(CDF)
- sage: B.condition()
-- Traceback (most recent call last):
-- ...
-- LinAlgError: Singular matrix
-+ +Infinity
-
- Improper values of ``p`` are caught. ::
-
-@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense):
- sage: P.is_unitary(algorithm='orthonormal')
- Traceback (most recent call last):
- ...
-- ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)
-+ error: ((lwork==-1)||(lwork >= MAX(1,2*n))) failed for 3rd keyword lwork: zgees:lwork=0
-
- TESTS::
-
-@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense):
- [0.0 1.0 2.0]
- [3.0 4.0 5.0]
- sage: m.numpy()
-- array([[ 0., 1., 2.],
-- [ 3., 4., 5.]])
-+ array([[0., 1., 2.],
-+ [3., 4., 5.]])
-
- Alternatively, numpy automatically calls this function (via
- the magic :meth:`__array__` method) to convert Sage matrices
-@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense):
- [0.0 1.0 2.0]
- [3.0 4.0 5.0]
- sage: numpy.array(m)
-- array([[ 0., 1., 2.],
-- [ 3., 4., 5.]])
-+ array([[0., 1., 2.],
-+ [3., 4., 5.]])
- sage: numpy.array(m).dtype
- dtype('float64')
- sage: m = matrix(CDF, 2, range(6)); m
- [0.0 1.0 2.0]
- [3.0 4.0 5.0]
- sage: numpy.array(m)
-- array([[ 0.+0.j, 1.+0.j, 2.+0.j],
-- [ 3.+0.j, 4.+0.j, 5.+0.j]])
-+ array([[0.+0.j, 1.+0.j, 2.+0.j],
-+ [3.+0.j, 4.+0.j, 5.+0.j]])
- sage: numpy.array(m).dtype
- dtype('complex128')
-
-diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
-index ccbd208..c3f9a65 100644
---- a/src/sage/matrix/special.py
-+++ b/src/sage/matrix/special.py
-@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
-
- sage: import numpy
- sage: entries = numpy.array([1.2, 5.6]); entries
-- array([ 1.2, 5.6])
-+ array([1.2, 5.6])
- sage: A = diagonal_matrix(3, entries); A
- [1.2 0.0 0.0]
- [0.0 5.6 0.0]
-@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
-
- sage: j = numpy.complex(0,1)
- sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries
-- array([ 2.0+1.j , 8.1+0.j , 3.4+2.6j])
-+ array([2. +1.j , 8.1+0.j , 3.4+2.6j])
- sage: A = diagonal_matrix(entries); A
- [2.0 + 1.0*I 0.0 0.0]
- [ 0.0 8.1 0.0]
-diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx
-index 37d92c1..955d083 100644
---- a/src/sage/modules/free_module_element.pyx
-+++ b/src/sage/modules/free_module_element.pyx
-@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
- sage: v.numpy()
- array([1, 2, 5/6], dtype=object)
- sage: v.numpy(dtype=float)
-- array([ 1. , 2. , 0.83333333])
-+ array([1. , 2. , 0.83333333])
- sage: v.numpy(dtype=int)
- array([1, 2, 0])
- sage: import numpy
-@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
- be more efficient but may have unintended consequences::
-
- sage: v.numpy(dtype=None)
-- array([ 1. , 2. , 0.83333333])
-+ array([1. , 2. , 0.83333333])
-
- sage: w = vector(ZZ, [0, 1, 2^63 -1]); w
- (0, 1, 9223372036854775807)
-diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx
-index 39fc297..2badf98 100644
---- a/src/sage/modules/vector_double_dense.pyx
-+++ b/src/sage/modules/vector_double_dense.pyx
-@@ -807,13 +807,13 @@ cdef class Vector_double_dense(FreeModuleElement):
-
- sage: v = vector(CDF,4,range(4))
- sage: v.numpy()
-- array([ 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
-+ array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
- sage: v = vector(CDF,0)
- sage: v.numpy()
- array([], dtype=complex128)
- sage: v = vector(RDF,4,range(4))
- sage: v.numpy()
-- array([ 0., 1., 2., 3.])
-+ array([0., 1., 2., 3.])
- sage: v = vector(RDF,0)
- sage: v.numpy()
- array([], dtype=float64)
-@@ -823,11 +823,11 @@ cdef class Vector_double_dense(FreeModuleElement):
- sage: import numpy
- sage: v = vector(CDF, 3, range(3))
- sage: v.numpy()
-- array([ 0.+0.j, 1.+0.j, 2.+0.j])
-+ array([0.+0.j, 1.+0.j, 2.+0.j])
- sage: v.numpy(dtype=numpy.float64)
-- array([ 0., 1., 2.])
-+ array([0., 1., 2.])
- sage: v.numpy(dtype=numpy.float32)
-- array([ 0., 1., 2.], dtype=float32)
-+ array([0., 1., 2.], dtype=float32)
- """
- if dtype is None or dtype is self._vector_numpy.dtype:
- from copy import copy
-diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
-index ad9693d..758fb70 100644
---- a/src/sage/plot/complex_plot.pyx
-+++ b/src/sage/plot/complex_plot.pyx
-@@ -61,9 +61,9 @@ cdef inline double mag_to_lightness(double r):
-
- sage: from sage.plot.complex_plot import complex_to_rgb
- sage: complex_to_rgb([[0, 1, 10]])
-- array([[[ 0. , 0. , 0. ],
-- [ 0.77172568, 0. , 0. ],
-- [ 1. , 0.22134776, 0.22134776]]])
-+ array([[[0. , 0. , 0. ],
-+ [0.77172568, 0. , 0. ],
-+ [1. , 0.22134776, 0.22134776]]])
- """
- return atan(log(sqrt(r)+1)) * (4/PI) - 1
-
-@@ -82,13 +82,13 @@ def complex_to_rgb(z_values):
-
- sage: from sage.plot.complex_plot import complex_to_rgb
- sage: complex_to_rgb([[0, 1, 1000]])
-- array([[[ 0. , 0. , 0. ],
-- [ 0.77172568, 0. , 0. ],
-- [ 1. , 0.64421177, 0.64421177]]])
-+ array([[[0. , 0. , 0. ],
-+ [0.77172568, 0. , 0. ],
-+ [1. , 0.64421177, 0.64421177]]])
- sage: complex_to_rgb([[0, 1j, 1000j]])
-- array([[[ 0. , 0. , 0. ],
-- [ 0.38586284, 0.77172568, 0. ],
-- [ 0.82210588, 1. , 0.64421177]]])
-+ array([[[0. , 0. , 0. ],
-+ [0.38586284, 0.77172568, 0. ],
-+ [0.82210588, 1. , 0.64421177]]])
- """
- import numpy
- cdef unsigned int i, j, imax, jmax
-diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
-index 5d28473..fc4b204 100644
---- a/src/sage/plot/histogram.py
-+++ b/src/sage/plot/histogram.py
-@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive):
- """
- import numpy as np
- self.datalist=np.asarray(datalist,dtype=float)
-+ if 'normed' in options:
-+ from sage.misc.superseded import deprecation
-+ deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.")
- if 'linestyle' in options:
- from sage.plot.misc import get_matplotlib_linestyle
- options['linestyle'] = get_matplotlib_linestyle(
- options['linestyle'], return_type='long')
-+ if options.get('range', None):
-+ # numpy.histogram performs type checks on "range" so this must be
-+ # actual floats
-+ options['range'] = [float(x) for x in options['range']]
- GraphicPrimitive.__init__(self, options)
-
- def get_minmax_data(self):
-@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive):
- {'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0}
-
- TESTS::
--
- sage: h = histogram([10,3,5], normed=True)[0]
-- sage: h.get_minmax_data() # rel tol 1e-15
-- {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0}
-+ doctest:warning...:
-+ DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
-+ See https://trac.sagemath.org/25260 for details.
-+ sage: h.get_minmax_data()
-+ doctest:warning ...:
-+ VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
-+ {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
- """
- import numpy
-
-@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive):
- 'rwidth': 'The relative width of the bars as a fraction of the bin width',
- 'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values. Negative values give a reversed direction of accumulation.',
- 'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.',
-- 'normed': 'Deprecated alias for density',
-+ 'normed': 'Deprecated. Use density instead.',
- 'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)',
- 'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.',
- 'stacked': '(True or False) If True, multiple data are stacked on top of each other.',
-@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive):
- subplot.hist(self.datalist.transpose(), **options)
-
-
-- at options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black')
-+ at options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black')
- def histogram(datalist, **options):
- """
- Computes and draws the histogram for list(s) of numerical data.
-@@ -231,8 +242,9 @@ def histogram(datalist, **options):
- - ``linewidth`` -- (float) width of the lines defining the bars
- - ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid'
- or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.'
-- - ``density`` -- (boolean - default: False) If True, the counts are
-- normalized to form a probability density.
-+ - ``density`` -- (boolean - default: False) If True, the result is the
-+ value of the probability density function at the bin, normalized such
-+ that the integral over the range is 1.
- - ``range`` -- A list [min, max] which define the range of the
- histogram. Values outside of this range are treated as outliers and
- omitted from counts
-diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py
-index 23f5e61..18695bb 100644
---- a/src/sage/plot/line.py
-+++ b/src/sage/plot/line.py
-@@ -502,14 +502,9 @@ def line2d(points, **options):
- from sage.plot.all import Graphics
- from sage.plot.plot import xydata_from_point_list
- from sage.rings.all import CC, CDF
-- if points in CC or points in CDF:
-- pass
-- else:
-- try:
-- if not points:
-- return Graphics()
-- except ValueError: # numpy raises a ValueError if not empty
-- pass
-+ points = list(points) # make sure points is a python list
-+ if len(points) == 0:
-+ return Graphics()
- xdata, ydata = xydata_from_point_list(points)
- g = Graphics()
- g._set_extra_kwds(Graphics._extract_kwds_for_show(options))
-diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py
-index 0025098..23c8090 100644
---- a/src/sage/plot/plot_field.py
-+++ b/src/sage/plot/plot_field.py
-@@ -49,9 +49,10 @@ class PlotField(GraphicPrimitive):
- sage: r.xpos_array
- [0.0, 0.0, 1.0, 1.0]
- sage: r.yvec_array
-- masked_array(data = [0.0 0.70710678118... 0.70710678118... 0.89442719...],
-- mask = [False False False False],
-- fill_value = 1e+20)
-+ masked_array(data=[0.0, 0.70710678118..., 0.70710678118...,
-+ 0.89442719...],
-+ mask=[False, False, False, False],
-+ fill_value=1e+20)
-
- TESTS:
-
-diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py
-index f3da57c..3806f4b 100644
---- a/src/sage/plot/streamline_plot.py
-+++ b/src/sage/plot/streamline_plot.py
-@@ -38,16 +38,14 @@ class StreamlinePlot(GraphicPrimitive):
- sage: r.options()['plot_points']
- 2
- sage: r.xpos_array
-- array([ 0., 1.])
-+ array([0., 1.])
- sage: r.yvec_array
-- masked_array(data =
-- [[1.0 1.0]
-- [0.5403023058681398 0.5403023058681398]],
-- mask =
-- [[False False]
-- [False False]],
-- fill_value = 1e+20)
-- <BLANKLINE>
-+ masked_array(
-+ data=[[1.0, 1.0],
-+ [0.5403023058681398, 0.5403023058681398]],
-+ mask=[[False, False],
-+ [False, False]],
-+ fill_value=1e+20)
-
- TESTS:
-
-diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
-index 1b119e3..3290b00 100644
---- a/src/sage/probability/probability_distribution.pyx
-+++ b/src/sage/probability/probability_distribution.pyx
-@@ -130,7 +130,17 @@ cdef class ProbabilityDistribution:
- 0.0,
- 1.4650000000000003]
- sage: b
-- [0.0, 0.20000000000000001, 0.40000000000000002, 0.60000000000000009, 0.80000000000000004, 1.0, 1.2000000000000002, 1.4000000000000001, 1.6000000000000001, 1.8, 2.0]
-+ [0.0,
-+ 0.2,
-+ 0.4,
-+ 0.6000000000000001,
-+ 0.8,
-+ 1.0,
-+ 1.2000000000000002,
-+ 1.4000000000000001,
-+ 1.6,
-+ 1.8,
-+ 2.0]
- """
- import pylab
- l = [float(self.get_random_element()) for _ in range(num_samples)]
-diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
-index 75e0861..8a7e7e9 100644
---- a/src/sage/rings/rational.pyx
-+++ b/src/sage/rings/rational.pyx
-@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
- dtype('O')
-
- sage: numpy.array([1, 1/2, 3/4])
-- array([ 1. , 0.5 , 0.75])
-+ array([1. , 0.5 , 0.75])
- """
- if mpz_cmp_ui(mpq_denref(self.value), 1) == 0:
- if mpz_fits_slong_p(mpq_numref(self.value)):
-diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx
-index 9b90c88..1ce05b9 100644
---- a/src/sage/rings/real_mpfr.pyx
-+++ b/src/sage/rings/real_mpfr.pyx
-@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
-
- sage: import numpy
- sage: numpy.arange(10.0)
-- array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
-+ array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
- sage: numpy.array([1.0, 1.1, 1.2]).dtype
- dtype('float64')
- sage: numpy.array([1.000000000000000000000000000000000000]).dtype
-diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py
-index de31fe9..7a33ea6 100644
---- a/src/sage/schemes/elliptic_curves/height.py
-+++ b/src/sage/schemes/elliptic_curves/height.py
-@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
- even::
-
- sage: H.wp_on_grid(v,4)
-- array([[ 25.43920182, 5.28760943, 5.28760943, 25.43920182],
-- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
-- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
-- [ 25.43920182, 5.28760943, 5.28760943, 25.43920182]])
-+ array([[25.43920182, 5.28760943, 5.28760943, 25.43920182],
-+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
-+ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
-+ [25.43920182, 5.28760943, 5.28760943, 25.43920182]])
-
- The array of values on the half-grid::
-
- sage: H.wp_on_grid(v,4,True)
-- array([[ 25.43920182, 5.28760943],
-- [ 6.05099485, 1.83757786],
-- [ 6.05099485, 1.83757786],
-- [ 25.43920182, 5.28760943]])
-+ array([[25.43920182, 5.28760943],
-+ [ 6.05099485, 1.83757786],
-+ [ 6.05099485, 1.83757786],
-+ [25.43920182, 5.28760943]])
- """
- tau = self.tau(v)
- fk, err = self.fk_intervals(v, 15, CDF)
-diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx
-index 9da3800..d61e74b 100644
---- a/src/sage/symbolic/ring.pyx
-+++ b/src/sage/symbolic/ring.pyx
-@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
- sage: cos(numpy.int('2'))
- cos(2)
- sage: numpy.cos(numpy.int('2'))
-- -0.41614683654714241
-+ -0.4161468365471424
- """
- cdef _intermediate_ring
Copied: sagemath/repos/community-x86_64/sagemath-numpy-1.15.patch (from rev 403206, sagemath/trunk/sagemath-numpy-1.15.patch)
===================================================================
--- sagemath-numpy-1.15.patch (rev 0)
+++ sagemath-numpy-1.15.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,912 @@
+diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst
+index d64a4ac..ee729b0 100644
+--- a/src/doc/en/faq/faq-usage.rst
++++ b/src/doc/en/faq/faq-usage.rst
+@@ -341,7 +341,7 @@ ints. For example::
+ sage: RealNumber = float; Integer = int
+ sage: from scipy import stats
+ sage: stats.ttest_ind(list([1,2,3,4,5]),list([2,3,4,5,.6]))
+- Ttest_indResult(statistic=0.076752955645333687, pvalue=0.94070490247380478)
++ Ttest_indResult(statistic=0.0767529..., pvalue=0.940704...)
+ sage: stats.uniform(0,15).ppf([0.5,0.7])
+ array([ 7.5, 10.5])
+
+diff --git a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
+b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
+index 314811c..e5f54ec 100644
+--- a/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
++++ b/src/doc/en/thematic_tutorials/numerical_sage/cvxopt.rst
+@@ -48,11 +48,13 @@ we could do the following.
+ sage: B = numpy.array([1.0]*5)
+ sage: B.shape=(5,1)
+ sage: print(B)
+- [[ 1.]
+- [ 1.]
+- [ 1.]
+- [ 1.]
+- [ 1.]]
++ [[1.]
++ [1.]
++ [1.]
++ [1.]
++ [1.]]
++
++
+ sage: print(A)
+ [ 2.00e+00 3.00e+00 0 0 0 ]
+ [ 3.00e+00 0 4.00e+00 0 6.00e+00]
+diff --git a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
+b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
+index 5b89cd7..e50b2ea 100644
+--- a/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
++++ b/src/doc/en/thematic_tutorials/numerical_sage/numpy.rst
+@@ -84,7 +84,7 @@ well as take slices
+ sage: l[3]
+ 3.0
+ sage: l[3:6]
+- array([ 3., 4., 5.])
++ array([3., 4., 5.])
+
+ You can do basic arithmetic operations
+
+@@ -147,11 +147,11 @@ also do matrix vector multiplication, and matrix addition
+ sage: n = numpy.matrix([[1,2],[3,4]],dtype=float)
+ sage: v = numpy.array([[1],[2]],dtype=float)
+ sage: n*v
+- matrix([[ 5.],
+- [ 11.]])
++ matrix([[ 5.],
++ [11.]])
+ sage: n+n
+- matrix([[ 2., 4.],
+- [ 6., 8.]])
++ matrix([[2., 4.],
++ [6., 8.]])
+
+ If ``n`` was created with :meth:`numpy.array`, then to do matrix vector
+ multiplication, you would use ``numpy.dot(n,v)``.
+@@ -170,11 +170,11 @@ to manipulate
+ 22., 23., 24.])
+ sage: n.shape=(5,5)
+ sage: n
+- array([[ 0., 1., 2., 3., 4.],
+- [ 5., 6., 7., 8., 9.],
+- [ 10., 11., 12., 13., 14.],
+- [ 15., 16., 17., 18., 19.],
+- [ 20., 21., 22., 23., 24.]])
++ array([[ 0., 1., 2., 3., 4.],
++ [ 5., 6., 7., 8., 9.],
++ [10., 11., 12., 13., 14.],
++ [15., 16., 17., 18., 19.],
++ [20., 21., 22., 23., 24.]])
+
+ This changes the one-dimensional array into a `5\times 5` array.
+
+@@ -187,8 +187,8 @@ NumPy arrays can be sliced as well
+ sage: n=numpy.array(range(25),dtype=float)
+ sage: n.shape=(5,5)
+ sage: n[2:4,1:3]
+- array([[ 11., 12.],
+- [ 16., 17.]])
++ array([[11., 12.],
++ [16., 17.]])
+
+ It is important to note that the sliced matrices are references to
+ the original
+@@ -224,8 +224,8 @@ Some particularly useful commands are
+
+ sage: x=numpy.arange(0,2,.1,dtype=float)
+ sage: x
+- array([ 0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ,
+- 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
++ array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. , 1.1, 1.2,
++ 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9])
+
+ You can see that :meth:`numpy.arange` creates an array of floats increasing by 0.1
+ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained by example
+@@ -240,10 +240,11 @@ from 0 to 2. There is a useful command :meth:`numpy.r_` that is best explained b
+ sage: Integer=int
+ sage: n=r_[0.0:5.0]
+ sage: n
+- array([ 0., 1., 2., 3., 4.])
++ array([0., 1., 2., 3., 4.])
+ sage: n=r_[0.0:5.0, [0.0]*5]
+ sage: n
+- array([ 0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
++ array([0., 1., 2., 3., 4., 0., 0., 0., 0., 0.])
++
+
+ :meth:`numpy.r_` provides a shorthand for constructing NumPy arrays efficiently.
+ Note in the above ``0.0:5.0`` was shorthand for ``0.0, 1.0, 2.0, 3.0, 4.0``.
+@@ -255,7 +256,7 @@ intervals. We can do this as follows
+ ::
+
+ sage: r_[0.0:5.0:11*j]
+- array([ 0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
++ array([0. , 0.5, 1. , 1.5, 2. , 2.5, 3. , 3.5, 4. , 4.5, 5. ])
+
+ The notation ``0.0:5.0:11*j`` expands to a list of 11 equally space
+ points between 0 and 5 including both endpoints. Note that ``j`` is the
+@@ -287,23 +288,23 @@ an equally spaced grid with `\Delta x = \Delta y = .25` for
+ sage: y=numpy.r_[0.0:1.0:5*j]
+ sage: xx,yy= meshgrid(x,y)
+ sage: xx
+- array([[ 0. , 0.25, 0.5 , 0.75, 1. ],
+- [ 0. , 0.25, 0.5 , 0.75, 1. ],
+- [ 0. , 0.25, 0.5 , 0.75, 1. ],
+- [ 0. , 0.25, 0.5 , 0.75, 1. ],
+- [ 0. , 0.25, 0.5 , 0.75, 1. ]])
++ array([[0. , 0.25, 0.5 , 0.75, 1. ],
++ [0. , 0.25, 0.5 , 0.75, 1. ],
++ [0. , 0.25, 0.5 , 0.75, 1. ],
++ [0. , 0.25, 0.5 , 0.75, 1. ],
++ [0. , 0.25, 0.5 , 0.75, 1. ]])
+ sage: yy
+- array([[ 0. , 0. , 0. , 0. , 0. ],
+- [ 0.25, 0.25, 0.25, 0.25, 0.25],
+- [ 0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
+- [ 0.75, 0.75, 0.75, 0.75, 0.75],
+- [ 1. , 1. , 1. , 1. , 1. ]])
++ array([[0. , 0. , 0. , 0. , 0. ],
++ [0.25, 0.25, 0.25, 0.25, 0.25],
++ [0.5 , 0.5 , 0.5 , 0.5 , 0.5 ],
++ [0.75, 0.75, 0.75, 0.75, 0.75],
++ [1. , 1. , 1. , 1. , 1. ]])
+ sage: f(xx,yy)
+- array([[ 0. , 0.0625, 0.25 , 0.5625, 1. ],
+- [ 0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
+- [ 0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
+- [ 0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
+- [ 1. , 1.0625, 1.25 , 1.5625, 2. ]])
++ array([[0. , 0.0625, 0.25 , 0.5625, 1. ],
++ [0.0625, 0.125 , 0.3125, 0.625 , 1.0625],
++ [0.25 , 0.3125, 0.5 , 0.8125, 1.25 ],
++ [0.5625, 0.625 , 0.8125, 1.125 , 1.5625],
++ [1. , 1.0625, 1.25 , 1.5625, 2. ]])
+
+ You can see that :meth:`numpy.meshgrid` produces a pair of matrices, here denoted
+ `xx` and `yy`, such that `(xx[i,j],yy[i,j])` has coordinates
+@@ -324,7 +325,7 @@ equation `Ax=b` do
+ sage: b=numpy.array(range(1,6))
+ sage: x=linalg.solve(A,b)
+ sage: numpy.dot(A,x)
+- array([ 1., 2., 3., 4., 5.])
++ array([1., 2., 3., 4., 5.])
+
+ This creates a random 5x5 matrix ``A``, and solves `Ax=b` where
+ ``b=[0.0,1.0,2.0,3.0,4.0]``. There are many other routines in the :mod:`numpy.linalg`
+diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx
+index 60f37f7..4ac3ded 100644
+--- a/src/sage/calculus/riemann.pyx
++++ b/src/sage/calculus/riemann.pyx
+@@ -1191,30 +1191,30 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
+ sage: zval = numpy.array([[0, 1, 1000],[.2+.3j,1,-.3j],[0,0,0]],dtype = numpy.complex128)
+ sage: deriv = numpy.array([[.1]],dtype = numpy.float64)
+ sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,False,0.001)
+- array([[[ 1., 1., 1.],
+- [ 1., 1., 1.],
+- [ 1., 1., 1.]],
++ array([[[1., 1., 1.],
++ [1., 1., 1.],
++ [1., 1., 1.]],
+ <BLANKLINE>
+- [[ 1., 1., 1.],
+- [ 0., 0., 0.],
+- [ 1., 1., 1.]],
++ [[1., 1., 1.],
++ [0., 0., 0.],
++ [1., 1., 1.]],
+ <BLANKLINE>
+- [[ 1., 1., 1.],
+- [ 1., 1., 1.],
+- [ 1., 1., 1.]]])
++ [[1., 1., 1.],
++ [1., 1., 1.],
++ [1., 1., 1.]]])
+
+ sage: complex_to_spiderweb(zval, deriv,deriv, 4,4,[0,0,0],1,True,0.001)
+- array([[[ 1. , 1. , 1. ],
+- [ 1. , 0.05558355, 0.05558355],
+- [ 0.17301243, 0. , 0. ]],
++ array([[[1. , 1. , 1. ],
++ [1. , 0.05558355, 0.05558355],
++ [0.17301243, 0. , 0. ]],
+ <BLANKLINE>
+- [[ 1. , 0.96804683, 0.48044583],
+- [ 0. , 0. , 0. ],
+- [ 0.77351965, 0.5470393 , 1. ]],
++ [[1. , 0.96804683, 0.48044583],
++ [0. , 0. , 0. ],
++ [0.77351965, 0.5470393 , 1. ]],
+ <BLANKLINE>
+- [[ 1. , 1. , 1. ],
+- [ 1. , 1. , 1. ],
+- [ 1. , 1. , 1. ]]])
++ [[1. , 1. , 1. ],
++ [1. , 1. , 1. ],
++ [1. , 1. , 1. ]]])
+ """
+ cdef Py_ssize_t i, j, imax, jmax
+ cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
+@@ -1279,14 +1279,14 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim = 2] z_values):
+ sage: from sage.calculus.riemann import complex_to_rgb
+ sage: import numpy
+ sage: complex_to_rgb(numpy.array([[0, 1, 1000]], dtype = numpy.complex128))
+- array([[[ 1. , 1. , 1. ],
+- [ 1. , 0.05558355, 0.05558355],
+- [ 0.17301243, 0. , 0. ]]])
++ array([[[1. , 1. , 1. ],
++ [1. , 0.05558355, 0.05558355],
++ [0.17301243, 0. , 0. ]]])
+
+ sage: complex_to_rgb(numpy.array([[0, 1j, 1000j]], dtype = numpy.complex128))
+- array([[[ 1. , 1. , 1. ],
+- [ 0.52779177, 1. , 0.05558355],
+- [ 0.08650622, 0.17301243, 0. ]]])
++ array([[[1. , 1. , 1. ],
++ [0.52779177, 1. , 0.05558355],
++ [0.08650622, 0.17301243, 0. ]]])
+
+
+ TESTS::
+diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py
+index 37fb7aa..2569c0d 100644
+--- a/src/sage/combinat/fully_packed_loop.py
++++ b/src/sage/combinat/fully_packed_loop.py
+@@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False):
+ sage: _make_color_list(5, ['blue', 'red'])
+ ['blue', 'red', 'blue', 'red', 'blue']
+ sage: _make_color_list(5, color_map='summer')
+- [(0.0, 0.5, 0.40000000000000002),
+- (0.25098039215686274, 0.62549019607843137, 0.40000000000000002),
+- (0.50196078431372548, 0.75098039215686274, 0.40000000000000002),
+- (0.75294117647058822, 0.87647058823529411, 0.40000000000000002),
+- (1.0, 1.0, 0.40000000000000002)]
++ [(0.0, 0.5, 0.4),
++ (0.25098039215686274, 0.6254901960784314, 0.4),
++ (0.5019607843137255, 0.7509803921568627, 0.4),
++ (0.7529411764705882, 0.8764705882352941, 0.4),
++ (1.0, 1.0, 0.4)]
+ sage: _make_color_list(8, ['blue', 'red'], randomize=True)
+ ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue']
+ """
+diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx
+index 2877936..3ab0282 100644
+--- a/src/sage/finance/time_series.pyx
++++ b/src/sage/finance/time_series.pyx
+@@ -111,8 +111,8 @@ cdef class TimeSeries:
+
+ sage: import numpy
+ sage: v = numpy.array([[1,2], [3,4]], dtype=float); v
+- array([[ 1., 2.],
+- [ 3., 4.]])
++ array([[1., 2.],
++ [3., 4.]])
+ sage: finance.TimeSeries(v)
+ [1.0000, 2.0000, 3.0000, 4.0000]
+ sage: finance.TimeSeries(v[:,0])
+@@ -2100,14 +2100,14 @@ cdef class TimeSeries:
+
+ sage: w[0] = 20
+ sage: w
+- array([ 20. , -3. , 4.5, -2. ])
++ array([20. , -3. , 4.5, -2. ])
+ sage: v
+ [20.0000, -3.0000, 4.5000, -2.0000]
+
+ If you want a separate copy do not give the ``copy=False`` option. ::
+
+ sage: z = v.numpy(); z
+- array([ 20. , -3. , 4.5, -2. ])
++ array([20. , -3. , 4.5, -2. ])
+ sage: z[0] = -10
+ sage: v
+ [20.0000, -3.0000, 4.5000, -2.0000]
+diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py
+index aff552f..7a6df93 100644
+--- a/src/sage/functions/hyperbolic.py
++++ b/src/sage/functions/hyperbolic.py
+@@ -214,7 +214,7 @@ class Function_coth(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: coth(a)
+- array([ 1.03731472, 1.00496982, 1.00067115])
++ array([1.03731472, 1.00496982, 1.00067115])
+ """
+ return 1.0 / tanh(x)
+
+@@ -267,7 +267,7 @@ class Function_sech(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: sech(a)
+- array([ 0.26580223, 0.09932793, 0.03661899])
++ array([0.26580223, 0.09932793, 0.03661899])
+ """
+ return 1.0 / cosh(x)
+
+@@ -318,7 +318,7 @@ class Function_csch(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: csch(a)
+- array([ 0.27572056, 0.09982157, 0.03664357])
++ array([0.27572056, 0.09982157, 0.03664357])
+ """
+ return 1.0 / sinh(x)
+
+@@ -586,7 +586,7 @@ class Function_arccoth(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2,5)
+ sage: acoth(a)
+- array([ 0.54930614, 0.34657359, 0.25541281])
++ array([0.54930614, 0.34657359, 0.25541281])
+ """
+ return arctanh(1.0 / x)
+
+diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py
+index bae363c..386ba4d 100644
+--- a/src/sage/functions/orthogonal_polys.py
++++ b/src/sage/functions/orthogonal_polys.py
+@@ -810,12 +810,12 @@ class Func_chebyshev_T(ChebyshevFunction):
+ sage: z2 = numpy.array([[1,2],[1,2]])
+ sage: z3 = numpy.array([1,2,3.])
+ sage: chebyshev_T(1,z)
+- array([ 1., 2.])
++ array([1., 2.])
+ sage: chebyshev_T(1,z2)
+- array([[ 1., 2.],
+- [ 1., 2.]])
++ array([[1., 2.],
++ [1., 2.]])
+ sage: chebyshev_T(1,z3)
+- array([ 1., 2., 3.])
++ array([1., 2., 3.])
+ sage: chebyshev_T(z,0.1)
+ array([ 0.1 , -0.98])
+ """
+@@ -1095,12 +1095,12 @@ class Func_chebyshev_U(ChebyshevFunction):
+ sage: z2 = numpy.array([[1,2],[1,2]])
+ sage: z3 = numpy.array([1,2,3.])
+ sage: chebyshev_U(1,z)
+- array([ 2., 4.])
++ array([2., 4.])
+ sage: chebyshev_U(1,z2)
+- array([[ 2., 4.],
+- [ 2., 4.]])
++ array([[2., 4.],
++ [2., 4.]])
+ sage: chebyshev_U(1,z3)
+- array([ 2., 4., 6.])
++ array([2., 4., 6.])
+ sage: chebyshev_U(z,0.1)
+ array([ 0.2 , -0.96])
+ """
+diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py
+index 1883daa..9885222 100644
+--- a/src/sage/functions/other.py
++++ b/src/sage/functions/other.py
+@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction):
+ sage: import numpy
+ sage: a = numpy.linspace(0,2,6)
+ sage: ceil(a)
+- array([ 0., 1., 1., 2., 2., 2.])
++ array([0., 1., 1., 2., 2., 2.])
+
+ Test pickling::
+
+@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction):
+ sage: import numpy
+ sage: a = numpy.linspace(0,2,6)
+ sage: floor(a)
+- array([ 0., 0., 0., 1., 1., 2.])
++ array([0., 0., 0., 1., 1., 2.])
+ sage: floor(x)._sympy_()
+ floor(x)
+
+@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds):
+ sage: import numpy
+ sage: a = numpy.arange(2,5)
+ sage: sqrt(a)
+- array([ 1.41421356, 1.73205081, 2. ])
++ array([1.41421356, 1.73205081, 2. ])
+ """
+ if isinstance(x, float):
+ return math.sqrt(x)
+diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py
+index 1e021de..56635ca 100644
+--- a/src/sage/functions/spike_function.py
++++ b/src/sage/functions/spike_function.py
+@@ -157,7 +157,7 @@ class SpikeFunction:
+ sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
+ A spike function with spikes at [-3.0, -1.0, 2.0]
+ sage: P = S.plot_fft_abs(8)
+- sage: p = P[0]; p.ydata
++ sage: p = P[0]; p.ydata # abs tol 1e-8
+ [5.0, 5.0, 3.367958691924177, 3.367958691924177, 4.123105625617661, 4.123105625617661, 4.759921664218055, 4.759921664218055]
+ """
+ w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
+@@ -176,8 +176,8 @@ class SpikeFunction:
+ sage: S = spike_function([(-3,4),(-1,1),(2,3)]); S
+ A spike function with spikes at [-3.0, -1.0, 2.0]
+ sage: P = S.plot_fft_arg(8)
+- sage: p = P[0]; p.ydata
+- [0.0, 0.0, -0.211524990023434..., -0.211524990023434..., 0.244978663126864..., 0.244978663126864..., -0.149106180027477..., -0.149106180027477...]
++ sage: p = P[0]; p.ydata # abs tol 1e-8
++ [0.0, 0.0, -0.211524990023434, -0.211524990023434, 0.244978663126864, 0.244978663126864, -0.149106180027477, -0.149106180027477]
+ """
+ w = self.vector(samples = samples, xmin=xmin, xmax=xmax)
+ xmin, xmax = self._ranges(xmin, xmax)
+diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
+index 501e7ff..5f76091 100644
+--- a/src/sage/functions/trig.py
++++ b/src/sage/functions/trig.py
+@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: arccot(a)
+- array([ 0.46364761, 0.32175055, 0.24497866])
++ array([0.46364761, 0.32175055, 0.24497866])
+ """
+ return math.pi/2 - arctan(x)
+
+@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: arccsc(a)
+- array([ 0.52359878, 0.33983691, 0.25268026])
++ array([0.52359878, 0.33983691, 0.25268026])
+ """
+ return arcsin(1.0/x)
+
+@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction):
+ sage: import numpy
+ sage: a = numpy.arange(2, 5)
+ sage: arcsec(a)
+- array([ 1.04719755, 1.23095942, 1.31811607])
++ array([1.04719755, 1.23095942, 1.31811607])
+ """
+ return arccos(1.0/x)
+
+@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction):
+ sage: a = numpy.linspace(1, 3, 3)
+ sage: b = numpy.linspace(3, 6, 3)
+ sage: atan2(a, b)
+- array([ 0.32175055, 0.41822433, 0.46364761])
++ array([0.32175055, 0.41822433, 0.46364761])
+
+ sage: atan2(1,a)
+- array([ 0.78539816, 0.46364761, 0.32175055])
++ array([0.78539816, 0.46364761, 0.32175055])
+
+ sage: atan2(a, 1)
+- array([ 0.78539816, 1.10714872, 1.24904577])
++ array([0.78539816, 1.10714872, 1.24904577])
+
+ TESTS::
+
+diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx
+index 12136f1..491bf22 100644
+--- a/src/sage/matrix/constructor.pyx
++++ b/src/sage/matrix/constructor.pyx
+@@ -503,8 +503,8 @@ def matrix(*args, **kwds):
+ [7 8 9]
+ Full MatrixSpace of 3 by 3 dense matrices over Integer Ring
+ sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n
+- array([[ 1. , 0.5 ],
+- [ 0.33333333, 0.25 ]])
++ array([[1. , 0.5 ],
++ [0.33333333, 0.25 ]])
+ sage: matrix(QQ, n)
+ [ 1 1/2]
+ [1/3 1/4]
+diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx
+index c4d7368..8d51651 100644
+--- a/src/sage/matrix/matrix_double_dense.pyx
++++ b/src/sage/matrix/matrix_double_dense.pyx
+@@ -606,6 +606,9 @@ cdef class Matrix_double_dense(Matrix_dense):
+ [ 3.0 + 9.0*I 4.0 + 16.0*I 5.0 + 25.0*I]
+ [6.0 + 36.0*I 7.0 + 49.0*I 8.0 + 64.0*I]
+ sage: B.condition()
++ doctest:warning
++ ...
++ ComplexWarning: Casting complex values to real discards the imaginary part
+ 203.851798...
+ sage: B.condition(p='frob')
+ 203.851798...
+@@ -654,9 +657,7 @@ cdef class Matrix_double_dense(Matrix_dense):
+ True
+ sage: B = A.change_ring(CDF)
+ sage: B.condition()
+- Traceback (most recent call last):
+- ...
+- LinAlgError: Singular matrix
++ +Infinity
+
+ Improper values of ``p`` are caught. ::
+
+@@ -2519,7 +2520,7 @@ cdef class Matrix_double_dense(Matrix_dense):
+ sage: P.is_unitary(algorithm='orthonormal')
+ Traceback (most recent call last):
+ ...
+- ValueError: failed to create intent(cache|hide)|optional array-- must have defined dimensions but got (0,)
++ error: ((lwork==-1)||(lwork >= MAX(1,2*n))) failed for 3rd keyword lwork: zgees:lwork=0
+
+ TESTS::
+
+@@ -3635,8 +3636,8 @@ cdef class Matrix_double_dense(Matrix_dense):
+ [0.0 1.0 2.0]
+ [3.0 4.0 5.0]
+ sage: m.numpy()
+- array([[ 0., 1., 2.],
+- [ 3., 4., 5.]])
++ array([[0., 1., 2.],
++ [3., 4., 5.]])
+
+ Alternatively, numpy automatically calls this function (via
+ the magic :meth:`__array__` method) to convert Sage matrices
+@@ -3647,16 +3648,16 @@ cdef class Matrix_double_dense(Matrix_dense):
+ [0.0 1.0 2.0]
+ [3.0 4.0 5.0]
+ sage: numpy.array(m)
+- array([[ 0., 1., 2.],
+- [ 3., 4., 5.]])
++ array([[0., 1., 2.],
++ [3., 4., 5.]])
+ sage: numpy.array(m).dtype
+ dtype('float64')
+ sage: m = matrix(CDF, 2, range(6)); m
+ [0.0 1.0 2.0]
+ [3.0 4.0 5.0]
+ sage: numpy.array(m)
+- array([[ 0.+0.j, 1.+0.j, 2.+0.j],
+- [ 3.+0.j, 4.+0.j, 5.+0.j]])
++ array([[0.+0.j, 1.+0.j, 2.+0.j],
++ [3.+0.j, 4.+0.j, 5.+0.j]])
+ sage: numpy.array(m).dtype
+ dtype('complex128')
+
+diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py
+index ccbd208..c3f9a65 100644
+--- a/src/sage/matrix/special.py
++++ b/src/sage/matrix/special.py
+@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
+
+ sage: import numpy
+ sage: entries = numpy.array([1.2, 5.6]); entries
+- array([ 1.2, 5.6])
++ array([1.2, 5.6])
+ sage: A = diagonal_matrix(3, entries); A
+ [1.2 0.0 0.0]
+ [0.0 5.6 0.0]
+@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True):
+
+ sage: j = numpy.complex(0,1)
+ sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries
+- array([ 2.0+1.j , 8.1+0.j , 3.4+2.6j])
++ array([2. +1.j , 8.1+0.j , 3.4+2.6j])
+ sage: A = diagonal_matrix(entries); A
+ [2.0 + 1.0*I 0.0 0.0]
+ [ 0.0 8.1 0.0]
+diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx
+index 37d92c1..955d083 100644
+--- a/src/sage/modules/free_module_element.pyx
++++ b/src/sage/modules/free_module_element.pyx
+@@ -988,7 +988,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
+ sage: v.numpy()
+ array([1, 2, 5/6], dtype=object)
+ sage: v.numpy(dtype=float)
+- array([ 1. , 2. , 0.83333333])
++ array([1. , 2. , 0.83333333])
+ sage: v.numpy(dtype=int)
+ array([1, 2, 0])
+ sage: import numpy
+@@ -999,7 +999,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
+ be more efficient but may have unintended consequences::
+
+ sage: v.numpy(dtype=None)
+- array([ 1. , 2. , 0.83333333])
++ array([1. , 2. , 0.83333333])
+
+ sage: w = vector(ZZ, [0, 1, 2^63 -1]); w
+ (0, 1, 9223372036854775807)
+diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx
+index 39fc297..2badf98 100644
+--- a/src/sage/modules/vector_double_dense.pyx
++++ b/src/sage/modules/vector_double_dense.pyx
+@@ -807,13 +807,13 @@ cdef class Vector_double_dense(FreeModuleElement):
+
+ sage: v = vector(CDF,4,range(4))
+ sage: v.numpy()
+- array([ 0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
++ array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
+ sage: v = vector(CDF,0)
+ sage: v.numpy()
+ array([], dtype=complex128)
+ sage: v = vector(RDF,4,range(4))
+ sage: v.numpy()
+- array([ 0., 1., 2., 3.])
++ array([0., 1., 2., 3.])
+ sage: v = vector(RDF,0)
+ sage: v.numpy()
+ array([], dtype=float64)
+@@ -823,11 +823,11 @@ cdef class Vector_double_dense(FreeModuleElement):
+ sage: import numpy
+ sage: v = vector(CDF, 3, range(3))
+ sage: v.numpy()
+- array([ 0.+0.j, 1.+0.j, 2.+0.j])
++ array([0.+0.j, 1.+0.j, 2.+0.j])
+ sage: v.numpy(dtype=numpy.float64)
+- array([ 0., 1., 2.])
++ array([0., 1., 2.])
+ sage: v.numpy(dtype=numpy.float32)
+- array([ 0., 1., 2.], dtype=float32)
++ array([0., 1., 2.], dtype=float32)
+ """
+ if dtype is None or dtype is self._vector_numpy.dtype:
+ from copy import copy
+diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx
+index ad9693d..758fb70 100644
+--- a/src/sage/plot/complex_plot.pyx
++++ b/src/sage/plot/complex_plot.pyx
+@@ -61,9 +61,9 @@ cdef inline double mag_to_lightness(double r):
+
+ sage: from sage.plot.complex_plot import complex_to_rgb
+ sage: complex_to_rgb([[0, 1, 10]])
+- array([[[ 0. , 0. , 0. ],
+- [ 0.77172568, 0. , 0. ],
+- [ 1. , 0.22134776, 0.22134776]]])
++ array([[[0. , 0. , 0. ],
++ [0.77172568, 0. , 0. ],
++ [1. , 0.22134776, 0.22134776]]])
+ """
+ return atan(log(sqrt(r)+1)) * (4/PI) - 1
+
+@@ -82,13 +82,13 @@ def complex_to_rgb(z_values):
+
+ sage: from sage.plot.complex_plot import complex_to_rgb
+ sage: complex_to_rgb([[0, 1, 1000]])
+- array([[[ 0. , 0. , 0. ],
+- [ 0.77172568, 0. , 0. ],
+- [ 1. , 0.64421177, 0.64421177]]])
++ array([[[0. , 0. , 0. ],
++ [0.77172568, 0. , 0. ],
++ [1. , 0.64421177, 0.64421177]]])
+ sage: complex_to_rgb([[0, 1j, 1000j]])
+- array([[[ 0. , 0. , 0. ],
+- [ 0.38586284, 0.77172568, 0. ],
+- [ 0.82210588, 1. , 0.64421177]]])
++ array([[[0. , 0. , 0. ],
++ [0.38586284, 0.77172568, 0. ],
++ [0.82210588, 1. , 0.64421177]]])
+ """
+ import numpy
+ cdef unsigned int i, j, imax, jmax
+diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
+index 5d28473..fc4b204 100644
+--- a/src/sage/plot/histogram.py
++++ b/src/sage/plot/histogram.py
+@@ -53,10 +53,17 @@ class Histogram(GraphicPrimitive):
+ """
+ import numpy as np
+ self.datalist=np.asarray(datalist,dtype=float)
++ if 'normed' in options:
++ from sage.misc.superseded import deprecation
++ deprecation(25260, "the 'normed' option is deprecated. Use 'density' instead.")
+ if 'linestyle' in options:
+ from sage.plot.misc import get_matplotlib_linestyle
+ options['linestyle'] = get_matplotlib_linestyle(
+ options['linestyle'], return_type='long')
++ if options.get('range', None):
++ # numpy.histogram performs type checks on "range" so this must be
++ # actual floats
++ options['range'] = [float(x) for x in options['range']]
+ GraphicPrimitive.__init__(self, options)
+
+ def get_minmax_data(self):
+@@ -80,10 +87,14 @@ class Histogram(GraphicPrimitive):
+ {'xmax': 4.0, 'xmin': 0, 'ymax': 2, 'ymin': 0}
+
+ TESTS::
+-
+ sage: h = histogram([10,3,5], normed=True)[0]
+- sage: h.get_minmax_data() # rel tol 1e-15
+- {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.4761904761904765, 'ymin': 0}
++ doctest:warning...:
++ DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead.
++ See https://trac.sagemath.org/25260 for details.
++ sage: h.get_minmax_data()
++ doctest:warning ...:
++ VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy.
++ {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0}
+ """
+ import numpy
+
+@@ -152,7 +163,7 @@ class Histogram(GraphicPrimitive):
+ 'rwidth': 'The relative width of the bars as a fraction of the bin width',
+ 'cumulative': '(True or False) If True, then a histogram is computed in which each bin gives the counts in that bin plus all bins for smaller values. Negative values give a reversed direction of accumulation.',
+ 'range': 'A list [min, max] which define the range of the histogram. Values outside of this range are treated as outliers and omitted from counts.',
+- 'normed': 'Deprecated alias for density',
++ 'normed': 'Deprecated. Use density instead.',
+ 'density': '(True or False) If True, the counts are normalized to form a probability density. (n/(len(x)*dbin)',
+ 'weights': 'A sequence of weights the same length as the data list. If supplied, then each value contributes its associated weight to the bin count.',
+ 'stacked': '(True or False) If True, multiple data are stacked on top of each other.',
+@@ -199,7 +210,7 @@ class Histogram(GraphicPrimitive):
+ subplot.hist(self.datalist.transpose(), **options)
+
+
+- at options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black')
++ at options(aspect_ratio='automatic', align='mid', weights=None, range=None, bins=10, edgecolor='black')
+ def histogram(datalist, **options):
+ """
+ Computes and draws the histogram for list(s) of numerical data.
+@@ -231,8 +242,9 @@ def histogram(datalist, **options):
+ - ``linewidth`` -- (float) width of the lines defining the bars
+ - ``linestyle`` -- (default: 'solid') Style of the line. One of 'solid'
+ or '-', 'dashed' or '--', 'dotted' or ':', 'dashdot' or '-.'
+- - ``density`` -- (boolean - default: False) If True, the counts are
+- normalized to form a probability density.
++ - ``density`` -- (boolean - default: False) If True, the result is the
++ value of the probability density function at the bin, normalized such
++ that the integral over the range is 1.
+ - ``range`` -- A list [min, max] which define the range of the
+ histogram. Values outside of this range are treated as outliers and
+ omitted from counts
+diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py
+index 23f5e61..18695bb 100644
+--- a/src/sage/plot/line.py
++++ b/src/sage/plot/line.py
+@@ -502,14 +502,9 @@ def line2d(points, **options):
+ from sage.plot.all import Graphics
+ from sage.plot.plot import xydata_from_point_list
+ from sage.rings.all import CC, CDF
+- if points in CC or points in CDF:
+- pass
+- else:
+- try:
+- if not points:
+- return Graphics()
+- except ValueError: # numpy raises a ValueError if not empty
+- pass
++ points = list(points) # make sure points is a python list
++ if len(points) == 0:
++ return Graphics()
+ xdata, ydata = xydata_from_point_list(points)
+ g = Graphics()
+ g._set_extra_kwds(Graphics._extract_kwds_for_show(options))
+diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py
+index 0025098..23c8090 100644
+--- a/src/sage/plot/plot_field.py
++++ b/src/sage/plot/plot_field.py
+@@ -49,9 +49,10 @@ class PlotField(GraphicPrimitive):
+ sage: r.xpos_array
+ [0.0, 0.0, 1.0, 1.0]
+ sage: r.yvec_array
+- masked_array(data = [0.0 0.70710678118... 0.70710678118... 0.89442719...],
+- mask = [False False False False],
+- fill_value = 1e+20)
++ masked_array(data=[0.0, 0.70710678118..., 0.70710678118...,
++ 0.89442719...],
++ mask=[False, False, False, False],
++ fill_value=1e+20)
+
+ TESTS:
+
+diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py
+index f3da57c..3806f4b 100644
+--- a/src/sage/plot/streamline_plot.py
++++ b/src/sage/plot/streamline_plot.py
+@@ -38,16 +38,14 @@ class StreamlinePlot(GraphicPrimitive):
+ sage: r.options()['plot_points']
+ 2
+ sage: r.xpos_array
+- array([ 0., 1.])
++ array([0., 1.])
+ sage: r.yvec_array
+- masked_array(data =
+- [[1.0 1.0]
+- [0.5403023058681398 0.5403023058681398]],
+- mask =
+- [[False False]
+- [False False]],
+- fill_value = 1e+20)
+- <BLANKLINE>
++ masked_array(
++ data=[[1.0, 1.0],
++ [0.5403023058681398, 0.5403023058681398]],
++ mask=[[False, False],
++ [False, False]],
++ fill_value=1e+20)
+
+ TESTS:
+
+diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx
+index 1b119e3..3290b00 100644
+--- a/src/sage/probability/probability_distribution.pyx
++++ b/src/sage/probability/probability_distribution.pyx
+@@ -130,7 +130,17 @@ cdef class ProbabilityDistribution:
+ 0.0,
+ 1.4650000000000003]
+ sage: b
+- [0.0, 0.20000000000000001, 0.40000000000000002, 0.60000000000000009, 0.80000000000000004, 1.0, 1.2000000000000002, 1.4000000000000001, 1.6000000000000001, 1.8, 2.0]
++ [0.0,
++ 0.2,
++ 0.4,
++ 0.6000000000000001,
++ 0.8,
++ 1.0,
++ 1.2000000000000002,
++ 1.4000000000000001,
++ 1.6,
++ 1.8,
++ 2.0]
+ """
+ import pylab
+ l = [float(self.get_random_element()) for _ in range(num_samples)]
+diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx
+index 75e0861..8a7e7e9 100644
+--- a/src/sage/rings/rational.pyx
++++ b/src/sage/rings/rational.pyx
+@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement):
+ dtype('O')
+
+ sage: numpy.array([1, 1/2, 3/4])
+- array([ 1. , 0.5 , 0.75])
++ array([1. , 0.5 , 0.75])
+ """
+ if mpz_cmp_ui(mpq_denref(self.value), 1) == 0:
+ if mpz_fits_slong_p(mpq_numref(self.value)):
+diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx
+index 9b90c88..1ce05b9 100644
+--- a/src/sage/rings/real_mpfr.pyx
++++ b/src/sage/rings/real_mpfr.pyx
+@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
+
+ sage: import numpy
+ sage: numpy.arange(10.0)
+- array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
++ array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
+ sage: numpy.array([1.0, 1.1, 1.2]).dtype
+ dtype('float64')
+ sage: numpy.array([1.000000000000000000000000000000000000]).dtype
+diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py
+index de31fe9..7a33ea6 100644
+--- a/src/sage/schemes/elliptic_curves/height.py
++++ b/src/sage/schemes/elliptic_curves/height.py
+@@ -1627,18 +1627,18 @@ class EllipticCurveCanonicalHeight:
+ even::
+
+ sage: H.wp_on_grid(v,4)
+- array([[ 25.43920182, 5.28760943, 5.28760943, 25.43920182],
+- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
+- [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
+- [ 25.43920182, 5.28760943, 5.28760943, 25.43920182]])
++ array([[25.43920182, 5.28760943, 5.28760943, 25.43920182],
++ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
++ [ 6.05099485, 1.83757786, 1.83757786, 6.05099485],
++ [25.43920182, 5.28760943, 5.28760943, 25.43920182]])
+
+ The array of values on the half-grid::
+
+ sage: H.wp_on_grid(v,4,True)
+- array([[ 25.43920182, 5.28760943],
+- [ 6.05099485, 1.83757786],
+- [ 6.05099485, 1.83757786],
+- [ 25.43920182, 5.28760943]])
++ array([[25.43920182, 5.28760943],
++ [ 6.05099485, 1.83757786],
++ [ 6.05099485, 1.83757786],
++ [25.43920182, 5.28760943]])
+ """
+ tau = self.tau(v)
+ fk, err = self.fk_intervals(v, 15, CDF)
+diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx
+index 9da3800..d61e74b 100644
+--- a/src/sage/symbolic/ring.pyx
++++ b/src/sage/symbolic/ring.pyx
+@@ -1136,7 +1136,7 @@ cdef class NumpyToSRMorphism(Morphism):
+ sage: cos(numpy.int('2'))
+ cos(2)
+ sage: numpy.cos(numpy.int('2'))
+- -0.41614683654714241
++ -0.4161468365471424
+ """
+ cdef _intermediate_ring
Deleted: sagemath-python3-notebook.patch
===================================================================
--- sagemath-python3-notebook.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-python3-notebook.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,27 +0,0 @@
-diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
-index 74192da240..0ede281aad 100755
---- a/src/bin/sage-notebook
-+++ b/src/bin/sage-notebook
-@@ -96,8 +96,7 @@ class NotebookJupyter(object):
- if not have_prerequisites():
- print(self.PREREQUISITE_ERROR)
- raise SystemExit(1)
-- from notebook.notebookapp import main
-- main(argv)
-+ os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
-
-
- class NotebookJupyterlab(object):
-diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
-index 3912b8cdf5..bd40cdadda 100644
---- a/src/sage/repl/ipython_kernel/install.py
-+++ b/src/sage/repl/ipython_kernel/install.py
-@@ -292,7 +292,6 @@ def have_prerequisites(debug=True):
- True
- """
- try:
-- from notebook.notebookapp import NotebookApp
- return True
- except ImportError:
- if debug:
-
Copied: sagemath/repos/community-x86_64/sagemath-python3-notebook.patch (from rev 403206, sagemath/trunk/sagemath-python3-notebook.patch)
===================================================================
--- sagemath-python3-notebook.patch (rev 0)
+++ sagemath-python3-notebook.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,27 @@
+diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
+index 74192da240..0ede281aad 100755
+--- a/src/bin/sage-notebook
++++ b/src/bin/sage-notebook
+@@ -96,8 +96,7 @@ class NotebookJupyter(object):
+ if not have_prerequisites():
+ print(self.PREREQUISITE_ERROR)
+ raise SystemExit(1)
+- from notebook.notebookapp import main
+- main(argv)
++ os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv)
+
+
+ class NotebookJupyterlab(object):
+diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py
+index 3912b8cdf5..bd40cdadda 100644
+--- a/src/sage/repl/ipython_kernel/install.py
++++ b/src/sage/repl/ipython_kernel/install.py
+@@ -292,7 +292,6 @@ def have_prerequisites(debug=True):
+ True
+ """
+ try:
+- from notebook.notebookapp import NotebookApp
+ return True
+ except ImportError:
+ if debug:
+
Deleted: sagemath-sphinx-1.8.patch
===================================================================
--- sagemath-sphinx-1.8.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-sphinx-1.8.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,28 +0,0 @@
---- a/src/sage/misc/sphinxify.py 2018-09-14 20:13:32.788831484 +0200
-+++ b/src/sage/misc/sphinxify.py 2018-09-14 20:14:07.142478667 +0200
-@@ -64,6 +64,7 @@
- sage: assert n == len(sys.path)
- """
- srcdir = mkdtemp()
-+ outdir = mkdtemp()
- base_name = os.path.join(srcdir, 'docstring')
- rst_name = base_name + '.rst'
-
-@@ -71,7 +72,7 @@
- suffix = '.html'
- else:
- suffix = '.txt'
-- output_name = base_name + suffix
-+ output_name = os.path.join(outdir, 'docstring') + suffix
-
- with open(rst_name, 'w') as filed:
- filed.write(docstring)
-@@ -89,7 +90,7 @@
-
- import sys
- old_sys_path = list(sys.path) # Sphinx modifies sys.path
-- sphinx_app = Sphinx(srcdir, confdir, srcdir, doctreedir, format,
-+ sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
- confoverrides, None, None, True)
- sphinx_app.build(None, [rst_name])
- sys.path = old_sys_path
Copied: sagemath/repos/community-x86_64/sagemath-sphinx-1.8.patch (from rev 403206, sagemath/trunk/sagemath-sphinx-1.8.patch)
===================================================================
--- sagemath-sphinx-1.8.patch (rev 0)
+++ sagemath-sphinx-1.8.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,28 @@
+--- a/src/sage/misc/sphinxify.py 2018-09-14 20:13:32.788831484 +0200
++++ b/src/sage/misc/sphinxify.py 2018-09-14 20:14:07.142478667 +0200
+@@ -64,6 +64,7 @@
+ sage: assert n == len(sys.path)
+ """
+ srcdir = mkdtemp()
++ outdir = mkdtemp()
+ base_name = os.path.join(srcdir, 'docstring')
+ rst_name = base_name + '.rst'
+
+@@ -71,7 +72,7 @@
+ suffix = '.html'
+ else:
+ suffix = '.txt'
+- output_name = base_name + suffix
++ output_name = os.path.join(outdir, 'docstring') + suffix
+
+ with open(rst_name, 'w') as filed:
+ filed.write(docstring)
+@@ -89,7 +90,7 @@
+
+ import sys
+ old_sys_path = list(sys.path) # Sphinx modifies sys.path
+- sphinx_app = Sphinx(srcdir, confdir, srcdir, doctreedir, format,
++ sphinx_app = Sphinx(srcdir, confdir, outdir, doctreedir, format,
+ confoverrides, None, None, True)
+ sphinx_app.build(None, [rst_name])
+ sys.path = old_sys_path
Deleted: sagemath-threejs.patch
===================================================================
--- sagemath-threejs.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ sagemath-threejs.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,11 +0,0 @@
---- a/src/sage/repl/rich_output/display_manager.py
-+++ b/src/sage/repl/rich_output/display_manager.py
-@@ -746,7 +746,7 @@ class DisplayManager(SageObject):
- """
- if online:
- from sage.misc.package import installed_packages
-- version = installed_packages()['threejs'].split('.')[0]
-+ version = 'r95'
- return """
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
- <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>
Copied: sagemath/repos/community-x86_64/sagemath-threejs.patch (from rev 403206, sagemath/trunk/sagemath-threejs.patch)
===================================================================
--- sagemath-threejs.patch (rev 0)
+++ sagemath-threejs.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,11 @@
+--- a/src/sage/repl/rich_output/display_manager.py
++++ b/src/sage/repl/rich_output/display_manager.py
+@@ -746,7 +746,7 @@ class DisplayManager(SageObject):
+ """
+ if online:
+ from sage.misc.package import installed_packages
+- version = installed_packages()['threejs'].split('.')[0]
++ version = 'r95'
+ return """
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/build/three.min.js"></script>
+ <script src="https://cdn.rawgit.com/mrdoob/three.js/{0}/examples/js/controls/OrbitControls.js"></script>
Deleted: test-optional.patch
===================================================================
--- test-optional.patch 2018-11-07 21:39:10 UTC (rev 403206)
+++ test-optional.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -1,25 +0,0 @@
---- src/sage/doctest/control.py.orig 2016-10-20 19:39:53.714618246 +0200
-+++ src/sage/doctest/control.py 2016-10-20 19:40:15.158049920 +0200
-@@ -346,22 +346,6 @@
- # Special case to run all optional tests
- options.optional = True
- else:
-- # We replace the 'optional' tag by all optional
-- # packages for which the installed version matches the
-- # latest available version (this implies in particular
-- # that the package is actually installed).
-- if 'optional' in options.optional:
-- options.optional.discard('optional')
-- from sage.misc.package import list_packages
-- for pkg in list_packages('optional', local=True).values():
-- if pkg['installed_version'] == pkg['remote_version']:
-- options.optional.add(pkg['name'])
--
-- # Check that all tags are valid
-- for o in options.optional:
-- if not optionaltag_regex.search(o):
-- raise ValueError('invalid optional tag {!r}'.format(o))
--
- options.optional |= auto_optional_tags
-
- self.options = options
Copied: sagemath/repos/community-x86_64/test-optional.patch (from rev 403206, sagemath/trunk/test-optional.patch)
===================================================================
--- test-optional.patch (rev 0)
+++ test-optional.patch 2018-11-07 21:39:55 UTC (rev 403207)
@@ -0,0 +1,25 @@
+--- src/sage/doctest/control.py.orig 2016-10-20 19:39:53.714618246 +0200
++++ src/sage/doctest/control.py 2016-10-20 19:40:15.158049920 +0200
+@@ -346,22 +346,6 @@
+ # Special case to run all optional tests
+ options.optional = True
+ else:
+- # We replace the 'optional' tag by all optional
+- # packages for which the installed version matches the
+- # latest available version (this implies in particular
+- # that the package is actually installed).
+- if 'optional' in options.optional:
+- options.optional.discard('optional')
+- from sage.misc.package import list_packages
+- for pkg in list_packages('optional', local=True).values():
+- if pkg['installed_version'] == pkg['remote_version']:
+- options.optional.add(pkg['name'])
+-
+- # Check that all tags are valid
+- for o in options.optional:
+- if not optionaltag_regex.search(o):
+- raise ValueError('invalid optional tag {!r}'.format(o))
+-
+ options.optional |= auto_optional_tags
+
+ self.options = options
More information about the arch-commits
mailing list