Date: Sunday, December 23, 2018 @ 13:32:00 Author: arojas Revision: 417615
Update to 8.5 Added: sagemath/trunk/sagemath-singular-4.1.1.p4.patch Modified: sagemath/trunk/PKGBUILD sagemath/trunk/sagemath-cremona.patch sagemath/trunk/sagemath-cypari2.patch sagemath/trunk/sagemath-env.patch sagemath/trunk/sagemath-networkx-2.2.patch sagemath/trunk/sagemath-python3-notebook.patch sagemath/trunk/sagemath-sphinx-1.8.patch sagemath/trunk/test-optional.patch Deleted: sagemath/trunk/sagemath-cython-0.29.patch sagemath/trunk/sagemath-gap-4.8.patch sagemath/trunk/sagemath-lcalc-c++11.patch sagemath/trunk/sagemath-numpy-1.15.patch ----------------------------------+ PKGBUILD | 50 -- sagemath-cremona.patch | 4 sagemath-cypari2.patch | 318 ------------ sagemath-cython-0.29.patch | 65 -- sagemath-env.patch | 12 sagemath-gap-4.8.patch | 26 - sagemath-lcalc-c++11.patch | 10 sagemath-networkx-2.2.patch | 16 sagemath-numpy-1.15.patch | 912 ------------------------------------- sagemath-python3-notebook.patch | 2 sagemath-singular-4.1.1.p4.patch | 78 +++ sagemath-sphinx-1.8.patch | 6 test-optional.patch | 2 13 files changed, 115 insertions(+), 1386 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-12-23 13:10:47 UTC (rev 417614) +++ PKGBUILD 2018-12-23 13:32:00 UTC (rev 417615) @@ -7,14 +7,14 @@ pkgbase=sagemath pkgname=(sagemath sagemath-jupyter) -pkgver=8.4 -pkgrel=4 +pkgver=8.5 +pkgrel=1 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 + python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future gap 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) @@ -24,7 +24,7 @@ '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' + 'coxeter: Coxeter groups implementation' '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' @@ -43,29 +43,25 @@ fes02.patch sagemath-threejs.patch sagemath-cremona.patch - sagemath-lcalc-c++11.patch - sagemath-gap-4.8.patch + sagemath-gap-4.10.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' + sagemath-cypari2.patch + sagemath-singular-4.1.1.p4.patch) +sha256sums=('369810fac9ad7fb6cb1eb2a82d3e3679edee015778de34c56670d4ee80bde690' + 'f26ab0f22d7d916a621f02b9d9fc806eb6825f8d34cdf45accb0e2601c82f049' '960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b' 'ef265f88ceb6caf4aac2d86ea74850861d99a63d11c94fc52b2ce88053c26d1e' - '769fd5a9c377be61de41e1e30004dadb23818da901cceb6e1bece7712ba7cb83' - '3a0ebda1df708f263be830751cc5ddb430ca1f685b25b08d4b6592b65b123ebe' + 'bd2744c6564bbf71bd6ea3cd7b9031e2126cc1423bcdc1fcc258d90d750a129d' + 'f12bd2a53ad51549015093aacc89978f4d796d9ab5bcd3d737aa0d57a5815b54' '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94' 'f6b48abf34f64ea3fc092b0f0179e89633f7d3ecc0d62c2acacbfa1217751d63' - '7efb38ba511037feb3abbd88576323320555ba50235ddc7e3d423ca294dd42ed' - '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0' - '7304d6242bf0e8241d3d83b772d92f00f905c425b894d36a25c264edca279986' - '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee' - '0e3436a68cca4165d3d8519a7d4357b1a59515e9e4cc8bd816a852ca4097e274' - 'd1af7916e21d0a4de7b3ab5d4054c6b3175b84551ea6639a2680e6102c0b990b' - '9ef22633ae5d0dde9afe922d5616e49cea4ef6178a4991c96a258981cba674b7' - 'ef9e2d5b7bd9c2b79121fe771a97963527d97ac9c1d6736d931f00e3eb7f540a') + '4c6df9e4e5a7b29ecf6189eda3e5a79f69b6e1b4d29c1b9559663149b8c0af96' + '224f8d1db783d7ae25408912c4891687d6a8a1dacc8c5b3a00b725a28d951b6c' + '22f5e44a42c8276025b8512f45cac1c36d576c29c7fd9d36fde8b19ff87867d8' + '27e2590d3ff8242dd76579defdcf3d17ce54937e1bc8c847089fd3b681e98008' + '1677bcaa3fe19bf978b6ffaae7b64b7ec32df63fa3d0e28b179cfa831fcfa896' + '482887fe43d89cef3270e89300ab9e2238fa74cd5b7c875688b68fb1b10c4fdf') prepare(){ cd sage-$pkgver @@ -83,10 +79,6 @@ 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 @@ -97,12 +89,12 @@ 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 +# Build with GAP 4.10 https://trac.sagemath.org/ticket/22626 + patch -p1 -i ../sagemath-gap-4.10.patch +# Fixes for singular 4.1.1p4 https://trac.sagemath.org/ticket/25993 + patch -p1 -i ../sagemath-singular-4.1.1.p4.patch # use python2 sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/* Modified: sagemath-cremona.patch =================================================================== --- sagemath-cremona.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-cremona.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -11,7 +11,7 @@ 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): +@@ -835,7 +835,7 @@ class MiniCremonaDatabase(SQLDatabase): if N < self.largest_conductor(): message = "There is no elliptic curve with label " + label \ + " in the database" @@ -20,7 +20,7 @@ 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): +@@ -1683,7 +1683,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: Modified: sagemath-cypari2.patch =================================================================== --- sagemath-cypari2.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-cypari2.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -1,321 +1,3 @@ -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 Deleted: sagemath-cython-0.29.patch =================================================================== --- sagemath-cython-0.29.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-cython-0.29.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -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, - ) Modified: sagemath-env.patch =================================================================== --- sagemath-env.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-env.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -79,13 +79,12 @@ # The compilers are set in order of priority by # 1) environment variables -@@ -296,8 +296,9 @@ +@@ -296,8 +296,8 @@ 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" @@ -161,12 +160,3 @@ 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-12-23 13:10:47 UTC (rev 417614) +++ sagemath-gap-4.8.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -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) Deleted: sagemath-lcalc-c++11.patch =================================================================== --- sagemath-lcalc-c++11.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-lcalc-c++11.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -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>": - Modified: sagemath-networkx-2.2.patch =================================================================== --- sagemath-networkx-2.2.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-networkx-2.2.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -150,7 +150,7 @@ import networkx return Graph(networkx.powerlaw_cluster_graph(n, m, p, seed=seed)) -@@ -838,7 +838,7 @@ def RandomLobster(n, p, q, seed=None): +@@ -1239,7 +1239,7 @@ def RandomLobster(n, p, q, seed=None): - ``q`` - probability of adding an edge (claw) to the arms @@ -159,7 +159,7 @@ 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): +@@ -1253,7 +1253,7 @@ def RandomLobster(n, p, q, seed=None): sage: G.show() # long time """ if seed is None: @@ -168,7 +168,7 @@ 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): +@@ -1344,7 +1344,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None): - ``tries`` - number of attempts to adjust sequence to make a tree @@ -177,7 +177,7 @@ 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): +@@ -1361,7 +1361,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None): ....: G.show() # random output, long time """ if seed is None: @@ -186,7 +186,7 @@ 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): +@@ -1382,7 +1382,7 @@ def RandomRegular(d, n, seed=None): - ``d`` - degree @@ -195,7 +195,7 @@ EXAMPLES: We show the edge list of a random graph with 8 nodes each -@@ -1009,7 +1009,7 @@ def RandomRegular(d, n, seed=None): +@@ -1410,7 +1410,7 @@ def RandomRegular(d, n, seed=None): regular graphs quickly. Prob. and Comp. 8 (1999), pp 377-396. """ if seed is None: @@ -204,7 +204,7 @@ import networkx try: N = networkx.random_regular_graph(d, n, seed=seed) -@@ -1034,7 +1034,7 @@ def RandomShell(constructor, seed=None): +@@ -1435,7 +1435,7 @@ def RandomShell(constructor, seed=None): - ``d`` - the ratio of inter (next) shell edges to intra shell edges @@ -213,7 +213,7 @@ EXAMPLES:: -@@ -1044,7 +1044,7 @@ def RandomShell(constructor, seed=None): +@@ -1445,7 +1445,7 @@ def RandomShell(constructor, seed=None): sage: G.show() # long time """ if seed is None: Deleted: sagemath-numpy-1.15.patch =================================================================== --- sagemath-numpy-1.15.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-numpy-1.15.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -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) - - --@options(aspect_ratio='automatic',align='mid', weights=None, range=None, bins=10, edgecolor='black') -+@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 Modified: sagemath-python3-notebook.patch =================================================================== --- sagemath-python3-notebook.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-python3-notebook.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -16,7 +16,7 @@ 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): +@@ -303,7 +303,6 @@ def have_prerequisites(debug=True): True """ try: Added: sagemath-singular-4.1.1.p4.patch =================================================================== --- sagemath-singular-4.1.1.p4.patch (rev 0) +++ sagemath-singular-4.1.1.p4.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -0,0 +1,78 @@ +diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx +index 87342e8..9a0d37d 100644 +--- a/src/sage/libs/singular/function.pyx ++++ b/src/sage/libs/singular/function.pyx +@@ -1258,7 +1258,7 @@ cdef class SingularFunction(SageObject): + Traceback (most recent call last): + ... + RuntimeError: error in Singular function call 'size': +- Wrong number of arguments (got 2 arguments, arity code is 300) ++ Wrong number of arguments (got 2 arguments, arity code is 302) + sage: size('foobar', ring=P) + 6 + +@@ -1667,17 +1667,17 @@ def singular_function(name): + Traceback (most recent call last): + ... + RuntimeError: error in Singular function call 'factorize': +- Wrong number of arguments (got 0 arguments, arity code is 303) ++ Wrong number of arguments (got 0 arguments, arity code is 305) + sage: factorize(f, 1, 2) + Traceback (most recent call last): + ... + RuntimeError: error in Singular function call 'factorize': +- Wrong number of arguments (got 3 arguments, arity code is 303) ++ Wrong number of arguments (got 3 arguments, arity code is 305) + sage: factorize(f, 1, 2, 3) + Traceback (most recent call last): + ... + RuntimeError: error in Singular function call 'factorize': +- Wrong number of arguments (got 4 arguments, arity code is 303) ++ Wrong number of arguments (got 4 arguments, arity code is 305) + + The Singular function ``list`` can be called with any number of + arguments:: +diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +index 8f6576b477..deaf0f5769 100644 +--- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx ++++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +@@ -447,7 +447,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement): + return True + for i from 0 <= i < p_d-s_d: + s_poly = singular_system("stest",s_poly,1, +- A._degbound,A.__ngens,ring=P) ++ ring=P) + if P.monomial_divides(s_poly,p_poly): + return True + return False +@@ -601,7 +601,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement): + # we must put the polynomials into the same ring + left._poly = A._current_ring(left._poly) + right._poly = A._current_ring(right._poly) +- rshift = singular_system("stest",right._poly,left._poly.degree(),A._degbound,A.__ngens, ring=A._current_ring) ++ rshift = singular_system("stest",right._poly,left._poly.degree(), ring=A._current_ring) + return FreeAlgebraElement_letterplace(A,left._poly*rshift, check=False) + + def __pow__(FreeAlgebraElement_letterplace self, int n, k): +@@ -629,7 +629,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement): + q = p = self._poly + cdef int i + for i from 0<i<n: +- q = singular_system("stest",q,d,A._degbound,A.__ngens, ++ q = singular_system("stest",q,d, + ring=A._current_ring) + p *= q + return FreeAlgebraElement_letterplace(A, p, check=False) +diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx +index 7a8400052e..b3474fa07c 100644 +--- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx ++++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx +@@ -683,7 +683,7 @@ cdef class FreeAlgebra_letterplace(Algebra): + degbound = self._degbound + cdef list G = [C(x._poly) for x in g] + for y in G: +- out.extend([y]+[singular_system("stest",y,n+1,degbound,ngens,ring=C) for n in xrange(d-y.degree())]) ++ out.extend([y]+[singular_system("stest",y,n+1,ring=C) for n in xrange(d-y.degree())]) + return C.ideal(out) + + ########################### Modified: sagemath-sphinx-1.8.patch =================================================================== --- sagemath-sphinx-1.8.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ sagemath-sphinx-1.8.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -1,6 +1,6 @@ --- 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 @@ +@@ -68,6 +68,7 @@ sage: assert n == len(sys.path) """ srcdir = mkdtemp() @@ -8,7 +8,7 @@ base_name = os.path.join(srcdir, 'docstring') rst_name = base_name + '.rst' -@@ -71,7 +72,7 @@ +@@ -75,7 +76,7 @@ suffix = '.html' else: suffix = '.txt' @@ -17,7 +17,7 @@ with open(rst_name, 'w') as filed: filed.write(docstring) -@@ -89,7 +90,7 @@ +@@ -93,7 +94,7 @@ import sys old_sys_path = list(sys.path) # Sphinx modifies sys.path Modified: test-optional.patch =================================================================== --- test-optional.patch 2018-12-23 13:10:47 UTC (rev 417614) +++ test-optional.patch 2018-12-23 13:32:00 UTC (rev 417615) @@ -1,6 +1,6 @@ --- 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 @@ +@@ -347,22 +347,6 @@ # Special case to run all optional tests options.optional = True else:
