[sagemath] 01/01: Backport some upstream commits, fixes 2 more tests

Ximin Luo infinity0 at debian.org
Fri Oct 14 19:18:21 UTC 2016


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

infinity0 pushed a commit to branch master
in repository sagemath.

commit 22764b107d61656c7b9f849d8aee6172e2768c78
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Oct 14 21:13:03 2016 +0200

    Backport some upstream commits, fixes 2 more tests
---
 debian/README.Debian                     | 12 ++++------
 debian/patches/series                    |  2 ++
 debian/patches/temp-fix-more-tests.patch | 21 ++++++++++++++++++
 debian/patches/version-givaro-4.patch    | 38 ++++++++++++++++++++++++++++++++
 4 files changed, 65 insertions(+), 8 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 927d5af..fbffb10 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -74,8 +74,8 @@ Now for the summary:
 
 ### Breakdown
 
-31+5 unreproducible for infinity0
-45 (estimated) for Tobias
+29+5 unreproducible for infinity0
+43 (estimated) for Tobias
 
 ### We have some sort of lead for further investigation
 
@@ -104,8 +104,8 @@ sage -t --long src/sage/rings/integer.pyx  # 1 doctest failed
 # ^ due to us using GMP and not MPIR as upstream does
 
 3 Others
-sage -t --long src/sage/libs/singular/function.pyx  # 2 doctests failed (see #17254#comment:252)
-sage -t --long src/sage/numerical/optimize.py  # 4 doctests failed (3 accounted for above, 1 reported as #840159)
+sage -t --long src/sage/libs/singular/function.pyx  # 2 doctests failed (see upstream #17254#comment:252)
+sage -t --long src/sage/numerical/optimize.py  # 4 doctests failed (3 accounted for above, 1 reported as Debian #840159)
 
 ### Not yet investigated / no idea
 
@@ -124,10 +124,6 @@ sage -t --long src/sage/tensor/differential_form_element.py  # 2 doctests failed
 sage -t --long src/sage/symbolic/expression.pyx  # 1 doctest failed
 # ^ plus one extra for Tobias
 
-2 Others
-sage -t --long src/sage/crypto/block_cipher/miniaes.py  # 1 doctest failed
-sage -t --long src/sage/functions/log.py  # 2 doctests failed (1 accounted for above)
-
 9 Other extra for Tobias:
 sage -t --long src/doc/en/thematic_tutorials/tutorial-objects-and-classes.rst  # 2 doctests failed
 sage -t --long src/sage/doctest/forker.py  # 1 doctest failed
diff --git a/debian/patches/series b/debian/patches/series
index 7073683..343571f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,6 +20,7 @@ version-linbox-1.4.patch
 version-ipython-5.patch
 version-singular-4.patch
 version-cddlib-094h.patch
+version-givaro-4.patch
 #version-planarity-3.patch #breaks tests
 
 # due to Debian's inherent differences with upstream;
@@ -46,3 +47,4 @@ debian-temp-userdir.patch
 temp-disable-parallel-sphinx.patch
 temp-cython-include-source.patch
 version-temp-singular-4-extra-fixes.patch
+temp-fix-more-tests.patch
diff --git a/debian/patches/temp-fix-more-tests.patch b/debian/patches/temp-fix-more-tests.patch
new file mode 100644
index 0000000..28a1a4f
--- /dev/null
+++ b/debian/patches/temp-fix-more-tests.patch
@@ -0,0 +1,21 @@
+Description: Update a failing test case as per upstream
+ Backport a small part of upstream commit, to fix 1 failing test case
+Author: Ralf Stephan <ralf at ark.in-berlin.de>
+Applied-Upstream: commit:3784da9e71986de287be1d6c3dca0f1d3473ead3
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/functions/log.py
++++ b/sage/src/sage/functions/log.py
+@@ -359,8 +359,10 @@
+             1/6*pi^2
+             sage: polylog(2,x^2+1)
+             polylog(2, x^2 + 1)
+-            sage: polylog(4,0.5)
+-            polylog(4, 0.500000000000000)
++            sage: polylog(4, 1/2)
++            polylog(4, 1/2)
++            sage: polylog(4, 0.5)
++            0.517479061673899
+ 
+             sage: f = polylog(4, 1); f
+             1/90*pi^4
diff --git a/debian/patches/version-givaro-4.patch b/debian/patches/version-givaro-4.patch
new file mode 100644
index 0000000..4e2050a
--- /dev/null
+++ b/debian/patches/version-givaro-4.patch
@@ -0,0 +1,38 @@
+Description: Fix coercion bug: raise a TypeError exception whenever an ArithmeticError is caught, while trying to reduce an element mod the characteristic.
+ This fixes a test in src/sage/crypto/block_cipher/miniaes.py
+Author: Clement Pernet <clement.pernet at imag.fr>
+Applied-Upstream: commit:b7233c9cb64829f3c8a64b04aa744bdbb007ed27
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/sage/src/sage/rings/finite_rings/element_givaro.pyx
++++ b/sage/src/sage/rings/finite_rings/element_givaro.pyx
+@@ -351,6 +351,14 @@
+             sage: k(-2^100)
+             2
+ 
++        Check coercion of incompatible fields::
++
++            sage: x=GF(7).random_element()
++            sage: k(x)
++            Traceback (most recent call last):
++            ...
++            TypeError: unable to coerce from a finite field other than the prime subfield
++
+         For more examples, see
+         ``finite_field_givaro.FiniteField_givaro._element_constructor_``
+         """
+@@ -375,9 +383,11 @@
+         elif isinstance(e, int) or \
+              isinstance(e, Integer) or \
+              isinstance(e, long) or is_IntegerMod(e):
+-            e_int = e % self.characteristic()
+-            res = self.objectptr.initi(res, e_int)
+-
++            try:
++                e_int = e % self.characteristic()
++                res = self.objectptr.initi(res, e_int)
++            except ArithmeticError:
++                raise TypeError("unable to coerce from a finite field other than the prime subfield")
+         elif e is None:
+             e_int = 0
+             res = self.objectptr.initi(res, e_int)

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