[sagemath] 01/01: Apply upstream doctest fixes for pynac 0.7.4 (from trac #22219).

Tobias Hansen thansen at moszumanska.debian.org
Sun Feb 26 19:03:16 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 3f166d83763fc84ee417971189df982c6da47ad7
Author: Tobias Hansen <thansen at debian.org>
Date:   Sun Feb 26 19:02:49 2017 +0000

    Apply upstream doctest fixes for pynac 0.7.4 (from trac #22219).
---
 debian/changelog                            |  1 +
 debian/patches/series                       |  3 +-
 debian/patches/u0-version-pynac-0.7.4.patch | 68 +++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 0443cd7..fc3d970 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,7 @@ sagemath (7.5.1-1) UNRELEASED; urgency=medium
     - dt-more-fix-test-cases.patch (parts were applied upstream)
   * New patches:
     - u0-version-singular-4.1.0p2.patch
+    - u0-version-pynac-0.7.4.patch
     - u1-singular-include-path-for-pynac.patch
     - u1-dont-test-glpk-version.patch
 
diff --git a/debian/patches/series b/debian/patches/series
index be5ecfe..19420f4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,10 +1,11 @@
 # Patches already applied upstream or committed in a side branch
 # Or nearly-finished patches that they'll very probably merge.
 u0-version-pari-2.9.patch
+u0-version-singular-4.1.0p2.patch
+u0-version-pynac-0.7.4.patch
 
 # Uncontroversial fixes to Sage's code
 # We should forward these upstream, and they would probably accept
-u0-version-singular-4.1.0p2.patch
 u1-pip-nowarn.patch
 u1-version-planarity-3.patch
 u1-version-pbori-boost1.62-hashes.patch
diff --git a/debian/patches/u0-version-pynac-0.7.4.patch b/debian/patches/u0-version-pynac-0.7.4.patch
new file mode 100644
index 0000000..1320f6f
--- /dev/null
+++ b/debian/patches/u0-version-pynac-0.7.4.patch
@@ -0,0 +1,68 @@
+From a178a75b2cda70c50544e13400327be23e1fe7e9 Mon Sep 17 00:00:00 2001
+From: Ralf Stephan <ralf at ark.in-berlin.de>
+Date: Fri, 20 Jan 2017 17:23:18 +0100
+Subject: 22219: doctest fixes
+
+---
+ src/sage/calculus/wester.py      | 4 ++++
+ src/sage/libs/pynac/pynac.pyx    | 4 ++--
+ src/sage/symbolic/expression.pyx | 2 +-
+ src/sage/symbolic/function.pyx   | 2 +-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+--- a/sage/src/sage/calculus/wester.py
++++ b/sage/src/sage/calculus/wester.py
+@@ -508,7 +508,11 @@
+     sage: # (OK-ish) D(x)Abs(x)
+     sage: #    Verify(D(x) Abs(x), Sign(x));
+     sage: diff(abs(x))
++    1/2*(x + conjugate(x))/abs(x)
++    sage: _ = var('x', domain='real')
++    sage: diff(abs(x))
+     x/abs(x)
++    sage: forget()
+ 
+ ::
+ 
+--- a/sage/src/sage/libs/pynac/pynac.pyx
++++ b/sage/src/sage/libs/pynac/pynac.pyx
+@@ -1506,7 +1506,7 @@
+         sage: sin(2.*I)
+         3.62686040784702*I
+         sage: sin(QQbar(I))
+-        1.17520119364380*I
++        sin(I)
+     """
+     try:
+         return x.sin()
+@@ -1528,7 +1528,7 @@
+         sage: cos(2.*I)
+         3.76219569108363
+         sage: cos(QQbar(I))
+-        1.54308063481524
++        cos(I)
+     """
+     try:
+         return x.cos()
+--- a/sage/src/sage/symbolic/expression.pyx
++++ b/sage/src/sage/symbolic/expression.pyx
+@@ -4354,7 +4354,7 @@
+             sage: x,y = var('x,y', domain='real')
+             sage: p,q = var('p,q', domain='positive')
+             sage: (c/2*(5*(3*a*b*x*y*p*q)^2)^(7/2*c)).expand()
+-            1/2*45^(7/2*c)*(a^2*b^2)^(7/2*c)*c*p^(7*c)*q^(7*c)*(x^2)^(7/2*c)*(y^2)^(7/2*c)
++            1/2*45^(7/2*c)*(a^2*b^2*x^2*y^2)^(7/2*c)*c*p^(7*c)*q^(7*c)
+             sage: ((-(-a*x*p)^3*(b*y*p)^3)^(c/2)).expand()
+             (a^3*b^3*x^3*y^3)^(1/2*c)*p^(3*c)
+             sage: x,y,p,q = var('x,y,p,q', domain='complex')
+--- a/sage/src/sage/symbolic/function.pyx
++++ b/sage/src/sage/symbolic/function.pyx
+@@ -395,7 +395,7 @@
+             ...
+             TypeError: cannot coerce arguments: ...
+             sage: exp(QQbar(I))
+-            0.540302305868140 + 0.841470984807897*I
++            e^I
+ 
+         For functions with single argument, if coercion fails we try to call
+         a method with the name of the function on the object::

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