[sagemath] 03/10: Remove patches applied upstream.

Tobias Hansen thansen at moszumanska.debian.org
Fri Jun 9 21:34:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository sagemath.

commit e92061ede190adc44ebda336fcb2d9511e84c092
Author: Tobias Hansen <thansen at debian.org>
Date:   Thu Jun 8 21:43:32 2017 +0000

    Remove patches applied upstream.
---
 debian/changelog                                   |   7 +
 debian/patches/series                              |   6 -
 debian/patches/u0-fix-proper-scipy-rtol.patch      |  52 --
 debian/patches/u0-version-r-3.3.3.patch            |  25 -
 debian/patches/u0-version-singular-4.1.0p2.patch   | 747 ---------------------
 debian/patches/u0-version-singular-4.1.0p3.patch   | 137 ----
 debian/patches/u1-fix-dont-require-DISPLAY.patch   |   2 +-
 debian/patches/u1-fix-use-lexists-not-exists.patch |   2 +-
 debian/patches/u1-scripts-dir.patch                |  22 +-
 debian/patches/u1-version-ecm-7.patch              |  82 ---
 debian/patches/u1-version-planarity-3.patch        | 117 ----
 11 files changed, 20 insertions(+), 1179 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 806ea2f..2c7f236 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,13 @@
 sagemath (8.0~beta9-1) UNRELEASED; urgency=medium
 
   * New upstream version.
+  * Remove patches (applied upstream):
+    - u0-fix-proper-scipy-rtol.patch
+    - u0-version-r-3.3.3.patch
+    - u0-version-singular-4.1.0p2.patch
+    - u0-version-singular-4.1.0p3.patch
+    - u1-version-ecm-7.patch
+    - u1-version-planarity-3.patch
 
  -- Tobias Hansen <thansen at debian.org>  Thu, 08 Jun 2017 21:19:49 +0000
 
diff --git a/debian/patches/series b/debian/patches/series
index 4a4ff80..4efdf4b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,14 +1,8 @@
 # Patches already applied upstream or committed in a side branch
 # Or nearly-finished patches that they'll very probably merge.
-u0-version-r-3.3.3.patch                   #20523
-u0-version-singular-4.1.0p2.patch          #22425
-u0-version-singular-4.1.0p3.patch          #22868
-u0-fix-proper-scipy-rtol.patch             #22439
 
 # Patches that have open upstream tickets
-u1-version-planarity-3.patch               #21774
 u1-version-pbori-boost1.62-hashes.patch    #22243
-u1-version-ecm-7.patch                     #20385
 u1-fix-use-lexists-not-exists.patch        #22438
 u1-fix-dont-require-DISPLAY.patch          #22441
 u1-pip-nowarn.patch                        #21835
