From 7b54d2115baaab2944c979ae3adc14fc37bf0064 Mon Sep 17 00:00:00 2001 From: pcpa Date: Fri, 8 Nov 2019 08:46:01 -0300 Subject: [PATCH] Update to latest upstream release --- sagemath-arb.patch | 169 ++++--------------- sagemath-buildroot.patch | 6 +- sagemath-cremona.patch | 10 +- sagemath-env.patch | 8 +- sagemath-escape.patch | 36 ---- sagemath-extensions.patch | 33 ++-- sagemath-fes.patch | 6 +- sagemath-formatargspec.patch | 173 -------------------- sagemath-includes.patch | 34 ++-- sagemath-latte.patch | 12 +- sagemath-lcalc.patch | 15 +- sagemath-openblas.patch | 10 +- sagemath-python3.patch | 308 ++++++++++------------------------- sagemath-rpmbuild.patch | 76 +-------- sagemath-sagedoc.patch | 38 +---- sagemath-sagetex.patch | 8 +- sagemath-scripts.patch | 97 ++++------- sagemath-sympy.patch | 6 +- sagemath.spec | 72 ++++---- sources | 2 +- 20 files changed, 285 insertions(+), 834 deletions(-) delete mode 100644 sagemath-escape.patch delete mode 100644 sagemath-formatargspec.patch diff --git a/sagemath-arb.patch b/sagemath-arb.patch index e99a302..164bea5 100644 --- a/sagemath-arb.patch +++ b/sagemath-arb.patch @@ -1,141 +1,32 @@ -diff -up src/sage/libs/arb/acb_hypgeom.pxd.orig src/sage/libs/arb/acb_hypgeom.pxd ---- src/sage/libs/arb/acb_hypgeom.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/acb_hypgeom.pxd 2019-01-16 09:46:54.148469344 -0700 -@@ -2,7 +2,7 @@ +diff -up src/sage/libs/arb/arb_wrap.h.orig src/sage/libs/arb/arb_wrap.h +--- src/sage/libs/arb/arb_wrap.h.orig 2019-10-25 14:39:21.831699616 -0300 ++++ src/sage/libs/arb/arb_wrap.h 2019-10-25 14:39:53.520890155 -0300 +@@ -11,17 +11,17 @@ + #define ulong mp_limb_t + #define slong mp_limb_signed_t - from sage.libs.arb.types cimport * +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include --cdef extern from "acb_hypgeom.h": -+cdef extern from "arb/acb_hypgeom.h": - void acb_hypgeom_pfq_bound_factor(mag_t C, acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, unsigned long n) - long acb_hypgeom_pfq_choose_n(acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, long prec) - void acb_hypgeom_pfq_sum_forward(acb_t s, acb_t t, acb_srcptr a, long p, acb_srcptr b, long q, const acb_t z, long n, long prec) -diff -up src/sage/libs/arb/acb_mat.pxd.orig src/sage/libs/arb/acb_mat.pxd ---- src/sage/libs/arb/acb_mat.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/acb_mat.pxd 2019-01-16 09:46:54.148469344 -0700 -@@ -1,6 +1,6 @@ - from sage.libs.arb.types cimport acb_t, acb_mat_t, acb_poly_t - --cdef extern from "acb_mat.h": -+cdef extern from "arb/acb_mat.h": - unsigned int acb_mat_nrows(acb_mat_t mat) - unsigned int acb_mat_ncols(acb_mat_t mat) - acb_t acb_mat_entry(acb_mat_t mat, unsigned long i, unsigned long j) -diff -up src/sage/libs/arb/acb_modular.pxd.orig src/sage/libs/arb/acb_modular.pxd ---- src/sage/libs/arb/acb_modular.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/acb_modular.pxd 2019-01-16 09:46:54.149469326 -0700 -@@ -3,7 +3,7 @@ - from sage.libs.arb.types cimport * - from sage.libs.flint.types cimport fmpz_poly_t - --cdef extern from "acb_modular.h": -+cdef extern from "arb/acb_modular.h": - void acb_modular_theta(acb_t theta1, acb_t theta2, acb_t theta3, acb_t theta4, const acb_t z, const acb_t tau, long prec) - void acb_modular_j(acb_t z, const acb_t tau, long prec) - void acb_modular_eta(acb_t z, const acb_t tau, long prec) -diff -up src/sage/libs/arb/acb_poly.pxd.orig src/sage/libs/arb/acb_poly.pxd ---- src/sage/libs/arb/acb_poly.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/acb_poly.pxd 2019-01-16 09:46:54.149469326 -0700 -@@ -3,7 +3,7 @@ - from sage.libs.arb.types cimport * - from sage.libs.flint.types cimport fmpz_poly_t, fmpq_poly_t - --cdef extern from "acb_poly.h": -+cdef extern from "arb/acb_poly.h": - void acb_poly_init(acb_poly_t poly) - void acb_poly_clear(acb_poly_t poly) - void acb_poly_fit_length(acb_poly_t poly, long len) -diff -up src/sage/libs/arb/acb.pxd.orig src/sage/libs/arb/acb.pxd ---- src/sage/libs/arb/acb.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/acb.pxd 2019-01-16 09:46:54.149469326 -0700 -@@ -3,7 +3,7 @@ - from sage.libs.arb.types cimport * - from sage.libs.flint.types cimport fmpz_t, fmpq_t - --cdef extern from "acb.h": -+cdef extern from "arb/acb.h": - - arb_t acb_realref(acb_t x) - arb_t acb_imagref(acb_t x) -diff -up src/sage/libs/arb/arf.pxd.orig src/sage/libs/arb/arf.pxd ---- src/sage/libs/arb/arf.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/arf.pxd 2019-01-16 09:46:54.149469326 -0700 -@@ -5,7 +5,7 @@ from sage.libs.gmp.types cimport mpz_t - from sage.libs.flint.types cimport fmpz_t - from sage.libs.mpfr.types cimport mpfr_t, mpfr_rnd_t - --cdef extern from "arf.h": -+cdef extern from "arb/arf.h": - void arf_init(arf_t x) - void arf_clear(arf_t x) - void arf_zero(arf_t x) -diff -up src/sage/libs/arb/bernoulli.pxd.orig src/sage/libs/arb/bernoulli.pxd ---- src/sage/libs/arb/bernoulli.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/bernoulli.pxd 2019-01-16 09:46:54.149469326 -0700 -@@ -2,5 +2,5 @@ - - from ..flint.types cimport fmpq_t, ulong - --cdef extern from "bernoulli.h": -+cdef extern from "arb/bernoulli.h": - void bernoulli_fmpq_ui(fmpq_t b, ulong n) -diff -up src/sage/libs/arb/mag.pxd.orig src/sage/libs/arb/mag.pxd ---- src/sage/libs/arb/mag.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/mag.pxd 2019-01-16 09:46:54.150469309 -0700 -@@ -3,7 +3,7 @@ - from sage.libs.arb.types cimport * - from sage.libs.flint.types cimport fmpz_t, fmpq_t - --cdef extern from "mag.h": -+cdef extern from "arb/mag.h": - void mag_init(mag_t x) - void mag_clear(mag_t x) - void mag_init_set(mag_t x, const mag_t y) -diff -up src/sage/libs/arb/types.pxd.orig src/sage/libs/arb/types.pxd ---- src/sage/libs/arb/types.pxd.orig 2018-12-22 16:37:08.000000000 -0700 -+++ src/sage/libs/arb/types.pxd 2019-01-16 09:46:54.150469309 -0700 -@@ -1,4 +1,4 @@ --cdef extern from "mag.h": -+cdef extern from "arb/mag.h": - ctypedef struct mag_struct: - pass - ctypedef mag_struct mag_t[1] -@@ -6,7 +6,7 @@ cdef extern from "mag.h": - ctypedef const mag_struct * mag_srcptr - long MAG_BITS - --cdef extern from "arf.h": -+cdef extern from "arb/arf.h": - ctypedef struct arf_struct: - pass - ctypedef arf_struct arf_t[1] -@@ -20,25 +20,25 @@ cdef extern from "arf.h": - ARF_RND_NEAR - long ARF_PREC_EXACT - --cdef extern from "arb.h": -+cdef extern from "arb/arb.h": - ctypedef struct arb_struct: - pass - ctypedef arb_struct arb_t[1] - ctypedef arb_struct * arb_ptr - --cdef extern from "acb.h": -+cdef extern from "arb/acb.h": - ctypedef struct acb_struct: - pass - ctypedef acb_struct[1] acb_t - ctypedef acb_struct * acb_ptr - ctypedef const acb_struct * acb_srcptr - --cdef extern from "acb_mat.h": -+cdef extern from "arb/acb_mat.h": - ctypedef struct acb_mat_struct: - pass - ctypedef acb_mat_struct[1] acb_mat_t - --cdef extern from "acb_poly.h": -+cdef extern from "arb/acb_poly.h": - ctypedef struct acb_poly_struct: - pass - ctypedef acb_poly_struct[1] acb_poly_t + #undef ulong + #undef slong diff --git a/sagemath-buildroot.patch b/sagemath-buildroot.patch index 1eb8696..ed86bc8 100644 --- a/sagemath-buildroot.patch +++ b/sagemath-buildroot.patch @@ -1,7 +1,7 @@ diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-01-04 11:05:11.337077724 -0700 -+++ src/setup.py 2019-01-16 09:45:32.570933224 -0700 -@@ -334,6 +334,9 @@ class sage_build_cython(Command): +--- src/setup.py.orig 2019-10-03 16:02:47.728642827 -0300 ++++ src/setup.py 2019-10-03 16:03:22.041859763 -0300 +@@ -335,6 +335,9 @@ class sage_build_cython(Command): with open(self._version_file, 'w') as f: f.write(self._version_stamp) diff --git a/sagemath-cremona.patch b/sagemath-cremona.patch index 7974057..c2b38d3 100644 --- a/sagemath-cremona.patch +++ b/sagemath-cremona.patch @@ -1,7 +1,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py ---- src/sage/databases/cremona.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/databases/cremona.py 2019-09-09 15:37:13.321511378 -0600 -@@ -842,7 +842,8 @@ class MiniCremonaDatabase(SQLDatabase): +--- src/sage/databases/cremona.py.orig 2019-10-03 14:57:32.516349793 -0300 ++++ src/sage/databases/cremona.py 2019-10-03 14:57:45.084423307 -0300 +@@ -850,7 +850,8 @@ class MiniCremonaDatabase(SQLDatabase): message = "There is no elliptic curve with label " \ + label + " in the default database; try installing " \ + "the optional package database_cremona_ellcurve which " \ @@ -11,11 +11,11 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py raise ValueError(message) ainvs = eval(c[0]) data = {'cremona_label': label, -@@ -1640,6 +1641,7 @@ class LargeCremonaDatabase(MiniCremonaDa +@@ -1649,6 +1650,7 @@ class LargeCremonaDatabase(MiniCremonaDa con.executemany("UPDATE t_curve SET gens=? WHERE curve=?", \ curve_data) print("Committing...") + self.commit() if largest_conductor and int(v[0]) > largest_conductor: break - _db = None + diff --git a/sagemath-env.patch b/sagemath-env.patch index 7f69094..b798986 100644 --- a/sagemath-env.patch +++ b/sagemath-env.patch @@ -1,6 +1,6 @@ diff -up src/sage/env.py.orig src/sage/env.py ---- src/sage/env.py.orig 2019-06-27 11:45:30.915744723 -0600 -+++ src/sage/env.py 2019-06-28 11:31:09.965474086 -0600 +--- src/sage/env.py.orig 2019-10-03 16:59:18.202495553 -0300 ++++ src/sage/env.py 2019-10-03 17:00:31.167931299 -0300 @@ -151,11 +151,11 @@ var('SAGE_DATE', version.date) var('SAGE_VERSION_BANNER', version.banner) @@ -27,13 +27,15 @@ diff -up src/sage/env.py.orig src/sage/env.py var('CONWAY_POLYNOMIALS_DATA_DIR', join(SAGE_SHARE, 'conway_polynomials')) var('GRAPHS_DATA_DIR', join(SAGE_SHARE, 'graphs')) var('ELLCURVE_DATA_DIR', join(SAGE_SHARE, 'ellcurves')) -@@ -181,9 +181,9 @@ var('CREMONA_MINI_DATA_DIR', joi +@@ -181,11 +181,11 @@ var('CREMONA_MINI_DATA_DIR', joi var('CREMONA_LARGE_DATA_DIR', join(SAGE_SHARE, 'cremona')) var('JMOL_DIR', join(SAGE_SHARE, 'jmol')) var('JSMOL_DIR', join(SAGE_SHARE, 'jsmol')) -var('MATHJAX_DIR', join(SAGE_SHARE, 'mathjax')) +var('MATHJAX_DIR', join('/usr', 'share', 'javascript', 'mathjax')) + var('MTXLIB', join(SAGE_SHARE, 'meataxe')) var('THREEJS_DIR', join(SAGE_SHARE, 'threejs')) + var('SINGULARPATH', join(SAGE_SHARE, 'singular')) -var('PPLPY_DOCS', join(SAGE_SHARE, 'doc', 'pplpy')) +var('PPLPY_DOCS', join('/usr', 'share', 'doc', 'python3-pplpy')) var('MAXIMA_FAS') diff --git a/sagemath-escape.patch b/sagemath-escape.patch deleted file mode 100644 index d81a410..0000000 --- a/sagemath-escape.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up src/sage/algebras/clifford_algebra.py.orig src/sage/algebras/clifford_algebra.py ---- src/sage/algebras/clifford_algebra.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/algebras/clifford_algebra.py 2019-09-11 15:46:56.658681891 -0600 -@@ -1520,7 +1520,7 @@ class ExteriorAlgebra(CliffordAlgebra): - return term - - def _ascii_art_term(self, m): -- """ -+ r""" - Return ascii art for the basis element indexed by ``m``. - - EXAMPLES:: -diff -up src/sage/combinat/crystals/alcove_path.py.orig src/sage/combinat/crystals/alcove_path.py ---- src/sage/combinat/crystals/alcove_path.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/combinat/crystals/alcove_path.py 2019-06-27 11:46:03.613253846 -0600 -@@ -383,7 +383,7 @@ class CrystalOfAlcovePaths(UniqueReprese - - One can compute all vertices of the crystal by finding all the - admissible subsets of the `\lambda`-chain (see method -- is_admissible, for definition). We use the breath first -+ is_admissible, for definition). We use the breadth first - search algorithm. - - .. WARNING:: -diff -up src/sage/rings/lazy_laurent_series_ring.py.orig src/sage/rings/lazy_laurent_series_ring.py ---- src/sage/rings/lazy_laurent_series_ring.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/lazy_laurent_series_ring.py 2019-09-11 15:41:19.871081870 -0600 -@@ -260,7 +260,7 @@ class LazyLaurentSeriesRing(UniqueRepres - return self._element_constructor_(0) - - def series(self, coefficient, valuation, constant=None): -- """ -+ r""" - Return a lazy Laurent series. - - INPUT: diff --git a/sagemath-extensions.patch b/sagemath-extensions.patch index 7e28575..81af869 100644 --- a/sagemath-extensions.patch +++ b/sagemath-extensions.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/module_list.py 2019-09-17 16:06:38.678583204 -0600 -@@ -357,16 +357,16 @@ ext_modules = [ +--- src/module_list.py.orig 2019-10-03 14:49:13.122428790 -0300 ++++ src/module_list.py 2019-10-03 14:49:25.274499871 -0300 +@@ -389,16 +389,16 @@ ext_modules = [ Extension('sage.graphs.matchpoly', sources = ['sage/graphs/matchpoly.pyx']), @@ -23,7 +23,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.graphs.planarity', sources = ['sage/graphs/planarity.pyx'], -@@ -385,10 +385,10 @@ ext_modules = [ +@@ -417,10 +417,10 @@ ext_modules = [ Extension('sage.graphs.graph_decompositions.cutwidth', sources = ['sage/graphs/graph_decompositions/cutwidth.pyx']), @@ -38,7 +38,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.graphs.spanning_tree', sources = ['sage/graphs/spanning_tree.pyx']), -@@ -440,9 +440,9 @@ ext_modules = [ +@@ -476,9 +476,9 @@ ext_modules = [ ## ################################ @@ -50,7 +50,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('*', ['sage/interfaces/*.pyx']), -@@ -461,21 +461,19 @@ ext_modules = [ +@@ -497,21 +497,19 @@ ext_modules = [ ## ################################ @@ -77,7 +77,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.libs.flint.flint', sources = ["sage/libs/flint/flint.pyx"], -@@ -504,10 +502,9 @@ ext_modules = [ +@@ -540,10 +538,9 @@ ext_modules = [ sources = ["sage/libs/homfly.pyx"], libraries = ["homfly", "gc"]), @@ -89,7 +89,7 @@ diff -up src/module_list.py.orig src/module_list.py language = 'c++'), Extension('*', ['sage/libs/linbox/*.pyx']), -@@ -527,10 +524,10 @@ ext_modules = [ +@@ -563,10 +560,10 @@ ext_modules = [ Extension('sage.libs.lrcalc.lrcalc', sources = ["sage/libs/lrcalc/lrcalc.pyx"]), @@ -104,7 +104,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('*', ['sage/libs/pari/*.pyx']), -@@ -841,10 +838,10 @@ ext_modules = [ +@@ -874,10 +871,10 @@ ext_modules = [ Extension('sage.matrix.matrix_window', sources = ['sage/matrix/matrix_window.pyx']), @@ -119,7 +119,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.matrix.misc', sources = ['sage/matrix/misc.pyx']), -@@ -1021,26 +1018,25 @@ ext_modules = [ +@@ -1053,26 +1050,25 @@ ext_modules = [ Extension("sage.numerical.backends.interactivelp_backend", ["sage/numerical/backends/interactivelp_backend.pyx"]), @@ -128,17 +128,18 @@ diff -up src/module_list.py.orig src/module_list.py - libraries = ["gurobi"], - condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and - os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")), -+# OptionalExtension("sage.numerical.backends.gurobi_backend", -+# ["sage/numerical/backends/gurobi_backend.pyx"], -+# libraries = ["gurobi"], -+# condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and -+# os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")), - +- - OptionalExtension("sage.numerical.backends.cplex_backend", - ["sage/numerical/backends/cplex_backend.pyx"], - libraries = ["cplex"], - condition = os.path.isfile(SAGE_INC + "/cplex.h") and - os.path.isfile(SAGE_LOCAL + "/lib/libcplex.a")), ++# OptionalExtension("sage.numerical.backends.gurobi_backend", ++# ["sage/numerical/backends/gurobi_backend.pyx"], ++# libraries = ["gurobi"], ++# condition = os.path.isfile(SAGE_INC + "/gurobi_c.h") and ++# os.path.isfile(SAGE_LOCAL + "/lib/libgurobi.so")), ++ +# OptionalExtension("sage.numerical.backends.cplex_backend", +# ["sage/numerical/backends/cplex_backend.pyx"], +# libraries = ["cplex"], diff --git a/sagemath-fes.patch b/sagemath-fes.patch index 093df9b..2867578 100644 --- a/sagemath-fes.patch +++ b/sagemath-fes.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-09-11 08:51:57.722696682 -0600 -+++ src/module_list.py 2019-09-11 08:52:38.084040542 -0600 -@@ -470,10 +470,10 @@ ext_modules = [ +--- src/module_list.py.orig 2019-10-03 16:04:08.373152682 -0300 ++++ src/module_list.py 2019-10-03 16:04:19.877225413 -0300 +@@ -506,10 +506,10 @@ ext_modules = [ Extension('sage.libs.ecl', sources = ["sage/libs/ecl.pyx"]), diff --git a/sagemath-formatargspec.patch b/sagemath-formatargspec.patch deleted file mode 100644 index e03392b..0000000 --- a/sagemath-formatargspec.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff -up src/sage/misc/sageinspect.py.orig src/sage/misc/sageinspect.py ---- src/sage/misc/sageinspect.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/misc/sageinspect.py 2019-09-11 08:58:24.194413905 -0600 -@@ -1658,6 +1658,121 @@ def sage_getargspec(obj): - defaults = None - return inspect.ArgSpec(args, varargs, varkw, defaults) - -+def formatannotation(annotation, base_module=None): -+ """ -+ This is taken from Python 3.7's inspect.py; the only change is to -+ add documentation. -+ -+ INPUT: -+ -+ - ``annotation`` -- annotation for a function -+ - ``base_module`` (optional, default ``None``) -+ -+ This is only relevant with Python 3, so the doctests are marked -+ accordingly. -+ -+ EXAMPLES:: -+ -+ sage: from sage.misc.sageinspect import formatannotation -+ sage: import inspect -+ sage: def foo(a, *, b:int, **kwargs): # py3 -+ ....: pass -+ ....: -+ sage: s = inspect.signature(foo) # py3 -+ -+ sage: a = s.parameters['a'].annotation # py3 -+ sage: a # py3 -+ -+ sage: formatannotation(a) # py3 -+ 'inspect._empty' -+ -+ sage: b = s.parameters['b'].annotation # py3 -+ sage: b # py3 -+ -+ sage: formatannotation(b) # py3 -+ 'int' -+ """ -+ if getattr(annotation, '__module__', None) == 'typing': -+ return repr(annotation).replace('typing.', '') -+ if isinstance(annotation, type): -+ if annotation.__module__ in ('builtins', base_module): -+ return annotation.__qualname__ -+ return annotation.__module__+'.'+annotation.__qualname__ -+ return repr(annotation) -+ -+def sage_formatargspec(args, varargs=None, varkw=None, defaults=None, -+ kwonlyargs=(), kwonlydefaults={}, annotations={}, -+ formatarg=str, -+ formatvarargs=lambda name: '*' + name, -+ formatvarkw=lambda name: '**' + name, -+ formatvalue=lambda value: '=' + repr(value), -+ formatreturns=lambda text: ' -> ' + text, -+ formatannotation=formatannotation): -+ """ -+ Format an argument spec from the values returned by getfullargspec. -+ -+ The first seven arguments are (args, varargs, varkw, defaults, -+ kwonlyargs, kwonlydefaults, annotations). The other five arguments -+ are the corresponding optional formatting functions that are called to -+ turn names and values into strings. The last argument is an optional -+ function to format the sequence of arguments. -+ -+ This is taken from Python 3.7's inspect.py, where it is -+ deprecated. The only change, aside from documentation (this -+ paragraph and the next, plus doctests), is to remove the -+ deprecation warning. -+ -+ Sage uses this function to format arguments, as obtained by -+ :func:`sage_getargspec`. Since :func:`sage_getargspec` works for -+ Cython functions while Python's inspect module does not, it makes -+ sense to keep this function for formatting instances of -+ ``inspect.ArgSpec``. -+ -+ EXAMPLES:: -+ -+ sage: from sage.misc.sageinspect import sage_formatargspec -+ sage: from inspect import formatargspec # deprecated in Python 3 -+ sage: args = ['a', 'b', 'c'] -+ sage: defaults = [3] -+ sage: sage_formatargspec(args, defaults=defaults) -+ '(a, b, c=3)' -+ sage: formatargspec(args, defaults=defaults) == sage_formatargspec(args, defaults=defaults) # py2 -+ True -+ sage: formatargspec(args, defaults=defaults) == sage_formatargspec(args, defaults=defaults) # py3 -+ doctest:...: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly -+ True -+ """ -+ def formatargandannotation(arg): -+ result = formatarg(arg) -+ if arg in annotations: -+ result += ': ' + formatannotation(annotations[arg]) -+ return result -+ specs = [] -+ if defaults: -+ firstdefault = len(args) - len(defaults) -+ for i, arg in enumerate(args): -+ spec = formatargandannotation(arg) -+ if defaults and i >= firstdefault: -+ spec = spec + formatvalue(defaults[i - firstdefault]) -+ specs.append(spec) -+ if varargs is not None: -+ specs.append(formatvarargs(formatargandannotation(varargs))) -+ else: -+ if kwonlyargs: -+ specs.append('*') -+ if kwonlyargs: -+ for kwonlyarg in kwonlyargs: -+ spec = formatargandannotation(kwonlyarg) -+ if kwonlydefaults and kwonlyarg in kwonlydefaults: -+ spec += formatvalue(kwonlydefaults[kwonlyarg]) -+ specs.append(spec) -+ if varkw is not None: -+ specs.append(formatvarkw(formatargandannotation(varkw))) -+ result = '(' + ', '.join(specs) + ')' -+ if 'return' in annotations: -+ result += formatreturns(formatannotation(annotations['return'])) -+ return result -+ - - def sage_getdef(obj, obj_name=''): - r""" -@@ -1693,7 +1808,7 @@ def sage_getdef(obj, obj_name=''): - """ - try: - spec = sage_getargspec(obj) -- s = str(inspect.formatargspec(*spec)) -+ s = str(sage_formatargspec(*spec)) - s = s.strip('(').strip(')').strip() - if s[:4] == 'self': - s = s[4:] -diff -up src/sage_setup/docbuild/ext/sage_autodoc.py.orig src/sage_setup/docbuild/ext/sage_autodoc.py ---- src/sage_setup/docbuild/ext/sage_autodoc.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage_setup/docbuild/ext/sage_autodoc.py 2019-09-11 08:59:53.728932096 -0600 -@@ -38,7 +38,7 @@ from six import PY2, iteritems, itervalu - import sphinx - from sphinx.errors import ExtensionError - from sphinx.ext.autodoc.importer import mock, import_object, get_object_members --from sphinx.ext.autodoc.inspector import format_annotation, formatargspec -+from sphinx.ext.autodoc.inspector import format_annotation - from sphinx.locale import _, __ - from sphinx.pycode import ModuleAnalyzer - from sphinx.errors import ExtensionError, PycodeError -@@ -51,7 +51,8 @@ from sphinx.util.inspect import Signatur - from sphinx.util.inspect import getargspec - - from sage.misc.sageinspect import (sage_getdoc_original, -- sage_getargspec, isclassinstance) -+ sage_getargspec, isclassinstance, -+ sage_formatargspec) - from sage.misc.lazy_import import LazyImport - - # This is used to filter objects of classes that inherit from -@@ -123,6 +124,16 @@ def bool_option(arg): - return True - - -+def formatargspec(function, args, varargs=None, varkw=None, defaults=None, -+ kwonlyargs=(), kwonlydefaults={}, annotations={}): -+ """ -+ Sphinx's version of formatargspec is deprecated, so use Sage's instead. -+ """ -+ return sage_formatargspec(args, varargs=varargs, varkw=varkw, defaults=defaults, -+ kwonlyargs=kwonlyargs, kwonlydefaults=kwonlydefaults, -+ annotations=annotations) -+ -+ - class AutodocReporter(object): - """ - A reporter replacement that assigns the correct source name diff --git a/sagemath-includes.patch b/sagemath-includes.patch index ef1e1cb..5cae945 100644 --- a/sagemath-includes.patch +++ b/sagemath-includes.patch @@ -1,6 +1,6 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-09-11 08:52:38.084040542 -0600 -+++ src/module_list.py 2019-09-11 09:03:51.394981074 -0600 +--- src/module_list.py.orig 2019-10-03 16:21:27.371721895 -0300 ++++ src/module_list.py 2019-10-03 16:28:36.076432442 -0300 @@ -44,6 +44,9 @@ zlib_libs = zlib_pc['libraries'] zlib_library_dirs = zlib_pc['library_dirs'] zlib_include_dirs = zlib_pc['include_dirs'] @@ -26,7 +26,7 @@ diff -up src/module_list.py.orig src/module_list.py ### Library order ######################################################### -@@ -133,7 +144,8 @@ ext_modules = [ +@@ -134,7 +145,8 @@ ext_modules = [ language='c++', libraries = ["gmp", "m", "ntl"]), @@ -36,7 +36,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('*', sources = ['sage/algebras/finite_dimensional_algebras/*.pyx']), -@@ -522,7 +534,8 @@ ext_modules = [ +@@ -558,7 +570,8 @@ ext_modules = [ [])), Extension('sage.libs.lrcalc.lrcalc', @@ -46,7 +46,7 @@ diff -up src/module_list.py.orig src/module_list.py # OptionalExtension("sage.libs.meataxe", # sources = ['sage/libs/meataxe.pyx'], -@@ -544,23 +557,28 @@ ext_modules = [ +@@ -580,23 +593,28 @@ ext_modules = [ sources = ['sage/libs/readline.pyx'], libraries = ['readline']), @@ -80,7 +80,7 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -568,7 +586,8 @@ ext_modules = [ +@@ -604,7 +622,8 @@ ext_modules = [ ## ################################### @@ -90,17 +90,17 @@ diff -up src/module_list.py.orig src/module_list.py ################################### ## -@@ -740,7 +759,8 @@ ext_modules = [ +@@ -776,7 +795,8 @@ ext_modules = [ Extension("sage.matrix.matrix_complex_ball_dense", ["sage/matrix/matrix_complex_ball_dense.pyx"], -- libraries=['arb']), +- libraries=[arb_dylib_name]), + include_dirs = arb_include_dirs, + libraries=arb_libs), Extension('sage.matrix.matrix_complex_double_dense', sources = ['sage/matrix/matrix_complex_double_dense.pyx']), -@@ -748,6 +768,7 @@ ext_modules = [ +@@ -784,6 +804,7 @@ ext_modules = [ Extension('sage.matrix.matrix_cyclo_dense', sources = ['sage/matrix/matrix_cyclo_dense.pyx'], language = "c++", @@ -108,7 +108,7 @@ diff -up src/module_list.py.orig src/module_list.py libraries=['ntl']), Extension('sage.matrix.matrix_gap', -@@ -810,6 +831,7 @@ ext_modules = [ +@@ -844,6 +865,7 @@ ext_modules = [ sources = ['sage/matrix/matrix_modn_sparse.pyx']), Extension('sage.matrix.matrix_mpolynomial_dense', @@ -116,7 +116,7 @@ diff -up src/module_list.py.orig src/module_list.py sources = ['sage/matrix/matrix_mpolynomial_dense.pyx']), Extension('sage.matrix.matrix_polynomial_dense', -@@ -1099,7 +1121,8 @@ ext_modules = [ +@@ -1131,7 +1153,8 @@ ext_modules = [ language = 'c++'), Extension("sage.rings.complex_arb", @@ -126,7 +126,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.complex_double', sources = ['sage/rings/complex_double.pyx'], -@@ -1175,7 +1198,8 @@ ext_modules = [ +@@ -1207,7 +1230,8 @@ ext_modules = [ sources = ['sage/rings/real_interval_absolute.pyx']), Extension("sage.rings.real_arb", @@ -136,7 +136,7 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.real_lazy', sources = ['sage/rings/real_lazy.pyx']), -@@ -1258,6 +1282,7 @@ ext_modules = [ +@@ -1290,6 +1314,7 @@ ext_modules = [ Extension('sage.rings.number_field.number_field_element_quadratic', sources = ['sage/rings/number_field/number_field_element_quadratic.pyx'], @@ -144,7 +144,7 @@ diff -up src/module_list.py.orig src/module_list.py libraries=['ntl'], language = 'c++'), -@@ -1397,12 +1422,15 @@ ext_modules = [ +@@ -1429,12 +1454,15 @@ ext_modules = [ sources = ['sage/rings/polynomial/multi_polynomial.pyx']), Extension('sage.rings.polynomial.multi_polynomial_ideal_libsingular', @@ -160,7 +160,7 @@ diff -up src/module_list.py.orig src/module_list.py sources = ['sage/rings/polynomial/multi_polynomial_libsingular.pyx']), Extension('sage.rings.polynomial.multi_polynomial_ring_base', -@@ -1415,7 +1443,8 @@ ext_modules = [ +@@ -1447,7 +1475,8 @@ ext_modules = [ sources = ['sage/rings/polynomial/polydict.pyx']), Extension('sage.rings.polynomial.polynomial_complex_arb', @@ -171,8 +171,8 @@ diff -up src/module_list.py.orig src/module_list.py Extension('sage.rings.polynomial.polynomial_compiled', sources = ['sage/rings/polynomial/polynomial_compiled.pyx']), diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-09-11 08:51:46.080885941 -0600 -+++ src/setup.py 2019-09-11 09:03:51.394981074 -0600 +--- src/setup.py.orig 2019-10-03 16:28:47.206502813 -0300 ++++ src/setup.py 2019-10-03 16:29:08.059634660 -0300 @@ -85,6 +85,7 @@ keep_going = False # search for dependencies and add to gcc -I diff --git a/sagemath-latte.patch b/sagemath-latte.patch index 3731637..44e879d 100644 --- a/sagemath-latte.patch +++ b/sagemath-latte.patch @@ -1,16 +1,16 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ---- src/sage/interfaces/latte.py.orig 2019-04-08 12:05:07.092855841 -0600 -+++ src/sage/interfaces/latte.py 2019-04-08 13:37:31.377803169 -0600 -@@ -113,7 +113,7 @@ def count(arg, ehrhart_polynomial=False, - # Check that LattE is present - Latte().require() +--- src/sage/interfaces/latte.py.orig 2019-10-03 16:52:46.496156266 -0300 ++++ src/sage/interfaces/latte.py 2019-10-03 16:53:00.776241550 -0300 +@@ -117,7 +117,7 @@ def count(arg, ehrhart_polynomial=False, + + arg = str_to_bytes(arg) - args = ['count'] + args = ['latte-count'] if ehrhart_polynomial and multivariate_generating_function: raise ValueError if ehrhart_polynomial: -@@ -308,7 +308,7 @@ def integrate(arg, polynomial=None, algo +@@ -317,7 +317,7 @@ def integrate(arg, polynomial=None, algo from sage.rings.rational import Rational diff --git a/sagemath-lcalc.patch b/sagemath-lcalc.patch index 1279dda..493eef6 100644 --- a/sagemath-lcalc.patch +++ b/sagemath-lcalc.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-06-27 11:30:20.794201914 -0600 -+++ src/module_list.py 2019-06-27 11:38:23.103196674 -0600 -@@ -514,7 +514,7 @@ ext_modules = [ +--- src/module_list.py.orig 2019-10-03 16:00:44.899866273 -0300 ++++ src/module_list.py 2019-10-03 16:00:56.451939308 -0300 +@@ -548,7 +548,7 @@ ext_modules = [ Extension('sage.libs.lcalc.lcalc_Lfunction', sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], libraries = ['m', 'ntl', 'Lfunction'], @@ -10,3 +10,12 @@ diff -up src/module_list.py.orig src/module_list.py language = 'c++'), Extension('sage.libs.libecm', +diff -up src/sage/libs/lcalc/lcalc_sage.h.orig src/sage/libs/lcalc/lcalc_sage.h +--- src/sage/libs/lcalc/lcalc_sage.h.orig 2019-10-25 15:58:31.890166910 -0300 ++++ src/sage/libs/lcalc/lcalc_sage.h 2019-10-25 15:59:02.535343196 -0300 +@@ -1,4 +1,4 @@ +-#include "Lfunction/L.h" ++#include "libLfunction/L.h" + int *new_ints(int l) + { + return new int[l]; diff --git a/sagemath-openblas.patch b/sagemath-openblas.patch index 6ee3743..6bb5985 100644 --- a/sagemath-openblas.patch +++ b/sagemath-openblas.patch @@ -1,6 +1,6 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-04-08 15:06:42.789735582 -0600 -+++ src/module_list.py 2019-04-08 15:09:46.553467045 -0600 +--- src/module_list.py.orig 2019-10-03 16:51:55.350850836 -0300 ++++ src/module_list.py 2019-10-03 16:52:06.479917297 -0300 @@ -11,20 +11,17 @@ SAGE_INC = '/usr/include' import pkgconfig @@ -29,9 +29,9 @@ diff -up src/module_list.py.orig src/module_list.py # GD image library gd_pc = pkgconfig.parse('gdlib') diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ---- src/sage/misc/cython.py.orig 2019-04-08 15:05:22.838157654 -0600 -+++ src/sage/misc/cython.py 2019-04-08 15:11:50.191262902 -0600 -@@ -38,10 +38,9 @@ from sage.misc.sage_ostools import resto +--- src/sage/misc/cython.py.orig 2019-10-03 16:51:42.848776173 -0300 ++++ src/sage/misc/cython.py 2019-10-03 16:52:06.480917303 -0300 +@@ -35,10 +35,9 @@ from sage.misc.sage_ostools import resto # CBLAS can be one of multiple implementations diff --git a/sagemath-python3.patch b/sagemath-python3.patch index 74b2331..15666b4 100644 --- a/sagemath-python3.patch +++ b/sagemath-python3.patch @@ -1,6 +1,6 @@ diff -up build/pkgs/sagenb/src/sagenb/misc/support.py.orig build/pkgs/sagenb/src/sagenb/misc/support.py ---- build/pkgs/sagenb/src/sagenb/misc/support.py.orig 2019-02-01 06:34:20.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/misc/support.py 2019-04-08 12:02:29.162692936 -0600 +--- build/pkgs/sagenb/src/sagenb/misc/support.py.orig 2019-10-09 15:29:08.866640263 -0300 ++++ build/pkgs/sagenb/src/sagenb/misc/support.py 2019-10-09 15:29:13.695667468 -0300 @@ -178,7 +178,7 @@ def completions(s, globs, format=False, try: if not '.' in s and not '(' in s: @@ -11,8 +11,8 @@ diff -up build/pkgs/sagenb/src/sagenb/misc/support.py.orig build/pkgs/sagenb/src if not ')' in s: i = s.rfind('.') diff -up build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py ---- build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig 2019-02-01 05:37:36.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py 2019-04-08 11:59:49.259545960 -0600 +--- build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig 2019-10-09 15:29:08.867640268 -0300 ++++ build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py 2019-10-09 15:29:13.696667474 -0300 @@ -25,7 +25,7 @@ This module contains three classes: .. NOTE:: @@ -32,8 +32,8 @@ diff -up build/pkgs/sagenb/src/sagenb/notebook/docHTMLProcessor.py.orig build/pk # HTMLParser, and may never actually be visibly called here. diff -up build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py ---- build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig 2019-02-01 05:37:36.000000000 -0700 -+++ build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py 2019-04-08 11:59:49.260545943 -0600 +--- build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig 2019-10-09 15:29:08.870640285 -0300 ++++ build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py 2019-10-09 15:29:13.697667479 -0300 @@ -59,7 +59,7 @@ class Parser: 'parent': r'(?:%s)?' % re.escape(PARENT_PREFIX), } @@ -44,8 +44,8 @@ diff -up build/pkgs/sagenb/src/sagenb/notebook/wiki2html.py.orig build/pkgs/sage 'punct': punct_pattern, } diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/extractsagecode.py ---- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-01-09 09:51:28.000000000 -0700 -+++ build/pkgs/sagetex/src/extractsagecode.py 2019-06-27 11:33:54.098080502 -0600 +--- build/pkgs/sagetex/src/extractsagecode.py.orig 2019-10-09 15:29:08.872640297 -0300 ++++ build/pkgs/sagetex/src/extractsagecode.py 2019-10-09 15:29:13.697667479 -0300 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d try: @@ -56,8 +56,8 @@ diff -up build/pkgs/sagetex/src/extractsagecode.py.orig build/pkgs/sagetex/src/e usage() sys.exit(2) diff -up build/pkgs/sagetex/src/makestatic.py.orig build/pkgs/sagetex/src/makestatic.py ---- build/pkgs/sagetex/src/makestatic.py.orig 2019-01-09 09:51:28.000000000 -0700 -+++ build/pkgs/sagetex/src/makestatic.py 2019-06-27 11:33:54.098080502 -0600 +--- build/pkgs/sagetex/src/makestatic.py.orig 2019-10-09 15:29:08.874640308 -0300 ++++ build/pkgs/sagetex/src/makestatic.py 2019-10-09 15:29:13.698667485 -0300 @@ -45,7 +45,7 @@ See the SageTeX documentation for more d try: @@ -68,8 +68,8 @@ diff -up build/pkgs/sagetex/src/makestatic.py.orig build/pkgs/sagetex/src/makest usage() sys.exit(2) diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/remote-sagetex.py ---- build/pkgs/sagetex/src/remote-sagetex.py.orig 2019-01-09 09:51:28.000000000 -0700 -+++ build/pkgs/sagetex/src/remote-sagetex.py 2019-04-08 11:59:49.263545889 -0600 +--- build/pkgs/sagetex/src/remote-sagetex.py.orig 2019-10-09 15:29:08.876640319 -0300 ++++ build/pkgs/sagetex/src/remote-sagetex.py 2019-10-09 15:29:13.698667485 -0300 @@ -24,12 +24,11 @@ ## You should have received a copy of the GNU General Public License along ## with this program. If not, see . @@ -133,8 +133,8 @@ diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/re if not password: from getpass import getpass diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sagetexparse.py ---- build/pkgs/sagetex/src/sagetexparse.py.orig 2019-01-09 09:51:28.000000000 -0700 -+++ build/pkgs/sagetex/src/sagetexparse.py 2019-09-10 12:24:06.752516723 -0600 +--- build/pkgs/sagetex/src/sagetexparse.py.orig 2019-10-09 15:29:08.877640325 -0300 ++++ build/pkgs/sagetex/src/sagetexparse.py 2019-10-09 15:29:13.699667491 -0300 @@ -132,7 +132,7 @@ class SageCodeExtractor(): def plotout(self, s, l, t): @@ -144,42 +144,9 @@ diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sage self.result += '# format: %s' % t.format[0][1:-1] + '\n' self.result += t.code[1:-1] + '\n\n' -diff -up src/doc/common/conf.py.orig src/doc/common/conf.py ---- src/doc/common/conf.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/doc/common/conf.py 2019-06-27 11:33:54.099080488 -0600 -@@ -566,7 +566,7 @@ skip_picklability_check_modules = [ - #'sage.misc.nested_class_test', # for test only - 'sage.misc.latex', - 'sage.misc.explain_pickle', -- '__builtin__', -+ 'builtins', - ] - - def check_nested_class_picklability(app, what, name, obj, skip, options): -@@ -615,7 +615,7 @@ def skip_member(app, what, name, obj, sk - if 'SAGE_CHECK_NESTED' in os.environ: - check_nested_class_picklability(app, what, name, obj, skip, options) - -- if getattr(obj, '__module__', None) == '__builtin__': -+ if getattr(obj, '__module__', None) == 'builtins': - return True - - objname = getattr(obj, "__name__", None) -diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py ---- src/sage/coding/linear_code.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/coding/linear_code.py 2019-09-10 12:21:10.421332817 -0600 -@@ -3793,7 +3793,7 @@ class LinearCode(AbstractLinearCode): - [1 2 1] - [2 1 1] - """ -- if encoder_name is None or encoder_name is 'GeneratorMatrix': -+ if encoder_name is None or encoder_name == 'GeneratorMatrix': - g = self._generator_matrix - else: - g = super(LinearCode, self).generator_matrix(encoder_name, **kwargs) diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite_state_machine.py ---- src/sage/combinat/finite_state_machine.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/combinat/finite_state_machine.py 2019-06-27 11:36:38.804783269 -0600 +--- src/sage/combinat/finite_state_machine.py.orig 2019-10-09 15:29:08.880640342 -0300 ++++ src/sage/combinat/finite_state_machine.py 2019-10-09 15:29:13.703667513 -0300 @@ -936,7 +936,7 @@ from six.moves import range, zip_longest from six import itervalues @@ -189,7 +156,7 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite import itertools from copy import copy, deepcopy -@@ -14207,7 +14207,7 @@ def is_FSMProcessIterator(PI): +@@ -14166,7 +14166,7 @@ def is_FSMProcessIterator(PI): class FSMProcessIterator(SageObject, @@ -199,8 +166,8 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite This class takes an input, feeds it into a finite state machine (automaton or transducer, in particular), tests whether this was diff -up src/sage/combinat/multiset_partition_into_sets_ordered.py.orig src/sage/combinat/multiset_partition_into_sets_ordered.py ---- src/sage/combinat/multiset_partition_into_sets_ordered.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/combinat/multiset_partition_into_sets_ordered.py 2019-09-10 12:20:47.787694285 -0600 +--- src/sage/combinat/multiset_partition_into_sets_ordered.py.orig 2019-10-09 15:29:08.882640353 -0300 ++++ src/sage/combinat/multiset_partition_into_sets_ordered.py 2019-10-09 15:29:13.704667519 -0300 @@ -1952,7 +1952,7 @@ class OrderedMultisetPartitionsIntoSets( # slice by 'order' @@ -211,8 +178,8 @@ diff -up src/sage/combinat/multiset_partition_into_sets_ordered.py.orig src/sage # slice by 'size' diff -up src/sage/combinat/root_system/branching_rules.py.orig src/sage/combinat/root_system/branching_rules.py ---- src/sage/combinat/root_system/branching_rules.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/combinat/root_system/branching_rules.py 2019-09-09 15:08:59.383139652 -0600 +--- src/sage/combinat/root_system/branching_rules.py.orig 2019-10-09 15:29:08.884640364 -0300 ++++ src/sage/combinat/root_system/branching_rules.py 2019-10-09 15:29:13.707667536 -0300 @@ -1750,7 +1750,7 @@ def branching_rule(Rtype, Stype, rule="d elif rule == "tensor" or rule == "tensor-debug": if not Stype.is_compound(): @@ -222,33 +189,10 @@ diff -up src/sage/combinat/root_system/branching_rules.py.orig src/sage/combinat raise ValueError("Not implemented") if Rtype[0] == 'A': nr = Rtype[1]+1 -diff -up src/sage/cpython/dict_del_by_value.pyx.orig src/sage/cpython/dict_del_by_value.pyx ---- src/sage/cpython/dict_del_by_value.pyx.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/cpython/dict_del_by_value.pyx 2019-09-09 15:32:24.921024261 -0600 -@@ -291,7 +291,7 @@ ELIF PY_VERSION_HEX>=0x03060000: - #general lookup function (which can deal with DKIX_DUMMY) - PyDict_GetItemWithError(mp,None) - #this can actually fail if mp is a dictionary with split table -- assert DK_LOOKUP(mp) == lookdict -+ #assert DK_LOOKUP(mp) == lookdict - - cdef del_dictitem_by_exact_value(PyDictObject *mp, PyObject *value, Py_hash_t hash): - """ -@@ -347,8 +347,8 @@ ELIF PY_VERSION_HEX>=0x03060000: - cdef MyPyDictKeysObject * keys = (mp.ma_keys) - cdef size_t perturb - cdef size_t mask = keys.dk_size-1 -- cdef PyDictKeyEntry *entries, *ep -- entries = DK_ENTRIES(keys) -+ cdef PyDictKeyEntry *ep -+ cdef PyDictKeyEntry *entries = DK_ENTRIES(keys) - - if mp.ma_values != NULL: - print ("del_dictitem_by_exact_value cannot be applied to a shared key dict") diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/geometry/triangulation/point_configuration.py ---- src/sage/geometry/triangulation/point_configuration.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/geometry/triangulation/point_configuration.py 2019-06-27 11:33:54.103080432 -0600 -@@ -623,7 +623,7 @@ class PointConfiguration(UniqueRepresent +--- src/sage/geometry/triangulation/point_configuration.py.orig 2019-10-09 15:29:08.886640376 -0300 ++++ src/sage/geometry/triangulation/point_configuration.py 2019-10-09 15:29:13.707667536 -0300 +@@ -619,7 +619,7 @@ class PointConfiguration(UniqueRepresent ['{{0,1,2,4},{1,2,3,4}}'] """ timeout = 600 @@ -257,82 +201,21 @@ diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/ge proc.expect(r'Evaluating Commandline Options \.\.\.') proc.expect(r'\.\.\. done\.') proc.setecho(0) -diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py ---- src/sage/graphs/graph_latex.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/graphs/graph_latex.py 2019-09-10 12:23:28.891121378 -0600 -@@ -1156,7 +1156,7 @@ class GraphLatex(SageObject): - # - elif name in color_dicts: - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, c in value.items(): - try: -@@ -1165,42 +1165,42 @@ class GraphLatex(SageObject): - raise ValueError('%s option for %s needs to be a matplotlib color (always as a string), not %s' % (name, key, c)) - elif name in positive_scalar_dicts: - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, x in value.items(): - if not type(x) in [int, Integer, float, RealLiteral] or not x >= 0.0: - raise ValueError('%s option for %s needs to be a positive number, not %s' % (name, key, x)) - elif name in boolean_dicts: - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, b in value.items(): - if not isinstance(b, bool): - raise ValueError('%s option for %s needs to be True or False, not %s' % (name, key, b)) - elif name == 'vertex_shapes': - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, s in value.items(): - if s not in shape_names: - raise ValueError('%s option for %s needs to be a vertex shape, not %s' % (name, key, s)) - elif name == 'vertex_label_placements': - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, p in value.items(): - if not(p == 'center') and not(isinstance(p, tuple) and len(p) == 2 and type(p[0]) in number_types and p[0] >= 0 and type(p[1]) in number_types and p[1] >= 0): - raise ValueError('%s option for %s needs to be None or a pair of positive numbers, not %s' % (name, key, p)) - elif name == 'edge_label_placements': - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, p in value.items(): - if not(type(p) in [float, RealLiteral] and (0 <= p) and (p <= 1)) and not(p in label_places): - raise ValueError('%s option for %s needs to be a number between 0.0 and 1.0 or a place (like "above"), not %s' % (name, key, p)) - elif name == 'loop_placements': - if not isinstance(value, dict): -- raise TypeError('%s option must be a dictionary, not %s' (name, value)) -+ raise TypeError('%s option must be a dictionary, not %s' % (name, value)) - else: - for key, p in value.items(): - if not((isinstance(p, tuple)) and (len(p) == 2) and (p[0] >= 0) and (p[1] in compass_points)): diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py ---- src/sage/interfaces/frobby.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/frobby.py 2019-06-27 11:33:54.103080432 -0600 +--- src/sage/interfaces/frobby.py.orig 2019-10-09 15:29:08.888640387 -0300 ++++ src/sage/interfaces/frobby.py 2019-10-09 15:29:13.707667536 -0300 @@ -77,7 +77,7 @@ class Frobby: print("Frobby command: ", repr(command)) print("Frobby input:\n", input) - process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE) -+ process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE, encoding='utf-8') ++ process = Popen(command, stdin = PIPE, stdout = PIPE, stderr = PIPE, enconding='utf-8') output, err = process.communicate(input = input) if verbose: diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py ---- src/sage/interfaces/gfan.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/gfan.py 2019-06-27 11:33:54.104080419 -0600 +--- src/sage/interfaces/gfan.py.orig 2019-10-09 15:29:08.889640393 -0300 ++++ src/sage/interfaces/gfan.py 2019-10-09 15:29:13.708667541 -0300 @@ -66,7 +66,7 @@ class Gfan(object): if six.PY2: enc_kwargs = {} @@ -343,8 +226,8 @@ diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py gfan_processes = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, **enc_kwargs) diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py ---- src/sage/interfaces/gp.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/gp.py 2019-06-27 11:33:54.104080419 -0600 +--- src/sage/interfaces/gp.py.orig 2019-10-09 15:29:08.891640404 -0300 ++++ src/sage/interfaces/gp.py 2019-10-09 15:29:13.709667547 -0300 @@ -934,17 +934,6 @@ class GpElement(ExpectElement): """ return repr(self.type()) == 't_STR' @@ -364,9 +247,9 @@ diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py """ Return Python float. diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ---- src/sage/interfaces/latte.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/latte.py 2019-06-27 11:33:54.104080419 -0600 -@@ -148,6 +148,7 @@ def count(arg, ehrhart_polynomial=False, +--- src/sage/interfaces/latte.py.orig 2019-10-09 15:29:08.893640415 -0300 ++++ src/sage/interfaces/latte.py 2019-10-09 15:29:13.709667547 -0300 +@@ -152,6 +152,7 @@ def count(arg, ehrhart_polynomial=False, latte_proc = Popen(args, stdin=PIPE, stdout=PIPE, stderr=(None if verbose else PIPE), @@ -374,7 +257,7 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py cwd=str(SAGE_TMP)) ans, err = latte_proc.communicate(arg) -@@ -355,6 +356,7 @@ def integrate(arg, polynomial=None, algo +@@ -364,6 +365,7 @@ def integrate(arg, polynomial=None, algo latte_proc = Popen(args, stdin=PIPE, stdout=PIPE, stderr=(None if verbose else PIPE), @@ -383,8 +266,8 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py ans, err = latte_proc.communicate(arg) diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.pyx ---- src/sage/interfaces/sagespawn.pyx.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/interfaces/sagespawn.pyx 2019-06-27 11:33:54.104080419 -0600 +--- src/sage/interfaces/sagespawn.pyx.orig 2019-10-09 15:29:08.894640421 -0300 ++++ src/sage/interfaces/sagespawn.pyx 2019-10-09 15:29:13.709667547 -0300 @@ -1,6 +1,6 @@ """ Sage wrapper around pexpect's ``spawn`` class and @@ -433,9 +316,9 @@ diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.py pass self.fileobj.close() diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter.pyx ---- src/sage/libs/coxeter3/coxeter.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/libs/coxeter3/coxeter.pyx 2019-09-12 14:57:59.755712128 -0600 -@@ -32,7 +32,7 @@ cdef class String: +--- src/sage/libs/coxeter3/coxeter.pyx.orig 2019-10-09 15:29:08.896640432 -0300 ++++ src/sage/libs/coxeter3/coxeter.pyx 2019-10-09 15:29:13.709667547 -0300 +@@ -33,7 +33,7 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -444,7 +327,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. hello sage: del s # optional - coxeter3 """ -@@ -43,11 +43,11 @@ cdef class String: +@@ -44,11 +44,11 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -453,12 +336,12 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: s # optional - coxeter3 Hi """ -- return self.x.ptr() +- return bytes_to_str(self.x.ptr()) + return self.x.ptr().decode('utf-8') def __hash__(self): """ -@@ -59,7 +59,7 @@ cdef class String: +@@ -60,7 +60,7 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -467,7 +350,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: hash(s) == hash('hello') # optional - coxeter3 True """ -@@ -70,9 +70,9 @@ cdef class String: +@@ -71,9 +71,9 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -480,7 +363,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: ta1 == ta2 # optional - coxeter3 True sage: tb != ta1 # optional - coxeter3 -@@ -108,7 +108,7 @@ cdef class String: +@@ -109,7 +109,7 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -489,7 +372,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: len(s) # optional - coxeter3 2 """ -@@ -119,7 +119,7 @@ cdef class String: +@@ -120,7 +120,7 @@ cdef class String: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3 @@ -498,7 +381,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: TestSuite(s).run() # optional - coxeter3 """ return (String, (repr(self),) ) -@@ -133,7 +133,7 @@ cdef class Type: +@@ -134,7 +134,7 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -507,7 +390,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. A sage: del t # optional - coxeter3 """ -@@ -144,17 +144,17 @@ cdef class Type: +@@ -145,7 +145,7 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -515,11 +398,8 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. + sage: t = Type(b'A'); t # optional - coxeter3 A """ -- return self.x.name().ptr() -+ return self.x.name().ptr().decode('utf-8') - - def name(self): - """ + return bytes_to_str(self.x.name().ptr()) +@@ -155,7 +155,7 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -528,7 +408,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: t.name() # optional - coxeter3 A """ -@@ -170,8 +170,8 @@ cdef class Type: +@@ -171,8 +171,8 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -539,7 +419,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: hash(a) == hash(b) # optional - coxeter3 False sage: d = {a: 1, b: 2} # optional - coxeter3 -@@ -183,9 +183,9 @@ cdef class Type: +@@ -184,9 +184,9 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -552,7 +432,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: ta1 == ta2 # optional - coxeter3 True sage: tb != ta1 # optional - coxeter3 -@@ -219,7 +219,7 @@ cdef class Type: +@@ -220,7 +220,7 @@ cdef class Type: EXAMPLES:: sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3 @@ -561,7 +441,7 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. sage: TestSuite(t).run() # optional - coxeter3 """ return (Type, (repr(self), )) -@@ -256,7 +256,7 @@ cdef class CoxGroup(SageObject): +@@ -257,7 +257,7 @@ cdef class CoxGroup(SageObject): type = type.lower() rank = rank + 1 @@ -571,8 +451,8 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter. if rank == 0: raise NotImplementedError("Coxeter group of type ['A',0] using Coxeter 3 not yet implemented") diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx ---- src/sage/misc/parser.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/misc/parser.pyx 2019-06-27 11:33:54.105080405 -0600 +--- src/sage/misc/parser.pyx.orig 2019-10-09 15:29:08.898640443 -0300 ++++ src/sage/misc/parser.pyx 2019-10-09 15:30:11.051990579 -0300 @@ -96,7 +96,7 @@ def token_to_str(int token): @@ -810,7 +690,7 @@ diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx operand2 = self.p_factor(tokens) return operand1 ** operand2 - elif token == "!": -+ elif token == c'!': ++ elif token == c"!": from sage.functions.all import factorial operand1 = factorial(operand1) - if tokens.peek() == '^': @@ -867,25 +747,13 @@ diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx tokens.next() return name, self.p_expr(tokens) - if token == "[" : -+ if token == c'[' : ++ if token == c"[" : tokens.backtrack() return self.p_list(tokens) else: -diff -up src/sage/modular/abvar/abvar.py.orig src/sage/modular/abvar/abvar.py ---- src/sage/modular/abvar/abvar.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/modular/abvar/abvar.py 2019-09-09 15:08:24.875810751 -0600 -@@ -3703,7 +3703,7 @@ class ModularAbelianVariety_abstract(Par - C = self.__complement - except AttributeError: - pass -- if self.dimension() is 0: -+ if self.dimension() == 0: - if A is None: - C = self.ambient_variety() - else: diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py ---- src/sage/plot/plot3d/plot3d.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/plot/plot3d/plot3d.py 2019-06-27 11:33:54.105080405 -0600 +--- src/sage/plot/plot3d/plot3d.py.orig 2019-10-09 15:29:08.899640449 -0300 ++++ src/sage/plot/plot3d/plot3d.py 2019-10-09 15:29:13.710667553 -0300 @@ -188,7 +188,8 @@ class _Coordinates(object): sage: arb((x+z,y*z,z), z, (x,y)) Arbitrary Coordinates coordinate transform (z in terms of x, y) @@ -897,8 +765,8 @@ diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s'%list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var])))) self.dep_var = dep_var diff -up src/sage/plot/point.py.orig src/sage/plot/point.py ---- src/sage/plot/point.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/plot/point.py 2019-06-27 11:33:54.105080405 -0600 +--- src/sage/plot/point.py.orig 2019-10-09 15:29:08.901640460 -0300 ++++ src/sage/plot/point.py 2019-10-09 15:29:13.711667558 -0300 @@ -29,7 +29,7 @@ TESTS:: from sage.misc.decorators import options, rename_keyword from sage.plot.colors import to_mpl_color @@ -918,8 +786,8 @@ diff -up src/sage/plot/point.py.orig src/sage/plot/point.py try: diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_repr.py ---- src/sage/repl/display/fancy_repr.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/repl/display/fancy_repr.py 2019-06-27 11:33:54.106080391 -0600 +--- src/sage/repl/display/fancy_repr.py.orig 2019-10-09 15:29:08.903640471 -0300 ++++ src/sage/repl/display/fancy_repr.py 2019-10-09 15:29:13.711667558 -0300 @@ -15,7 +15,7 @@ Representations of objects. import types @@ -939,8 +807,8 @@ diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_re else: # A user-provided repr. Find newlines and replace them with p.break_() diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_kernel/interact.py ---- src/sage/repl/ipython_kernel/interact.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/repl/ipython_kernel/interact.py 2019-06-27 11:33:54.106080391 -0600 +--- src/sage/repl/ipython_kernel/interact.py.orig 2019-10-09 15:29:08.904640477 -0300 ++++ src/sage/repl/ipython_kernel/interact.py 2019-10-09 15:29:13.711667558 -0300 @@ -35,7 +35,8 @@ EXAMPLES:: from ipywidgets.widgets import SelectionSlider, ValueWidget, ToggleButtons @@ -952,9 +820,9 @@ diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_ker from .widgets_sagenb import input_grid from sage.structure.element import parent diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx ---- src/sage/rings/integer.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/integer.pyx 2019-06-27 11:33:54.107080377 -0600 -@@ -6989,7 +6989,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c +--- src/sage/rings/integer.pyx.orig 2019-10-09 15:29:08.906640488 -0300 ++++ src/sage/rings/integer.pyx 2019-10-09 15:29:13.712667564 -0300 +@@ -7124,7 +7124,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c while x[0] == c' ': x += 1 # Strip spaces # Disallow a sign here @@ -964,9 +832,9 @@ diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx assert base >= 2 diff -up src/sage/rings/multi_power_series_ring_element.py.orig src/sage/rings/multi_power_series_ring_element.py ---- src/sage/rings/multi_power_series_ring_element.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/multi_power_series_ring_element.py 2019-09-09 15:01:45.746217568 -0600 -@@ -1417,7 +1417,7 @@ class MPowerSeries(PowerSeries): +--- src/sage/rings/multi_power_series_ring_element.py.orig 2019-10-09 15:29:08.908640499 -0300 ++++ src/sage/rings/multi_power_series_ring_element.py 2019-10-09 15:29:13.712667564 -0300 +@@ -1396,7 +1396,7 @@ class MPowerSeries(PowerSeries): # at this stage, self is probably a non-zero # element of the base ring for a in range(len(self._bg_value.list())): @@ -976,21 +844,21 @@ diff -up src/sage/rings/multi_power_series_ring_element.py.orig src/sage/rings/m def is_nilpotent(self): diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx ---- src/sage/rings/polynomial/pbori.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/polynomial/pbori.pyx 2019-06-27 11:33:54.123080154 -0600 +--- src/sage/rings/polynomial/pbori.pyx.orig 2019-10-09 15:29:08.910640511 -0300 ++++ src/sage/rings/polynomial/pbori.pyx 2019-10-09 15:29:13.713667570 -0300 @@ -4765,8 +4765,7 @@ cdef class PolynomialConstruct: # So, it is just a conversion. [Simon King] return (ring)._element_constructor_(x) -- raise TypeError("Cannot generate Boolean polynomial from %s , %s%" % +- raise TypeError("Cannot generate Boolean polynomial from %s , %s" % - (type(x), type(ring))) + raise TypeError(f"Cannot generate Boolean polynomial from {type(x)}, {type(ring)}") cdef class MonomialConstruct: diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx ---- src/sage/rings/real_mpfi.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/real_mpfi.pyx 2019-06-27 11:33:54.124080141 -0600 +--- src/sage/rings/real_mpfi.pyx.orig 2019-10-09 15:29:08.911640516 -0300 ++++ src/sage/rings/real_mpfi.pyx 2019-10-09 15:29:13.715667581 -0300 @@ -1943,12 +1943,12 @@ cdef class RealIntervalFieldElement(Ring cdef long digits @@ -1016,8 +884,8 @@ diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx mant_string = bytes_to_str(tmp_cstr+1) sign_string = bytes_to_str(b'-') diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx ---- src/sage/rings/real_mpfr.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/rings/real_mpfr.pyx 2019-06-27 11:33:54.125080127 -0600 +--- src/sage/rings/real_mpfr.pyx.orig 2019-10-09 15:29:08.913640528 -0300 ++++ src/sage/rings/real_mpfr.pyx 2019-10-09 15:29:13.715667581 -0300 @@ -2039,7 +2039,7 @@ cdef class RealNumber(sage.structure.ele if s is NULL: raise RuntimeError("unable to convert an mpfr number to a string") @@ -1028,8 +896,8 @@ diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx t = char_to_str(s + 1) else: diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object.pyx ---- src/sage/structure/sage_object.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/structure/sage_object.pyx 2019-06-27 11:33:54.126080113 -0600 +--- src/sage/structure/sage_object.pyx.orig 2019-10-09 15:29:08.915640539 -0300 ++++ src/sage/structure/sage_object.pyx 2019-10-09 15:29:13.715667581 -0300 @@ -665,7 +665,7 @@ cdef class SageObject: try: s = self._interface_init_(I) @@ -1040,9 +908,9 @@ diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object. if c: try: diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx ---- src/sage/symbolic/expression.pyx.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/symbolic/expression.pyx 2019-06-27 11:33:54.128080085 -0600 -@@ -12960,7 +12960,7 @@ cdef class hold_class: +--- src/sage/symbolic/expression.pyx.orig 2019-10-09 15:29:08.917640550 -0300 ++++ src/sage/symbolic/expression.pyx 2019-10-09 15:29:13.719667603 -0300 +@@ -12916,7 +12916,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -1051,7 +919,7 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx def __exit__(self, *args): """ -@@ -12973,7 +12973,7 @@ cdef class hold_class: +@@ -12929,7 +12929,7 @@ cdef class hold_class: sage: SR(2)^5 32 """ @@ -1061,9 +929,9 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx def start(self): """ diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-06-27 11:30:20.794201914 -0600 -+++ src/setup.py 2019-06-27 11:33:54.128080085 -0600 -@@ -232,7 +232,7 @@ class sage_build_cython(Command): +--- src/setup.py.orig 2019-10-09 15:28:16.478345141 -0300 ++++ src/setup.py 2019-10-09 15:29:13.720667609 -0300 +@@ -233,7 +233,7 @@ class sage_build_cython(Command): cdivision=True, embedsignature=True, fast_getattr=True, diff --git a/sagemath-rpmbuild.patch b/sagemath-rpmbuild.patch index 2af74dd..35721a8 100644 --- a/sagemath-rpmbuild.patch +++ b/sagemath-rpmbuild.patch @@ -1,6 +1,6 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2019-06-27 11:29:54.622601184 -0600 -+++ src/module_list.py 2019-06-27 11:30:20.794201914 -0600 +--- src/module_list.py.orig 2019-10-03 14:49:57.072685858 -0300 ++++ src/module_list.py 2019-10-03 14:50:05.889737429 -0300 @@ -2,7 +2,7 @@ import os from distutils.extension import Extension from sage.env import SAGE_LOCAL @@ -11,9 +11,9 @@ diff -up src/module_list.py.orig src/module_list.py ######################################################### ### pkg-config setup diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ---- src/sage/misc/cython.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/misc/cython.py 2019-06-27 11:30:20.794201914 -0600 -@@ -49,7 +49,7 @@ standard_libs = [ +--- src/sage/misc/cython.py.orig 2019-10-03 14:49:48.553636029 -0300 ++++ src/sage/misc/cython.py 2019-10-03 14:50:05.890737435 -0300 +@@ -46,7 +46,7 @@ standard_libs = [ ] + cblas_libs + [ 'ntl'] @@ -22,69 +22,3 @@ diff -up src/sage/misc/cython.py.orig src/sage/misc/cython.py ################################################################ -diff -up src/setup.py.orig src/setup.py ---- src/setup.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/setup.py 2019-06-27 11:30:20.794201914 -0600 -@@ -318,9 +318,8 @@ class sage_build_cython(Command): - # Debugging - gdb_debug=self.debug, - output_dir=os.path.join(self.build_lib, "sage"), -- # Disable Cython caching, which is currently too broken to -- # use reliably: http://trac.sagemath.org/ticket/17851 -- cache=False, -+ # Enable Cython caching (the cache is stored in ~/.cycache) -+ cache=True, - ) - - # Filter out extensions with skip_build=True -@@ -795,9 +794,6 @@ class sage_install(install): - install.run(self) - self.install_kernel_spec() - log.info('Cleaning up stale installed files....') -- t = time.time() -- self.clean_stale_files() -- log.info('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) - - def install_kernel_spec(self): - """ -@@ -814,40 +810,6 @@ class sage_install(install): - # the install_data directory for installing our Jupyter files. - SageKernelSpec.update(prefix=self.install_data) - -- def clean_stale_files(self): -- """ -- Remove stale installed files. -- -- This removes files which are built/installed but which do not -- exist in the Sage sources (typically because some source file -- has been deleted). Files are removed from the build directory -- ``build/lib-*`` and from the install directory ``site-packages``. -- """ -- dist = self.distribution -- cmd_build_py = self.get_finalized_command("build_py") -- cmd_build_cython = self.get_finalized_command("build_cython") -- -- # Determine all Python modules inside all packages -- py_modules = [] -- for package in dist.packages: -- package_dir = cmd_build_py.get_package_dir(package) -- py_modules += cmd_build_py.find_package_modules(package, package_dir) -- # modules is a list of triples (package, module, module_file). -- # Construct the complete module name from this. -- py_modules = ["{0}.{1}".format(*m) for m in py_modules] -- -- # Clean install directory (usually, purelib and platlib are the same) -- # and build directory. -- output_dirs = [self.install_purelib, self.install_platlib, self.build_lib] -- from sage_setup.clean import clean_install_dir -- for output_dir in set(output_dirs): -- log.info('- cleaning {0}'.format(output_dir)) -- clean_install_dir(output_dir, -- dist.packages, -- py_modules, -- dist.ext_modules, -- cmd_build_cython.get_cythonized_package_files()) -- - - ######################################################### - ### Distutils diff --git a/sagemath-sagedoc.patch b/sagemath-sagedoc.patch index 7a3bd69..589ab64 100644 --- a/sagemath-sagedoc.patch +++ b/sagemath-sagedoc.patch @@ -1,6 +1,6 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py ---- src/sage/doctest/control.py.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/sage/doctest/control.py 2019-06-27 11:30:37.222951288 -0600 +--- src/sage/doctest/control.py.orig 2019-10-03 14:51:45.323319025 -0300 ++++ src/sage/doctest/control.py 2019-10-03 14:52:24.063545626 -0300 @@ -106,7 +106,6 @@ class DocTestDefaults(SageObject): self.valgrind = False self.massif = False @@ -46,18 +46,18 @@ diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py return self.run_val_gdb() else: diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py ---- src/sage/interfaces/singular.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage/interfaces/singular.py 2019-06-27 11:30:37.223951272 -0600 -@@ -2261,7 +2261,7 @@ def generate_docstring_dictionary(): +--- src/sage/interfaces/singular.py.orig 2019-10-03 14:52:35.554612838 -0300 ++++ src/sage/interfaces/singular.py 2019-10-03 14:53:22.502887441 -0300 +@@ -2262,7 +2262,7 @@ def generate_docstring_dictionary(): nodes.clear() node_names.clear() -- singular_docdir = os.environ['SINGULARPATH']+"/../info/" +- singular_docdir = SINGULARPATH + "/../info/" + singular_docdir = "/usr/share/info/" new_node = re.compile(r"File: singular\.hlp, Node: ([^,]*),.*") new_lookup = re.compile(r"\* ([^:]*):*([^.]*)\..*") -@@ -2269,8 +2269,9 @@ def generate_docstring_dictionary(): +@@ -2270,8 +2270,9 @@ def generate_docstring_dictionary(): L, in_node, curr_node = [], False, None # singular.hlp contains a few iso-5559-1 encoded special characters @@ -70,8 +70,8 @@ diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py m = re.match(new_node,line) if m: diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/ext/multidocs.py ---- src/sage_setup/docbuild/ext/multidocs.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage_setup/docbuild/ext/multidocs.py 2019-06-27 11:30:37.224951257 -0600 +--- src/sage_setup/docbuild/ext/multidocs.py.orig 2019-10-03 14:53:32.585946418 -0300 ++++ src/sage_setup/docbuild/ext/multidocs.py 2019-10-03 14:54:02.207119676 -0300 @@ -85,8 +85,11 @@ def merge_environment(app, env): for ind in newalldoc: # treat subdocument source as orphaned file and don't complain @@ -86,23 +86,3 @@ diff -up src/sage_setup/docbuild/ext/multidocs.py.orig src/sage_setup/docbuild/e # merge the citations newcite = {} citations = docenv.domaindata["std"]["citations"] -diff -up src/sage_setup/docbuild/__init__.py.orig src/sage_setup/docbuild/__init__.py ---- src/sage_setup/docbuild/__init__.py.orig 2019-06-26 14:41:05.000000000 -0600 -+++ src/sage_setup/docbuild/__init__.py 2019-06-27 11:30:37.225951242 -0600 -@@ -284,13 +284,14 @@ if not (CYGWIN_VERSION and CYGWIN_VERSIO - # map_async handles KeyboardInterrupt correctly. Plain map and - # apply_async does not, so don't use it. - x = pool.map_async(target, args, 1) -+ ret = [] - try: -- ret = x.get(99999) -+ ret = x.get(3600) - pool.close() - pool.join() - except Exception: -- pool.terminate() - if ABORT_ON_ERROR: -+ pool.terminate() - raise - return ret - else: diff --git a/sagemath-sagetex.patch b/sagemath-sagetex.patch index 7bd79a4..1562f69 100644 --- a/sagemath-sagetex.patch +++ b/sagemath-sagetex.patch @@ -1,11 +1,11 @@ diff -up build/pkgs/sagetex/src/run-sagetex-if-necessary.py.orig build/pkgs/sagetex/src/run-sagetex-if-necessary.py ---- build/pkgs/sagetex/src/run-sagetex-if-necessary.py.orig 2019-01-09 09:51:28.000000000 -0700 -+++ build/pkgs/sagetex/src/run-sagetex-if-necessary.py 2019-04-09 11:39:25.457566883 -0600 -@@ -63,7 +63,7 @@ if not uses_sagetex: +--- build/pkgs/sagetex/src/run-sagetex-if-necessary.py.orig 2019-10-03 16:56:05.217343030 -0300 ++++ build/pkgs/sagetex/src/run-sagetex-if-necessary.py 2019-10-03 16:56:23.334451227 -0300 +@@ -64,7 +64,7 @@ if not uses_sagetex: # if something goes wrong, assume we need to run Sage run_sage = True -- ignore = r"^( _st_.goboom|print('SageT| ?_st_.current_tex_line))" +-ignore = r"^( _st_.goboom|print\('SageT| ?_st_.current_tex_line)" +ignore = r"^( _st_.goboom|print('SageT| ?_st_.current_tex_line))" try: diff --git a/sagemath-scripts.patch b/sagemath-scripts.patch index 68cbfd5..6b6e447 100644 --- a/sagemath-scripts.patch +++ b/sagemath-scripts.patch @@ -1,6 +1,6 @@ diff -up src/bin/sage.orig src/bin/sage ---- src/bin/sage.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/bin/sage 2019-06-27 11:28:35.352810438 -0600 +--- src/bin/sage.orig 2019-10-03 14:38:40.429507574 -0300 ++++ src/bin/sage 2019-10-03 14:47:00.852631198 -0300 @@ -26,13 +26,10 @@ usage() { echo " file.[sage|py|spyx] -- run given .sage, .py or .spyx file" echo " -advanced -- list all command line options" @@ -55,13 +55,13 @@ diff -up src/bin/sage.orig src/bin/sage echo " -inotebook [...] -- start the *insecure* Sage notebook (deprecated)" echo " -n, -notebook [...] -- start the default Sage notebook (options are the" echo " same as for the notebook command in Sage). See the" -@@ -119,18 +106,11 @@ usage_advanced() { +@@ -119,18 +106,12 @@ usage_advanced() { echo " Sage), passing additional options to IPython" echo " -ipython3 [...] -- same as above, but using Python 3" echo " -jupyter [...] -- run Sage's Jupyter with given arguments" - echo " -kash [...] -- run Sage's Kash with given arguments" - command -v kash &>/dev/null || \ -- echo " (not installed currently, run sage -i kash)" + echo " (not installed currently, run sage -i kash)" echo " -lisp [...] -- run Lisp interpreter included with Sage" echo " -M2 [...] -- run Sage's Macaulay2 with given arguments" - command -v M2 &>/dev/null || \ @@ -74,7 +74,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -python [...] -- run the Python interpreter" echo " -python2 [...] -- run the Python 2 interpreter" echo " -python3 [...] -- run the Python 3 interpreter" -@@ -144,55 +124,7 @@ usage_advanced() { +@@ -144,55 +125,7 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| @@ -131,7 +131,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -startuptime [module] -- display how long each component of Sage takes to" echo " start up; optionally specify a module to get more" echo " details about that particular module" -@@ -226,7 +158,6 @@ usage_advanced() { +@@ -226,7 +159,6 @@ usage_advanced() { echo " -coverage -- give info about doctest coverage of files" echo " -coverageall -- give summary info about doctest coverage of all" echo " files in the Sage library" @@ -139,7 +139,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -search_src -- search through all the Sage library code for string" echo " -search_doc -- search through the Sage documentation for string" echo " -grep -- same as -search_src" -@@ -252,16 +183,6 @@ usage_advanced() { +@@ -252,16 +184,6 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| @@ -156,7 +156,7 @@ diff -up src/bin/sage.orig src/bin/sage echo "Valgrind memory debugging:" echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log" echo " files are named sage-cachegrind.PID can be found in" -@@ -275,9 +196,6 @@ usage_advanced() { +@@ -275,9 +197,6 @@ usage_advanced() { echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log" echo " files are named sage-memcheck.PID can be found in" echo " $DOT_SAGE" @@ -166,7 +166,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -valgrind -- this is an alias for -memcheck" echo echo "You can also use -- before a long option, e.g., 'sage --optional'." -@@ -287,116 +205,6 @@ usage_advanced() { +@@ -287,116 +206,6 @@ usage_advanced() { ##################################################################### @@ -283,27 +283,12 @@ diff -up src/bin/sage.orig src/bin/sage # Report information about the Sage environment ##################################################################### -@@ -425,35 +233,8 @@ if [ $# -gt 0 ]; then - fi +@@ -445,20 +254,6 @@ fi - --##################################################################### --# Source sage-env ($0 is the name of this "sage" script, so we can just --# append -env to that). We redirect stdout to stderr, which is safer --# for scripts. --##################################################################### --. "$0-env" >&2 --if [ $? -ne 0 ]; then -- echo >&2 "Error setting environment variables by sourcing '$0-env';" -- echo >&2 "possibly contact sage-devel (see http://groups.google.com/group/sage-devel)." -- exit 1 --fi -- -- # Prepare for running Sage, either interactively or non-interactively. sage_setup() { - # Check that we're not in a source tarball which hasn't been built yet (#13561). -- if [ ! -x "$SAGE_LOCAL/bin/sage" ]; then +- if [ ! -z "$SAGE_LOCAL" ] && [ ! -x "$SAGE_LOCAL/bin/sage" ]; then - echo >&2 '************************************************************************' - echo >&2 'It seems that you are attempting to run Sage from an unpacked source' - echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not' @@ -319,7 +304,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ ! -d "$IPYTHONDIR" ]; then # make sure that $DOT_SAGE exists so that ipython will happily # create its config directories there. If DOT_SAGE doesn't -@@ -464,20 +245,6 @@ sage_setup() { +@@ -469,20 +264,6 @@ sage_setup() { } @@ -340,7 +325,7 @@ diff -up src/bin/sage.orig src/bin/sage # Start an interactive Sage session, this function never returns. interactive_sage() { sage_setup -@@ -561,16 +328,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] +@@ -566,16 +347,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] exec ecl "$@" fi @@ -357,7 +342,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then shift exec maxima "$@" -@@ -601,11 +358,6 @@ if [ "$1" = '--pip3' ]; then +@@ -606,11 +377,6 @@ if [ "$1" = '--pip3' ]; then exec python3 -m pip "$@" fi @@ -369,7 +354,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-python' -o "$1" = '--python' ]; then shift if [ "$SAGE_PYTHON3" = 'yes' ]; then -@@ -645,16 +397,6 @@ if [ "$1" = '-jupyter' -o "$1" = '--jupy +@@ -650,16 +416,6 @@ if [ "$1" = '-jupyter' -o "$1" = '--jupy exec jupyter "$@" fi @@ -386,7 +371,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-sh' -o "$1" = '--sh' ]; then # AUTHORS: # - Carl Witty and William Stein: initial version -@@ -774,20 +516,6 @@ EOF +@@ -779,20 +535,6 @@ EOF fi ##################################################################### @@ -407,7 +392,7 @@ diff -up src/bin/sage.orig src/bin/sage # File conversion ##################################################################### -@@ -818,11 +546,6 @@ fi +@@ -823,11 +565,6 @@ fi # Run Sage's versions of the standard Algebra/Geometry etc. software ##################################################################### @@ -419,7 +404,7 @@ diff -up src/bin/sage.orig src/bin/sage if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then sage-cleaner &>/dev/null & exec sage-notebook "$@" -@@ -833,13 +556,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not +@@ -838,13 +575,6 @@ if [ "$1" = "-notebook" -o "$1" = '--not exec sage-notebook "$@" fi @@ -433,7 +418,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then shift sage-cleaner &>/dev/null & -@@ -858,34 +574,15 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep +@@ -863,31 +593,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep exit 0 fi @@ -465,12 +450,8 @@ diff -up src/bin/sage.orig src/bin/sage +if [ "$1" = '-t' -o "$1" = '-tp' ]; then sage_setup export PYTHONIOENCODING="utf-8" # Fix encoding for doctests -- if [ "$1" = '-tp' -o "$1" = '-btp' ]; then -+ if [ "$1" = '-tp' ]; then - shift - exec sage-runtests -p "$@" - else -@@ -894,10 +591,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" + if [ "$1" = '-tp' -o "$1" = '-btp' ]; then +@@ -899,16 +610,6 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" fi fi @@ -478,11 +459,16 @@ diff -up src/bin/sage.orig src/bin/sage - if [ "$1" = '-btnew' ]; then - build_sage - fi -+if [ "$1" = '-tnew' ]; then +- shift +- sage_setup +- export PYTHONIOENCODING="utf-8" # Fix encoding for doctests +- exec sage-runtests --new "$@" +-fi +- + if [ "$1" = '-testall' -o "$1" = "--testall" ]; then shift sage_setup - export PYTHONIOENCODING="utf-8" # Fix encoding for doctests -@@ -918,122 +612,6 @@ if [ "$1" = '-c' ]; then +@@ -923,122 +624,6 @@ if [ "$1" = '-c' ]; then exec sage-eval "$@" fi @@ -605,7 +591,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then shift sage_setup -@@ -1083,12 +661,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca +@@ -1088,12 +673,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca exec sage-callgrind "$@" fi @@ -618,25 +604,12 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then exec sage-startuptime.py "$@" fi -diff -up src/bin/sage-runtests.orig src/bin/sage-runtests ---- src/bin/sage-runtests.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/bin/sage-runtests 2019-06-27 11:22:47.435227309 -0600 -@@ -95,10 +95,6 @@ if __name__ == "__main__": - help="run doctests using Valgrind's cachegrind tool. The log " - "files are named sage-cachegrind.PID and can be found in " + - os.path.join(DOT_SAGE, "valgrind")) -- parser.add_option("--omega", action="store_true", default=False, -- help="run doctests using Valgrind's omega tool. The log " -- "files are named sage-omega.PID and can be found in " + -- os.path.join(DOT_SAGE, "valgrind")) - - parser.add_option("-f", "--failed", action="store_true", default=False, - help="doctest only those files that failed in the previous run") diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind ---- src/bin/sage-valgrind.orig 2019-06-26 14:41:04.000000000 -0600 -+++ src/bin/sage-valgrind 2019-06-27 11:22:47.435227309 -0600 -@@ -1,16 +1,6 @@ - #!/usr/bin/env bash +--- src/bin/sage-valgrind.orig 2019-10-03 14:47:13.247708565 -0300 ++++ src/bin/sage-valgrind 2019-10-03 14:47:46.404915531 -0300 +@@ -4,17 +4,7 @@ if [ -z $SAGE_EXTCODE ]; then + SAGE_EXTCODE=`${0/-valgrind} -c "from sage.env import SAGE_EXTCODE; print(SAGE_EXTCODE)"` + fi -SUPP="" -if [ -f "$SAGE_EXTCODE/valgrind/python.supp" ]; then diff --git a/sagemath-sympy.patch b/sagemath-sympy.patch index 055cd9a..81c20a2 100644 --- a/sagemath-sympy.patch +++ b/sagemath-sympy.patch @@ -1,6 +1,6 @@ diff -up src/sage/env.py.orig src/sage/env.py ---- src/sage/env.py.orig 2019-04-08 12:41:09.686920533 -0600 -+++ src/sage/env.py 2019-04-08 12:42:41.240282849 -0600 +--- src/sage/env.py.orig 2019-10-03 16:07:45.910528067 -0300 ++++ src/sage/env.py 2019-10-03 16:08:40.659874228 -0300 @@ -159,9 +159,9 @@ var('SAGE_DOC', join(SAGE_SHA var('SAGE_SPKG_INST', join(SAGE_LOCAL, 'var', 'lib', 'sage', 'installed')) var('SAGE_LIB', os.path.dirname(os.path.dirname(sage.__file__))) @@ -8,7 +8,7 @@ diff -up src/sage/env.py.orig src/sage/env.py -var('SAGE_ROOT') # no fallback for SAGE_ROOT +var('SAGE_ROOT', '@@SAGE_ROOT@@') var('SAGE_SRC', join(SAGE_ROOT, 'src'), SAGE_LIB) --var('SAGE_DOC_SRC', join(SAGE_SRC, 'doc')) +-var('SAGE_DOC_SRC', join(SAGE_ROOT, 'src', 'doc'), SAGE_DOC) +var('SAGE_DOC_SRC', '@@SAGE_DOC@@') var('SAGE_PKGS', join(SAGE_ROOT, 'build', 'pkgs')) var('SAGE_ROOT_GIT', join(SAGE_ROOT, '.git')) diff --git a/sagemath.spec b/sagemath.spec index 82df99e..6ef6228 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -60,15 +60,15 @@ %global polytopes_db_pkg polytopes_db-20170220 %global rubiks_pkg rubiks-20070912 %global sagenb_pkg sagenb-1.1.2 -%global sagetex_pkg sagetex-3.2 +%global sagetex_pkg sagetex-3.3 %global Sphinx_pkg Sphinx-1.8.5 -%global singular_pkg singular-4.1.1p3 +%global singular_pkg singular-4.1.1p2 %if %{with bundled_thebe} %global thebe_ver 9624e0a0 %global thebe_pkg thebe-%{thebe_ver} %endif %if %{with bundled_threejs} -%global threejs_ver r100 +%global threejs_ver r105 %global threejs_pkg threejs-%{threejs_ver} %endif %if %{with bundled_widgetsnbextension} @@ -94,8 +94,8 @@ Name: sagemath Summary: A free open-source mathematics software system -Version: 8.8 -Release: 7%{?dist} +Version: 8.9 +Release: 1%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -180,45 +180,37 @@ Patch20: %{name}-sympy.patch # Correct unable to start QEPCAD within sage # https://bugzilla.redhat.com/show_bug.cgi?id=1243590 -Patch22: %{name}-qepcad.patch +Patch21: %{name}-qepcad.patch # Correct path to arb headers -Patch23: %{name}-arb.patch - -# Add missing escapes, or convert strings to raw strings -Patch24: %{name}-escape.patch +Patch22: %{name}-arb.patch # Add missing include paths -Patch25: %{name}-includes.patch +Patch23: %{name}-includes.patch # Use openblas -Patch26: %{name}-openblas.patch +Patch24: %{name}-openblas.patch # Fix paths to latte-integrale binaries -Patch27: %{name}-latte.patch +Patch25: %{name}-latte.patch # Upstream fixes for random SIGFPEs due to ecl messing with the fp state -Patch28: %{name}-sigfpe.patch +Patch26: %{name}-sigfpe.patch # Add some missing #includes and types in the rubiks code -Patch29: %{name}-rubiks.patch +Patch27: %{name}-rubiks.patch # Fix an indentation error in sagetex -Patch30: %{name}-sagetex.patch +Patch28: %{name}-sagetex.patch # Fix some path settings in the sage environment -Patch31: %{name}-env.patch +Patch29: %{name}-env.patch # Make notebook minimally function until upstream finally removes it -Patch32: %{name}-sagenb-python3.patch - -# Replace python's deprecated formatargspec with a custom implementation -# https://trac.sagemath.org/ticket/27971 -# https://git.sagemath.org/sage.git/commit/?id=bbd5b28fc8e451bea4f87c2f2b0c27586386262a -Patch33: %{name}-formatargspec.patch +Patch30: %{name}-sagenb-python3.patch # Adapt to primecount 5.x -Patch34: %{name}-primecount.patch +Patch31: %{name}-primecount.patch BuildRequires: 4ti2 BuildRequires: arb-devel @@ -908,6 +900,7 @@ popd %endif %patch20 +%patch21 %patch22 %patch23 %patch24 @@ -918,9 +911,6 @@ popd %patch29 %patch30 %patch31 -%patch32 -%patch33 -%patch34 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ @@ -1279,6 +1269,10 @@ pushd $SAGE_LOCAL/bin/ spkg-install popd +#------------------------------------------------------------------------ +( + source build/bin/sage-dist-helpers + #------------------------------------------------------------------------ pushd build/pkgs/combinatorial_designs chmod a+x spkg-install @@ -1318,7 +1312,7 @@ pushd build/pkgs/sagetex/src %py3_install "--install-purelib=%{python3_sitearch}" mv %{buildroot}%{_texmf}/tex/latex/sagetex/CONTRIBUTORS \ %{buildroot}%{_docdir}/sagetex - for file in PKG-INFO README; do + for file in PKG-INFO; do install -p -m 0644 $file %{buildroot}%{_docdir}/sagetex/$file done popd @@ -1358,6 +1352,9 @@ pushd build/pkgs/widgetsnbextension/src popd %endif +#------------------------------------------------------------------------ +) # source build/bin/sage-dist-helpers + #------------------------------------------------------------------------ cat > %{buildroot}%{SAGE_LOCAL}/bin/sage-env << EOF export CUR=\$PWD @@ -1485,11 +1482,6 @@ perl -pi -e 's|%{buildroot}||g;' \ # with docs %endif -# Script was used to build documentation -perl -pi -e 's|%{buildroot}||g;s|^##||g;' \ - %{buildroot}%{_bindir}/sage \ - %{buildroot}%{SAGE_LOCAL}/bin/sage-env - #------------------------------------------------------------------------ # Fix links export SAGE_SRC=%{buildroot}%{SAGE_SRC} @@ -1635,8 +1627,8 @@ popd #------------------------------------------------------------------------ # Build the large Cremona database -PATH=%{buildroot}%{SAGE_LOCAL}/bin:$PATH -PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}:%{buildroot}%{python3_sitearch} +export PATH=%{buildroot}%{SAGE_LOCAL}/bin:$PATH +export PYTHONPATH=%{buildroot}%{SAGE_PYTHONPATH}:%{buildroot}%{python3_sitearch} cat > cremona.sage << EOF import sage.databases.cremona db_path = '%{buildroot}%{SAGE_SHARE}/cremona/cremona' @@ -1645,6 +1637,12 @@ c._init_from_ftpdata('ecdata-%{cremona_ver}') EOF %{buildroot}%{SAGE_LOCAL}/bin/sage cremona.sage +#------------------------------------------------------------------------ +# Script was used to build documentation and possibly other operations +perl -pi -e 's|%{buildroot}||g;s|^##||g;' \ + %{buildroot}%{_bindir}/sage \ + %{buildroot}%{SAGE_LOCAL}/bin/sage-env + # last install command rm -fr $DOT_SAGE @@ -1929,6 +1927,10 @@ rm -fr %{SAGE_LOCAL}/var/lib/sage/installed/database_cremona_ellcurve-%{cremona_ ######################################################################## %changelog +* Thu Nov 7 2019 pcpa - 8.9-1 +- Update to latest upstream release +- Drop no longer need patches and rediff current ones + * Fri Oct 11 2019 Jerry James - 8.8-7 - Rebuild for mpfr 4 - Drop -mpfr patch diff --git a/sources b/sources index d749bcb..8e28ab9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (sage-8.8.tar.gz) = bac6cdd07e1c1bb36cf8617bc5b580818048702f9f73ba1d034e0ae100bbdb7f2ef3f2133d7cea739c98f103ca9e3b90a7c29d87314fb398b9d7984f194d0357 SHA512 (cremona-2016-10-17.tar.gz) = 61f55ec5c15e32b5fdaf1fe8f2f3d50ba9afa542d8634918ec9493d739127f8c06a44b3cb1227a2979522baf61951ac37a67ae2b12c920958b04f8198d07ff57 +SHA512 (sage-8.9.tar.gz) = 056646488f0b3fc092057c7ff807762c2f98d13748e14540ae9a67ceb3a3d62f8c0263c80c61a36c423353d7051e2dfae466a3f452f3910d9ba95ef26b385e94