[sagemath] 01/01: Import upstream patch for singular 4.1.0-p3.

Tobias Hansen thansen at moszumanska.debian.org
Sat May 6 01:09:19 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 8bd28b4cad59f133121e97e115034512a0398dfa
Author: Tobias Hansen <thansen at debian.org>
Date:   Sat May 6 02:09:02 2017 +0100

    Import upstream patch for singular 4.1.0-p3.
---
 debian/changelog                                 |   7 ++
 debian/control.runtime-depends                   |   6 +-
 debian/patches/series                            |   1 +
 debian/patches/u0-version-singular-4.1.0p3.patch | 137 +++++++++++++++++++++++
 4 files changed, 148 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 36ebefd..48efc60 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+sagemath (7.6-2) UNRELEASED; urgency=medium
+
+  * New patch u0-version-singular-4.1.0-p3.
+  * Depend on singular (>= 1:4.1.0-p3).
+
+ -- Tobias Hansen <thansen at debian.org>  Sat, 06 May 2017 02:06:23 +0100
+
 sagemath (7.6-1) experimental; urgency=medium
 
   * New upstream version.
diff --git a/debian/control.runtime-depends b/debian/control.runtime-depends
index 498b3e5..fc57751 100644
--- a/debian/control.runtime-depends
+++ b/debian/control.runtime-depends
@@ -17,7 +17,7 @@
  libcdd-tools (>= 094h),
  libjs-mathjax,
  libjs-three (>= 80),
- libsingular4-dev (>= 1:4.1.0-p2),
+ libsingular4-dev (>= 1:4.1.0-p3),
  maxima-sage (>= 5.39.0),
  maxima-sage-doc (>= 5.39.0),
  maxima-sage-share (>= 5.39.0),
@@ -108,8 +108,8 @@
  sagemath-database-graphs,
  sagemath-database-mutually-combinatorial-designs,
  sagemath-database-polytopes,
- singular (>= 1:4.1.0-p2),
- singular-doc (>= 1:4.1.0-p2),
+ singular (>= 1:4.1.0-p3),
+ singular-doc (>= 1:4.1.0-p3),
  sqlite3,
  sympow (>= 1.023-8),
  tachyon,
diff --git a/debian/patches/series b/debian/patches/series
index 78f0d50..342c92b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,6 +2,7 @@
 # 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
diff --git a/debian/patches/u0-version-singular-4.1.0p3.patch b/debian/patches/u0-version-singular-4.1.0p3.patch
new file mode 100644
index 0000000..2566eb7
--- /dev/null
+++ b/debian/patches/u0-version-singular-4.1.0p3.patch
@@ -0,0 +1,137 @@
+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

-- 
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