diff --git a/debian/patches/u0-fix-proper-scipy-rtol.patch b/debian/patches/u0-fix-proper-scipy-rtol.patch
deleted file mode 100644
index b743313..0000000
--- a/debian/patches/u0-fix-proper-scipy-rtol.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Description: Fix Sage's use of scipy rtol parameter
- The scipy documentation very clearly says: 
- "The parameter cannot be smaller than its default value of
- ``4*np.finfo(float).eps``" so use that instead of a hard-coded value.
-Author: Ximin Luo <infinity0 at debian.org>
-Forwarded: Bug: https://trac.sagemath.org/ticket/22439
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/sage/src/sage/numerical/optimize.py
-+++ b/sage/src/sage/numerical/optimize.py
-@@ -16,8 +16,11 @@
- from sage.modules.free_module_element import vector
- from sage.rings.real_double import RDF
- 
-+from numpy import finfo
-+default_rtol = 4*finfo(float).eps
- 
--def find_root(f, a, b, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
-+
-+def find_root(f, a, b, xtol=10e-13, rtol=default_rtol, maxiter=100, full_output=False):
-     """
-     Numerically find a root of ``f`` on the closed interval `[a,b]`
-     (or `[b,a]`) if possible, where ``f`` is a function in the one variable.
---- a/sage/src/sage/symbolic/expression.pyx
-+++ b/sage/src/sage/symbolic/expression.pyx
-@@ -11118,7 +11118,7 @@
-             ret = ret[0]
-         return ret
- 
--    def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False):
-+    def find_root(self, a, b, var=None, xtol=10e-13, rtol=0, maxiter=100, full_output=False):
-         """
-         Numerically find a root of self on the closed interval [a,b] (or
-         [b,a]) if possible, where self is a function in the one variable.
-@@ -11234,7 +11234,7 @@
-         """
-         if is_a_relational(self._gobj) and self.operator() is not operator.eq:
-             raise ValueError("Symbolic equation must be an equality.")
--        from sage.numerical.optimize import find_root
-+        from sage.numerical.optimize import find_root, default_rtol
-         if self.number_of_arguments() == 0:
-             if bool(self == 0):
-                 return a
-@@ -11243,7 +11243,7 @@
-         elif self.number_of_arguments() == 1:
-             f = self._fast_float_(self.default_variable())
-             return find_root(f, a=a, b=b, xtol=xtol,
--                             rtol=rtol,maxiter=maxiter,
-+                             rtol=(rtol or default_rtol),maxiter=maxiter,
-                              full_output=full_output)
-         else:
-             raise NotImplementedError("root finding currently only implemented in 1 dimension.")
diff --git a/debian/patches/u0-version-r-3.3.3.patch b/debian/patches/u0-version-r-3.3.3.patch
deleted file mode 100644
index c5a667b..0000000
--- a/debian/patches/u0-version-r-3.3.3.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: Fix two doctests when using R 3.3.3
-Origin: https://git.sagemath.org/sage.git/commit/?id=55a8aa40b5d85c54b0c325bf942734e337523e8b
-Bug: https://trac.sagemath.org/ticket/20523
-
-
---- a/sage/src/sage/interfaces/r.py
-+++ b/sage/src/sage/interfaces/r.py
-@@ -595,7 +595,7 @@
-         EXAMPLES::
- 
-             sage: print(r._source("c"))
--            function (..., recursive = FALSE)  .Primitive("c")
-+            function (...) .Primitive("c")
-         """
-         if s[-2:] == "()":
-             s = s[-2:]
-@@ -614,7 +614,7 @@
-         EXAMPLES::
- 
-             sage: print(r.source("c"))
--            function (..., recursive = FALSE)  .Primitive("c")
-+            function (...) .Primitive("c")
-         """
-         return self._source(s)
- 
diff --git a/debian/patches/u0-version-singular-4.1.0p2.patch b/debian/patches/u0-version-singular-4.1.0p2.patch
deleted file mode 100644
index a1ccacb..0000000
--- a/debian/patches/u0-version-singular-4.1.0p2.patch
+++ /dev/null
@@ -1,747 +0,0 @@
-Origin: https://trac.sagemath.org/ticket/22425
-
-From 6bdcdee6c48bbebdd3674fc3c2469a9f3d2e9bb9 Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Thu, 23 Feb 2017 13:15:35 +0000
-Subject: Draft update to singular 4.1.0p2.
-
-From a204dfc0e0b79c8a81bdfc50aca0e7976875d5fb Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Thu, 23 Feb 2017 18:01:17 +0000
-Subject: Further easy fixes.
-
-From e8a265b2ebc7a5714a82764f09cbbbb81fe833d6 Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Fri, 24 Feb 2017 13:08:12 +0000
-Subject: Further doctest changes.
-
-From fed37d779356f22bb1c9f53b3c1016aca11ab692 Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Tue, 14 Mar 2017 13:00:43 +0000
-Subject: Fix dynatomic polynomial test.
-
-Only the scaling factor changed.
-
---- a/sage/src/sage/libs/singular/decl.pxd
-+++ b/sage/src/sage/libs/singular/decl.pxd
-@@ -484,8 +484,8 @@
- 
-     ring *rDefault(int char , int nvars, char **names)
-     ring *rDefault(const n_Procs_s* cf, int nvars, char **names)
--    ring *rDefault(int ch             , int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl)
--    ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl)
-+    ring *rDefault(int ch             , int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl)
-+    ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl)
- 
- 
- 
---- a/sage/src/sage/libs/singular/ring.pyx
-+++ b/sage/src/sage/libs/singular/ring.pyx
-@@ -21,7 +21,7 @@
- from sage.libs.singular.decl cimport number, poly, ring, currRing
- from sage.libs.singular.decl cimport rChangeCurrRing, rCopy0, rComplete, rDelete, idInit
- from sage.libs.singular.decl cimport omAlloc0, omStrDup, omAlloc, omAlloc0Bin,  sip_sring_bin, rnumber_bin
--from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a
-+from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a, rRingOrder_t
- from sage.libs.singular.decl cimport p_Copy, prCopyR
- from sage.libs.singular.decl cimport n_unknown,  n_Zp,  n_Q,   n_R,   n_GF,  n_long_R,  n_algExt,n_transExt,n_long_C,   n_Z,   n_Zn,  n_Znm,  n_Z2m,  n_CF
- from sage.libs.singular.decl cimport n_coeffType, cfInitCharProc
-@@ -165,7 +165,7 @@
-     ##         q    q : GF(q=p^n)       *names         TRUE              (todo)
- 
-     _wvhdl  = <int **>omAlloc0((nblcks + 2) * sizeof(int *))
--    _order  = <int *>omAlloc0((nblcks + 2) * sizeof(int))
-+    _order  = <rRingOrder_t *>omAlloc0((nblcks + 2) * sizeof(int))
-     _block0 = <int *>omAlloc0((nblcks + 2) * sizeof(int))
-     _block1 = <int *>omAlloc0((nblcks + 2) * sizeof(int))
- 
---- a/sage/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-+++ b/sage/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-@@ -594,7 +594,7 @@
- 
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
-@@ -1182,7 +1182,7 @@
-             sage: P.<x,y,z> = QQ[]
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
-@@ -1198,9 +1198,7 @@
-             sage: P.<x,y,z> = PolynomialRing(k,3)
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 3
--            //   1 parameter    : a
--            //   minpoly        : (a^3-a+1)
-+            //   coefficients: ZZ/3[a]/(a^3-a+1)
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
-@@ -1216,7 +1214,7 @@
-             sage: P.<x> = QQ[]
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -1256,7 +1254,7 @@
-             sage: P.<x,y,z> = QQ[]
-             sage: P._singular_init_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
-@@ -1271,9 +1269,7 @@
-             sage: R.<x,y> = PolynomialRing(NumberField(w^2+1,'s'))
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
--            //   1 parameter    : s
--            //   minpoly        : (s^2+1)
-+            //   coefficients: QQ[s]/(s^2+1)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -1282,9 +1278,7 @@
-             sage: R = PolynomialRing(GF(2**8,'a'),10,'x', order='invlex')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 2
--            //   1 parameter    : a
--            //   minpoly        : (a^8+a^4+a^3+a^2+1)
-+            //   coefficients: ZZ/2[a]/(a^8+a^4+a^3+a^2+1)
-             //   number of vars : 10
-             //        block   1 : ordering rp
-             //                  : names    x0 x1 x2 x3 x4 x5 x6 x7 x8 x9
-@@ -1293,7 +1287,7 @@
-             sage: R = PolynomialRing(GF(127),2,'x', order='invlex')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 2
-             //        block   1 : ordering rp
-             //                  : names    x0 x1
-@@ -1302,7 +1296,7 @@
-             sage: R = PolynomialRing(QQ,2,'x', order='invlex')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 2
-             //        block   1 : ordering rp
-             //                  : names    x0 x1
-@@ -1311,7 +1305,7 @@
-             sage: R = PolynomialRing(QQ,2,'x', order='degneglex')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 2
-             //        block   1 : ordering a
-             //                  : names    x0 x1
-@@ -1323,7 +1317,7 @@
-             sage: R = PolynomialRing(QQ,'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -1332,7 +1326,7 @@
-             sage: R = PolynomialRing(GF(127),'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -1341,7 +1335,7 @@
-             sage: R = ZZ['x,y']
-             sage: singular(R)
-             polynomial ring, over a domain, global ordering
--            //   coeff. ring is : ZZ
-+            //   coefficients: ZZ
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -1350,7 +1344,7 @@
-             sage: R = IntegerModRing(1024)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coeff. ring is : Z/2^10
-+            //   coefficients: Z/2^10
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -1359,7 +1353,7 @@
-             sage: R = IntegerModRing(15)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coeff. ring is : ZZ/15
-+            //   coefficients: ZZ/bigint(15)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -1370,7 +1364,7 @@
-             sage: P.<x> = QQ[]
-             sage: P._singular_init_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
---- a/sage/src/sage/rings/polynomial/polynomial_quotient_ring.py
-+++ b/sage/src/sage/rings/polynomial/polynomial_quotient_ring.py
-@@ -612,7 +612,7 @@
-             sage: Q = P.quo([(x^2+1)])
-             sage: singular(Q)        # indirect doctest
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    xbar
---- a/sage/src/sage/rings/polynomial/polynomial_singular_interface.py
-+++ b/sage/src/sage/rings/polynomial/polynomial_singular_interface.py
-@@ -81,9 +81,7 @@
-             sage: R.<x,y> = PolynomialRing(CC,'x',2)
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0 (complex:15 digits, additional 0 digits)
--            //   1 parameter    : I
--            //   minpoly        : (I^2+1)
-+            //   coefficients: float[I](complex:15 digits, additional 0 digits)/(I^2+1)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -91,7 +89,7 @@
-             sage: R.<x,y> = PolynomialRing(RealField(100),'x',2)
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0 (real)
-+            //   coefficients: float
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -101,9 +99,7 @@
-             sage: R.<x> = PolynomialRing(NumberField(w^2+1,'s'))
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
--            //   1 parameter    : s
--            //   minpoly        : (s^2+1)
-+            //   coefficients: QQ[s]/(s^2+1)
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -112,7 +108,7 @@
-             sage: R = PolynomialRing(GF(127),1,'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -121,7 +117,7 @@
-             sage: R = PolynomialRing(QQ,1,'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -130,7 +126,7 @@
-             sage: R = PolynomialRing(QQ,'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -139,7 +135,7 @@
-             sage: R = PolynomialRing(GF(127),'x')
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
-@@ -148,9 +144,7 @@
-             sage: R = Frac(ZZ['a,b'])['x,y']
-             sage: singular(R)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
--            //   2 parameter    : a b
--            //   minpoly        : 0
-+            //   coefficients: QQ(a, b)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -160,7 +154,7 @@
-             sage: R = IntegerModRing(1024)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coeff. ring is : Z/2^10
-+            //   coefficients: Z/2^10
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -169,7 +163,7 @@
-             sage: R = IntegerModRing(15)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coeff. ring is : ZZ/15
-+            //   coefficients: ZZ/bigint(15)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -178,7 +172,7 @@
-             sage: R = ZZ['x,y']
-             sage: singular(R)
-             polynomial ring, over a domain, global ordering
--            //   coeff. ring is : ZZ
-+            //   coefficients: ZZ
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -190,9 +184,7 @@
-             sage: S = K['y']
-             sage: singular(S)
-             polynomial ring, over a field, global ordering
--            //   characteristic : 5
--            //   1 parameter    : x
--            //   minpoly        : 0
-+            //   coefficients: ZZ/5(x)
-             //   number of vars : 2
-             //        block   1 : ordering lp
-             //                  : names    a y
-@@ -234,7 +226,7 @@
- 
-             sage: PolynomialRing(QQ,'u_ba')._singular_init_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    u_ba
---- a/sage/src/sage/rings/polynomial/term_order.py
-+++ b/sage/src/sage/rings/polynomial/term_order.py
-@@ -1756,7 +1756,7 @@
-             '(lp(3),Dp(5),lp(2))'
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 10
-             //        block   1 : ordering lp
-             //                  : names    x0 x1 x2
-@@ -1784,7 +1784,7 @@
-             '(a(1:2),ls(2),a(1:2),ls(2))'
-             sage: P._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 4
-             //        block   1 : ordering a
-             //                  : names    x0 x1
---- a/sage/src/sage/rings/quotient_ring.py
-+++ b/sage/src/sage/rings/quotient_ring.py
-@@ -1174,7 +1174,7 @@
-             sage: S = R.quotient_ring(x^2+y^2)
-             sage: S._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
---- a/sage/src/sage/rings/quotient_ring_element.py
-+++ b/sage/src/sage/rings/quotient_ring_element.py
-@@ -786,7 +786,7 @@
-             sage: Q = P.quo(I)
-             sage: Q._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 2
-+            //   coefficients: ZZ/2
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
---- a/sage/src/sage/rings/polynomial/multi_polynomial_element.py
-+++ b/sage/src/sage/rings/polynomial/multi_polynomial_element.py
-@@ -1994,7 +1994,7 @@
-     ::
- 
-         sage: r = f/g; r
--        (-2*b*c^2 - 1)/(2*a*b^3*c^6 + a*c)
-+        (-b*c^2 + 2)/(a*b^3*c^6 - 2*a*c)
-         sage: degree_lowest_rational_function(r,a)
-         (-1, 3)
-         sage: degree_lowest_rational_function(r,b)
---- a/sage/src/sage/rings/polynomial/multi_polynomial_ideal.py
-+++ b/sage/src/sage/rings/polynomial/multi_polynomial_ideal.py
-@@ -190,7 +190,7 @@
-     The Groebner basis modulo any product of the prime factors is also non-trivial::
- 
-         sage: I.change_ring(P.change_ring( IntegerModRing(2*7) )).groebner_basis()
--        [x + 3*y + 11*z, y^2 + 3*y, y*z + 11*y + 4, 2*y + 6, z^2 + 3, 2*z + 10]
-+        [x + 9*y + 13*z, y^2 + 3*y, y*z + 7*y + 6, 2*y + 6, z^2 + 3, 2*z + 10]
- 
-     Modulo any other prime the Groebner basis is trivial so there are
-     no other solutions. For example::
-@@ -3646,11 +3646,13 @@
-             sage: P.<a,b,c> = PolynomialRing(Zmod(1000),3)
-             sage: I = P * (a + 2*b + 2*c - 1, a^2 - a + 2*b^2 + 2*c^2, 2*a*b + 2*b*c - b)
-             sage: I.groebner_basis()
--            [b*c^2 + 992*b*c + 712*c^2 + 332*b + 96*c,
--             2*c^3 + 214*b*c + 862*c^2 + 762*b + 268*c,
-+            [b*c^2 + 732*b*c + 808*b,
-+             2*c^3 + 884*b*c + 666*c^2 + 320*b,
-              b^2 + 438*b*c + 281*b,
-              5*b*c + 156*c^2 + 112*b + 948*c,
--             50*c^2 + 600*b + 650*c, a + 2*b + 2*c + 999, 125*b]
-+             50*c^2 + 600*b + 650*c,
-+             a + 2*b + 2*c + 999,
-+             125*b]
- 
-         ::
- 
---- a/sage/src/sage/rings/polynomial/pbori.pyx
-+++ b/sage/src/sage/rings/polynomial/pbori.pyx
-@@ -1410,7 +1410,7 @@
-             sage: B.<x,y> = BooleanPolynomialRing(2)
-             sage: B._singular_() # indirect doctest
-             polynomial ring, over a field, global ordering
--            //   characteristic : 2
-+            //   coefficients: ZZ/2
-             //   number of vars : 2
-             //        block   1 : ordering lp
-             //                  : names    x y
---- a/sage/src/doc/de/tutorial/interfaces.rst
-+++ b/sage/src/doc/de/tutorial/interfaces.rst
-@@ -198,7 +198,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
---- a/sage/src/doc/en/constructions/algebraic_geometry.rst
-+++ b/sage/src/doc/en/constructions/algebraic_geometry.rst
-@@ -164,7 +164,7 @@
-        sage: klein1 = f.Adj_div(); print(klein1)
-        [1]:
-           [1]:
--             //   characteristic : 2
-+             //   coefficients: ZZ/2
-        //   number of vars : 2
-        //        block   1 : ordering lp
-        //                  : names    x y
-@@ -187,13 +187,13 @@
-        sage: print(klein1)
-        [1]:
-           [1]:
--             //   characteristic : 2
-+             //   coefficients: ZZ/2
-        //   number of vars : 2
-        //        block   1 : ordering lp
-        //                  : names    x y
-        //        block   2 : ordering C
-           [2]:
--             //   characteristic : 2
-+             //   coefficients: ZZ/2
-        //   number of vars : 3
-        //        block   1 : ordering lp
-        //                  : names    x y z
-@@ -210,7 +210,7 @@
-        [5]:
-           [1]:
-              [1]:
--                //   characteristic : 2
-+                //   coefficients: ZZ/2
-        //   number of vars : 3
-        //        block   1 : ordering ls
-        //                  : names    x y t
-@@ -325,7 +325,7 @@
-        sage: X = Curve(f); pts = X.rational_points()
-        sage: D = X.divisor([ (3, pts[0]), (-1,pts[1]), (10, pts[5]) ])
-        sage: X.riemann_roch_basis(D)
--       [(-2*x + y)/(x + y), (-x + z)/(x + y)]
-+       [(-x - 2*y)/(-2*x - 2*y), (-x + z)/(x + y)]
- 
- -  Using Singular's ``BrillNoether`` command (for details see the section
-    Brill-Noether in the Singular online documentation
---- a/sage/src/doc/en/constructions/rings.rst
-+++ b/sage/src/doc/en/constructions/rings.rst
-@@ -57,7 +57,7 @@
-     sage: I = singular.ideal(['a+b+c+d', 'ab+ad+bc+cd', 'abc+abd+acd+bcd', 'abcd-1'])
-     sage: R
-     polynomial ring, over a field, global ordering
--    //   characteristic : 97
-+    //   coefficients: ZZ/97
-     //   number of vars : 4
-     //        block   1 : ordering lp
-     //                  : names    a b c d
---- a/sage/src/doc/en/developer/coding_in_other.rst
-+++ b/sage/src/doc/en/developer/coding_in_other.rst
-@@ -402,7 +402,7 @@
-     sage: singular.LIB("brnoeth.lib")
-     sage: singular.ring(5,'(x,y)','lp')
-         polynomial ring, over a field, global ordering
--        //   characteristic : 5
-+        //   coefficients: ZZ/5
-         //   number of vars : 2
-         //        block   1 : ordering lp
-         //                  : names    x y
---- a/sage/src/doc/en/tutorial/interfaces.rst
-+++ b/sage/src/doc/en/tutorial/interfaces.rst
-@@ -197,7 +197,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
---- a/sage/src/doc/fr/tutorial/interfaces.rst
-+++ b/sage/src/doc/fr/tutorial/interfaces.rst
-@@ -199,7 +199,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
---- a/sage/src/doc/ja/tutorial/interfaces.rst
-+++ b/sage/src/doc/ja/tutorial/interfaces.rst
-@@ -173,7 +173,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
---- a/sage/src/doc/pt/tutorial/interfaces.rst
-+++ b/sage/src/doc/pt/tutorial/interfaces.rst
-@@ -197,7 +197,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y 
---- a/sage/src/doc/ru/tutorial/interfaces.rst
-+++ b/sage/src/doc/ru/tutorial/interfaces.rst
-@@ -191,7 +191,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
---- a/sage/src/sage/categories/pushout.py
-+++ b/sage/src/sage/categories/pushout.py
-@@ -3202,7 +3202,7 @@
-         Gap
-         sage: FS(QQ['t'])
-         polynomial ring, over a field, global ordering
--        //   characteristic : 0
-+        //   coefficients: QQ
-         //   number of vars : 1
-         //        block   1 : ordering lp
-         //                  : names    t
---- a/sage/src/sage/interfaces/expect.py
-+++ b/sage/src/sage/interfaces/expect.py
-@@ -1216,7 +1216,7 @@
-             sage: R.<x> = QQ[]; f = x^3 + x + 1;  g = x^3 - x - 1; r = f.resultant(g); gap(ZZ); singular(R)
-             Integers
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
---- a/sage/src/sage/interfaces/interface.py
-+++ b/sage/src/sage/interfaces/interface.py
-@@ -735,7 +735,7 @@
-             sage: S = singular.ring(0, ('x'))
-             sage: loads(dumps(S))
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 1
-             //        block   1 : ordering lp
-             //                  : names    x
---- a/sage/src/sage/interfaces/singular.py
-+++ b/sage/src/sage/interfaces/singular.py
-@@ -65,7 +65,7 @@
-     sage: R1 = singular.ring(0, '(x,y)', 'dp')
-     sage: R1
-     polynomial ring, over a field, global ordering
--    //   characteristic : 0
-+    //   coefficients: QQ
-     //   number of vars : 2
-     //        block   1 : ordering dp
-     //                  : names    x y
-@@ -243,7 +243,7 @@
-     sage: singular.lib('poly.lib')
-     sage: singular.ring(32003, '(a,b,c,d,e,f)', 'lp')
-             polynomial ring, over a field, global ordering
--            //   characteristic : 32003
-+            //   coefficients: ZZ/32003
-             //   number of vars : 6
-             //        block   1 : ordering lp
-             //                        : names    a b c d e f
-@@ -1000,7 +1000,7 @@
-             sage: R = singular.ring(0, '(x,y,z)', 'dp')
-             sage: R
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
-@@ -1080,7 +1080,7 @@
-             sage: S = singular.ring('real', '(a,b)', 'lp')
-             sage: singular.current_ring()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0 (real)
-+            //   coefficients: float
-             //   number of vars : 2
-             //        block   1 : ordering lp
-             //                  : names    a b
-@@ -1088,7 +1088,7 @@
-             sage: singular.set_ring(R)
-             sage: singular.current_ring()
-             polynomial ring, over a field, local ordering
--            //   characteristic : 7
-+            //   coefficients: ZZ/7
-             //   number of vars : 2
-             //        block   1 : ordering ds
-             //                  : names    a b
-@@ -1130,14 +1130,14 @@
-             sage: r = PolynomialRing(GF(127),3,'xyz', order='invlex')
-             sage: r._singular_()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 3
-             //        block   1 : ordering rp
-             //                  : names    x y z
-             //        block   2 : ordering C
-             sage: singular.current_ring()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 127
-+            //   coefficients: ZZ/127
-             //   number of vars : 3
-             //        block   1 : ordering rp
-             //                  : names    x y z
-@@ -1360,7 +1360,7 @@
-             sage: cpQ.set_ring()
-             sage: cpQ
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -1911,7 +1911,7 @@
- 
-             sage: singular('basering')
-             polynomial ring, over a domain, global ordering
--            //   coeff. ring is : ZZ
-+            //   coefficients: ZZ
-             //   number of vars : 3
-             //        block   1 : ordering lp
-             //                  : names    x y z
-@@ -1996,7 +1996,7 @@
-             sage: S = singular.ring('real', '(a,b)', 'lp')
-             sage: singular.current_ring()
-             polynomial ring, over a field, global ordering
--            //   characteristic : 0 (real)
-+            //   coefficients: float
-             //   number of vars : 2
-             //        block   1 : ordering lp
-             //                  : names    a b
-@@ -2004,7 +2004,7 @@
-             sage: R.set_ring()
-             sage: singular.current_ring()
-             polynomial ring, over a field, local ordering
--            //   characteristic : 7
-+            //   coefficients: ZZ/7
-             //   number of vars : 2
-             //        block   1 : ordering ds
-             //                  : names    a b
-@@ -2260,7 +2260,7 @@
- 
-         sage: loads(dumps(singular.ring()))
-         polynomial ring, over a field, global ordering
--        //   characteristic : 0
-+        //   coefficients: QQ
-         //   number of vars : 1
-         //        block   1 : ordering lp
-         //                  : names    x
---- a/sage/src/sage/libs/singular/function.pyx
-+++ b/sage/src/sage/libs/singular/function.pyx
-@@ -282,7 +282,7 @@
-             sage: l = ringlist(P)
-             sage: ring = singular_function("ring")
-             sage: ring(l, ring=P)._output()
--            //   characteristic : 0
-+            //   coefficients: QQ
-             //   number of vars : 3
-             //        block   1 : ordering dp
-             //                  : names    x y z
---- a/sage/src/sage/schemes/curves/projective_curve.py
-+++ b/sage/src/sage/schemes/curves/projective_curve.py
-@@ -1830,7 +1830,7 @@
-             sage: C = Curve(f); pts = C.rational_points()
-             sage: D = C.divisor([ (3, pts[0]), (-1,pts[1]), (10, pts[5]) ])
-             sage: C.riemann_roch_basis(D)
--            [(-2*x + y)/(x + y), (-x + z)/(x + y)]
-+            [(-x - 2*y)/(-2*x - 2*y), (-x + z)/(x + y)]
- 
- 
-         .. NOTE::
---- a/sage/src/sage/schemes/affine/affine_morphism.py
-+++ b/sage/src/sage/schemes/affine/affine_morphism.py
-@@ -670,7 +670,7 @@
-             sage: H = Hom(A,A)
-             sage: F = H([1/2*x^2 + sqrt(3)])
-             sage: F.dynatomic_polynomial([1,1])
--            (2.00000000000000*x^4 + 5.85640646055102*x^2 + 24.0000000000000)/(x^2 + (-2.00000000000000)*x + 3.46410161513775)
-+            (0.125000000000000*x^4 + 0.366025403784439*x^2 + 1.50000000000000)/(0.500000000000000*x^2 - x + 1.73205080756888)
-         """
-         if self.domain() != self.codomain():
-             raise TypeError("must have same domain and codomain to iterate")
diff --git a/debian/patches/u0-version-singular-4.1.0p3.patch b/debian/patches/u0-version-singular-4.1.0p3.patch
deleted file mode 100644
index 2566eb7..0000000
--- a/debian/patches/u0-version-singular-4.1.0p3.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-Origin: https://trac.sagemath.org/ticket/22868
-
-From 0d6f025a6bf3ac858f331de21b4d9dc298c5c7ec Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Tue, 25 Apr 2017 14:22:45 +0000
-Subject: p_Invers has been statified.
-
-See:
-* https://github.com/Singular/Sources/commit/e6c82d85aac825e8a4b87b736cc416a479f19435
-
-From 85d00244d0db1cce5933bd6ee46114c58bb32fbb Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Tue, 25 Apr 2017 15:03:42 +0000
-Subject: New printing for Z/2^10.
-
-From 72c31808c7dcf6693596431e9ea9a454a827991e Mon Sep 17 00:00:00 2001
-From: Jean-Pierre Flori <jean-pierre.flori at ssi.gouv.fr>
-Date: Wed, 26 Apr 2017 13:35:44 +0000
-Subject: Better (?) solution to invert constant polynomial.
-
----
- src/sage/libs/singular/decl.pxd                            |  4 ++--
- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx | 12 ++++++++----
- 2 files changed, 10 insertions(+), 6 deletions(-)
-
---- a/sage/src/sage/libs/singular/decl.pxd
-+++ b/sage/src/sage/libs/singular/decl.pxd
-@@ -534,6 +534,9 @@
- 
-     int rRing_has_Comp(ring *r)
- 
-+    int rHasGlobalOrdering(ring *r)
-+    int rHasLocalOrMixedOrdering(ring *r)
-+
-     # return new empty monomial
- 
-     poly *p_Init(ring *r)
-@@ -598,7 +601,7 @@
- 
-     # homogenizes p by multiplying certain powers of the varnum-th variable
- 
--    poly *pHomogen (poly *p, int varnum)
-+    poly *p_Homogen (poly *p, int varnum, ring *r)
- 
-     # return whether a polynomial is homogenous
- 
-@@ -710,7 +713,7 @@
- 
-     # inverse of poly, if possible
- 
--    poly *pInvers(int n, poly *, intvec *)
-+    poly *p_Series(int n, poly *, poly *, intvec *, ring *r)
- 
-     # gcd of f and g
- 
-@@ -766,6 +769,10 @@
-     # Copy this number
-     number *n_Copy(number *n, ring* r)
- 
-+    # Invert this number
-+    int n_IsUnit(number *n, const n_Procs_s *cf)
-+    number *n_Invers(number *n, const n_Procs_s *cf)
-+
-     # rational number from int
- 
-     number *nlInit(int)
---- a/sage/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-+++ b/sage/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
-@@ -177,12 +177,13 @@
- # singular functions
- from sage.libs.singular.decl cimport (
-     errorreported,
-+    n_IsUnit, n_Invers,
-     p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q,
-     p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup,
-     omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy,
-     pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy,
--    p_IsUnit, pInvers, p_Head, idInit, fast_map_common_subexp, id_Delete,
--    p_IsHomogeneous, pHomogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize,
-+    p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete,
-+    p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize,
-     idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD,
-     p_LmIsConstant, pTakeOutComp1, singclap_gcd, pp_Mult_qq, p_GetMaxExp,
-     pLength, kNF, p_Neg, p_Minus_mm_Mult_qq, p_Plus_mm_Mult_qq,
-@@ -1344,7 +1345,7 @@
-             sage: R = IntegerModRing(1024)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coefficients: Z/2^10
-+            //   coefficients: ZZ/(2^10)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
-@@ -3101,11 +3102,11 @@
-         cdef ring *_ring = self._parent_ring
-         if(_ring != currRing): rChangeCurrRing(_ring)
- 
--        if not p_IsUnit(self._poly, _ring):
-+        if not (p_IsUnit(self._poly,_ring)):
-             raise ArithmeticError("Element is not a unit.")
- 
-         sig_on()
--        cdef MPolynomial_libsingular r = new_MP(self._parent, pInvers(0, self._poly, NULL))
-+        cdef MPolynomial_libsingular r = new_MP(self._parent, p_NSet(n_Invers(p_GetCoeff(self._poly, _ring),_ring.cf),_ring))
-         sig_off()
-         return r
- 
-@@ -3160,14 +3161,17 @@
- 
-         SEE: ``self.homogenize``
-         """
-+        cdef ring *_ring = self._parent_ring
-         cdef MPolynomialRing_libsingular parent = self._parent
-         cdef MPolynomial_libsingular f
- 
-         if self.is_homogeneous():
-             return self
- 
-+        if(_ring != currRing): rChangeCurrRing(_ring)
-+
-         if var < parent._ring.N:
--            return new_MP(parent, pHomogen(p_Copy(self._poly, self._parent_ring), var+1))
-+            return new_MP(parent, p_Homogen(self._poly, var+1, _ring))
-         else:
-             raise TypeError("var must be < self.parent().ngens()")
- 
---- a/sage/src/sage/rings/polynomial/polynomial_singular_interface.py
-+++ b/sage/src/sage/rings/polynomial/polynomial_singular_interface.py
-@@ -154,7 +154,7 @@
-             sage: R = IntegerModRing(1024)['x,y']
-             sage: singular(R)
-             polynomial ring, over a ring (with zero-divisors), global ordering
--            //   coefficients: Z/2^10
-+            //   coefficients: ZZ/(2^10)
-             //   number of vars : 2
-             //        block   1 : ordering dp
-             //                  : names    x y
diff --git a/debian/patches/u1-fix-dont-require-DISPLAY.patch b/debian/patches/u1-fix-dont-require-DISPLAY.patch
index 80c7cf2..338987b 100644
--- a/debian/patches/u1-fix-dont-require-DISPLAY.patch
+++ b/debian/patches/u1-fix-dont-require-DISPLAY.patch
@@ -16,7 +16,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
 --- a/sage/src/sage/probability/probability_distribution.pyx
 +++ b/sage/src/sage/probability/probability_distribution.pyx
-@@ -112,6 +112,7 @@
+@@ -113,6 +113,7 @@
  
          EXAMPLES::
  
diff --git a/debian/patches/u1-fix-use-lexists-not-exists.patch b/debian/patches/u1-fix-use-lexists-not-exists.patch
index 3a08a27..11d2778 100644
--- a/debian/patches/u1-fix-use-lexists-not-exists.patch
+++ b/debian/patches/u1-fix-use-lexists-not-exists.patch
@@ -6,7 +6,7 @@ Bug: https://trac.sagemath.org/ticket/22438
 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 --- a/sage/src/sage_setup/docbuild/ext/multidocs.py
 +++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
-@@ -284,7 +284,7 @@
+@@ -286,7 +286,7 @@
              app.builder.info(bold('linking _static directory.'))
              static_dir = os.path.join(app.builder.outdir, '_static')
              master_static_dir = os.path.join('..', '_static')
diff --git a/debian/patches/u1-scripts-dir.patch b/debian/patches/u1-scripts-dir.patch
index 1e3cd2a..e7abd98 100644
--- a/debian/patches/u1-scripts-dir.patch
+++ b/debian/patches/u1-scripts-dir.patch
@@ -15,7 +15,7 @@ Forwarded: TODO
  
 --- a/sage/src/bin/sage
 +++ b/sage/src/bin/sage
-@@ -452,13 +452,13 @@
+@@ -453,13 +453,13 @@
  #####################################################################
  
  if [ "$1" = '-dumpversion' -o "$1" = '--dumpversion' ]; then
@@ -31,7 +31,7 @@ Forwarded: TODO
          echo "SageMath version ${SAGE_VERSION}, Release Date: ${SAGE_RELEASE_DATE}"
          exit 0
  fi
-@@ -968,14 +968,14 @@
+@@ -979,14 +979,14 @@
      shift
      sage_setup
      if [ "$SAGE_DEBUG" = "no" ]; then
@@ -52,7 +52,7 @@ Forwarded: TODO
  fi
 --- a/sage/src/bin/sage-env
 +++ b/sage/src/bin/sage-env
-@@ -153,7 +153,7 @@
+@@ -154,7 +154,7 @@
      elif [ "$SAGE_BANNER" != "no" ]; then
          # This file sage-banner is not yet available during the build
          # of Sage, so we ignore errors from cat.
@@ -61,7 +61,7 @@ Forwarded: TODO
      fi
  }
  
-@@ -275,7 +275,7 @@
+@@ -277,7 +277,7 @@
      SAGE_ORIG_PATH=$PATH && export SAGE_ORIG_PATH
      SAGE_ORIG_PATH_SET=True && export SAGE_ORIG_PATH_SET
  fi
@@ -121,16 +121,16 @@ Forwarded: TODO
  if [ ! -d "$DOT_SAGE/valgrind" ]; then
 --- a/sage/src/sage/interfaces/maxima.py
 +++ b/sage/src/sage/interfaces/maxima.py
-@@ -473,7 +473,7 @@
+@@ -472,7 +472,7 @@
  
  from random import randrange
  
 -from sage.env import DOT_SAGE, SAGE_LOCAL
 +from sage.env import DOT_SAGE, SAGE_SCRIPTS_DIR
  
- ##import sage.rings.all
- 
-@@ -524,7 +524,7 @@
+ from .expect import (Expect, ExpectElement, FunctionElement,
+                     ExpectFunction, gc_disabled)
+@@ -523,7 +523,7 @@
          # setting inchar and outchar..
          eval_using_file_cutoff = 256
          self.__eval_using_file_cutoff = eval_using_file_cutoff
@@ -150,7 +150,7 @@ Forwarded: TODO
      which is mostly to make doctesting more predictable.
  
      EXAMPLES::
-@@ -252,7 +252,7 @@
+@@ -267,7 +267,7 @@
  
          INPUT:
  
@@ -159,7 +159,7 @@ Forwarded: TODO
                       or a DocTestDefaults object (possibly with some entries modified)
          - args -- a list of filenames to doctest
  
-@@ -954,9 +954,9 @@
+@@ -969,9 +969,9 @@
              sage: from sage.doctest.control import DocTestDefaults, DocTestController
              sage: DC = DocTestController(DocTestDefaults(timeout=123), ["hello_world.py"])
              sage: print(DC._assemble_cmd())
@@ -171,7 +171,7 @@ Forwarded: TODO
          opt = dict_difference(self.options.__dict__, DocTestDefaults().__dict__)
          for o in ("all", "sagenb"):
              if o in opt:
-@@ -990,14 +990,14 @@
+@@ -1005,14 +1005,14 @@
              sage: DD = DocTestDefaults(gdb=True)
              sage: DC = DocTestController(DD, ["hello_world.py"])
              sage: DC.run_val_gdb(testing=True)
diff --git a/debian/patches/u1-version-ecm-7.patch b/debian/patches/u1-version-ecm-7.patch
deleted file mode 100644
index 2702240..0000000
--- a/debian/patches/u1-version-ecm-7.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-Description: Necessary changes to work with ecm 7.
-Origin: https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/sagemath
-Bug: https://trac.sagemath.org/ticket/20385
-
---- a/sage/src/sage/interfaces/ecm.py
-+++ b/sage/src/sage/interfaces/ecm.py
-@@ -141,9 +141,6 @@
-         - ``ve`` -- integer `n`. Verbosely show short (`< n`
-           character) expressions on each loop
- 
--        - ``cofdec`` -- boolean. Force cofactor output in decimal
--          (even if expressions are used )
--
-         - ``B2scale`` -- integer. Multiplies the default B2 value
- 
-         - ``go`` -- integer. Preload with group order val, which can
-@@ -396,15 +393,15 @@
-             if m is not None:
-                 factor = m.group('factor')
-                 primality = m.group('primality')
--                assert primality in ['probable prime', 'composite']
--                result += [(ZZ(factor), primality == 'probable prime')]
-+                assert primality in ['prime', 'composite']
-+                result += [(ZZ(factor), primality == 'prime')]
-                 continue  # cofactor on the next line
-             m = self._found_cofactor_re.match(line)
-             if m is not None:
-                 cofactor = m.group('cofactor')
-                 primality = m.group('primality')
--                assert primality in ['Probable prime', 'Composite']
--                result += [(ZZ(cofactor), primality == 'Probable prime')]
-+                assert primality in ['Prime', 'Composite']
-+                result += [(ZZ(cofactor), primality == 'Prime')]
-                 # assert len(result) == 2
-                 return result
-         raise ValueError('failed to parse ECM output')
-@@ -501,7 +498,6 @@
-         if factor_digits is not None:
-             B1 = self.recommended_B1(factor_digits)
-         kwds['one'] = True
--        kwds['cofdec'] = True
-         cmd = self._make_cmd(B1, None, kwds)
-         out = self._run_ecm(cmd, n)
-         return self._parse_output(n, out)
-@@ -833,8 +829,8 @@
- Step 1 took 12ms
- Step 2 took 17ms
- ********** Factor found in step 2: 79792266297612017
--Found probable prime factor of 17 digits: 79792266297612017
--Probable prime cofactor 6366805760909027985741435139224233 has 34 digits
-+Found prime factor of 17 digits: 79792266297612017
-+Prime cofactor 6366805760909027985741435139224233 has 34 digits
- """
- 
- TEST_ECM_OUTPUT_2 = """
-@@ -844,8 +840,8 @@
- Step 1 took 2ms
- Step 2 took 3ms
- ********** Factor found in step 2: 179424673
--Found probable prime factor of  9 digits: 179424673
--Probable prime cofactor 179424673 has 9 digits
-+Found prime factor of  9 digits: 179424673
-+Prime cofactor 179424673 has 9 digits
- """
- 
- TEST_ECM_OUTPUT_3 = """
-@@ -863,7 +859,7 @@
- Step 1 took 5ms
- Step 2 took 4ms
- ********** Factor found in step 2: 197002597249
--Found probable prime factor of 12 digits: 197002597249
-+Found prime factor of 12 digits: 197002597249
- Composite cofactor 339872432034468861533158743041639097889948066859 has 48 digits
- """
- 
-@@ -875,5 +871,5 @@
- Step 2 took 2ms
- ********** Factor found in step 2: 265748496095531068869578877937
- Found composite factor of 30 digits: 265748496095531068869578877937
--Probable prime cofactor 251951573867253012259144010843 has 30 digits
-+Prime cofactor 251951573867253012259144010843 has 30 digits
- """
diff --git a/debian/patches/u1-version-planarity-3.patch b/debian/patches/u1-version-planarity-3.patch
deleted file mode 100644
index 0f3b75a..0000000
--- a/debian/patches/u1-version-planarity-3.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-Description: Update Sage's planarity module to use API v3
- Between v3 and v2, planarity upstream decided to switch from 0-based array
- indexing to 1-based array indexing for the lulz. So funny, I really enjoyed
- wasting several hours of my time.
-Author: Ximin Luo <infinity0 at debian.org>
-Forwarded: https://trac.sagemath.org/ticket/21774
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/sage/src/sage/graphs/planarity.pyx
-+++ b/sage/src/sage/graphs/planarity.pyx
-@@ -3,13 +3,19 @@
- """
- 
- cdef extern from "planarity/graph.h":
--    ctypedef struct graphNode:
--        int v
-+    ctypedef struct vertexRec:
-         int link[2]
--    ctypedef graphNode * graphNodeP
-+        int index
-+    ctypedef vertexRec * vertexRecP
-+
-+    ctypedef struct edgeRec:
-+        int link[2]
-+        int neighbor
-+    ctypedef edgeRec * edgeRecP
- 
-     ctypedef struct BM_graph:
--        graphNodeP G
-+        vertexRecP V
-+        edgeRecP E
-         int N
-     ctypedef BM_graph * graphP
- 
-@@ -93,15 +99,16 @@
-             g._pos = { u: [0,0], v: [0,1] }
-         return (True, None) if kuratowski else True
- 
--    # create to and from mappings to relabel vertices to the set {0,...,n-1}
-+    # create to and from mappings to relabel vertices to the set {1,...,n}
-+    # (planarity 3 uses 1-based array indexing, with 0 representing NIL)
-     cdef int i
-     listto = g.vertices()
-     ffrom = {}
-     for vvv in listto:
--        ffrom[vvv] = listto.index(vvv)
-+        ffrom[vvv] = listto.index(vvv) + 1
-     to = {}
-     for i from 0 <= i < len(listto):
--        to[i] = listto[i]
-+        to[i + 1] = listto[i]
-     g.relabel(ffrom)
- 
-     cdef graphP theGraph
-@@ -125,7 +132,7 @@
-     status = gp_Embed(theGraph, EMBEDFLAGS_PLANAR)
-     gp_SortVertices(theGraph)
- 
--    # use to and from mappings to relabel vertices back from the set {0,...,n-1}
-+    # use to and from mappings to relabel vertices back from the set {1,...,n}
-     g.relabel(to)
- 
-     if status == NOTOK:
-@@ -134,12 +141,12 @@
-         # Kuratowski subgraph isolator
-         g_dict = {}
-         from sage.graphs.graph import Graph
--        for i from 0 <= i < theGraph.N:
-+        for i from 0 < i <= theGraph.N:
-             linked_list = []
--            j = theGraph.G[i].link[1]
--            while j >= theGraph.N:
--                linked_list.append(to[theGraph.G[j].v])
--                j = theGraph.G[j].link[1]
-+            j = theGraph.V[i].link[1]
-+            while j:
-+                linked_list.append(to[theGraph.E[j].neighbor])
-+                j = theGraph.E[j].link[1]
-             if len(linked_list) > 0:
-                 g_dict[to[i]] = linked_list
-         G = Graph(g_dict)
-@@ -153,12 +160,12 @@
-             if set_embedding:
-                 emb_dict = {}
-                 #for i in range(theGraph.N):
--                for i from 0 <= i < theGraph.N:
-+                for i from 0 < i <= theGraph.N:
-                     linked_list = []
--                    j = theGraph.G[i].link[1]
--                    while j >= theGraph.N:
--                        linked_list.append(to[theGraph.G[j].v])
--                        j = theGraph.G[j].link[1]
-+                    j = theGraph.V[i].link[1]
-+                    while j:
-+                        linked_list.append(to[theGraph.E[j].neighbor])
-+                        j = theGraph.E[j].link[1]
-                     emb_dict[to[i]] = linked_list
-                 g._embedding = emb_dict
-             if set_pos:
-@@ -174,12 +181,12 @@
- 
-                 emb_dict = {}
-                 #for i in range(theGraph.N):
--                for i from 0 <= i < theGraph.N:
-+                for i from 0 < i <= theGraph.N:
-                     linked_list = []
--                    j = theGraph.G[i].link[0]
--                    while j >= theGraph.N:
--                        linked_list.append(to[theGraph.G[j].v])
--                        j = theGraph.G[j].link[0]
-+                    j = theGraph.V[i].link[0]
-+                    while j:
-+                        linked_list.append(to[theGraph.E[j].neighbor])
-+                        j = theGraph.E[j].link[0]
-                     emb_dict[to[i]] = linked_list
-                 g._embedding = emb_dict
-         gp_Free(&theGraph)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list