[Python-apps-commits] r13747 - in packages/cython/trunk/debian (3 files)

yoh at users.alioth.debian.org yoh at users.alioth.debian.org
Wed Nov 30 14:44:20 UTC 2016


    Date: Wednesday, November 30, 2016 @ 14:44:18
  Author: yoh
Revision: 13747

Patch lshift_32bit_ftbfs.patch absorbing two latest fixes from upstream to resolve failing tests on i386 etc. Thanks Tobias Hansen for preping the patch (Closes: #845696)

Added:
  packages/cython/trunk/debian/patches/lshift_32bit_ftbfs.patch
Modified:
  packages/cython/trunk/debian/changelog
  packages/cython/trunk/debian/patches/series

Modified: packages/cython/trunk/debian/changelog
===================================================================
--- packages/cython/trunk/debian/changelog	2016-11-28 23:25:36 UTC (rev 13746)
+++ packages/cython/trunk/debian/changelog	2016-11-30 14:44:18 UTC (rev 13747)
@@ -1,3 +1,11 @@
+cython (0.25.2~b0-2) unstable; urgency=medium
+
+  * Patch lshift_32bit_ftbfs.patch absorbing two latest fixes from upstream
+    to resolve failing tests on i386 etc. Thanks Tobias Hansen for preping
+    the patch (Closes: #845696)
+
+ -- Yaroslav Halchenko <debian at onerussian.com>  Sun, 27 Nov 2016 22:01:10 -0500
+
 cython (0.25.2~b0-1) unstable; urgency=medium
 
   * Fresh upstream beta bugfix release (Closes: #842296)

Added: packages/cython/trunk/debian/patches/lshift_32bit_ftbfs.patch
===================================================================
--- packages/cython/trunk/debian/patches/lshift_32bit_ftbfs.patch	                        (rev 0)
+++ packages/cython/trunk/debian/patches/lshift_32bit_ftbfs.patch	2016-11-30 14:44:18 UTC (rev 13747)
@@ -0,0 +1,72 @@
+From afeb193f97a5f7b85f7128f252b6071127e4031a Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml at behnel.de>
+Date: Sun, 27 Nov 2016 12:03:06 +0100
+Subject: [PATCH] Try to fix #1530: left-shift operations by more than 31 bits
+ wrap around on 32bit systems
+
+---
+ Cython/Utility/Optimize.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Cython/Utility/Optimize.c b/Cython/Utility/Optimize.c
+index 9de085b..4fed9d9 100644
+--- a/Cython/Utility/Optimize.c
++++ b/Cython/Utility/Optimize.c
+@@ -596,7 +596,7 @@ static PyObject* __Pyx_PyInt_{{op}}{{order}}(PyObject *op1, PyObject *op2, CYTHO
+             }
+             return PyInt_FromLong(x);
+         {{elif op == 'Lshift'}}
+-            if (likely(a == (a << b) >> b)) {
++            if (likely(b < sizeof(long)*8 && a == (a << b) >> b) || !a) {
+                 return PyInt_FromLong(a {{c_op}} b);
+             }
+         {{else}}
+@@ -685,12 +685,12 @@ static PyObject* __Pyx_PyInt_{{op}}{{order}}(PyObject *op1, PyObject *op2, CYTHO
+                 x = a {{c_op}} b;
+                 {{if op == 'Lshift'}}
+ #ifdef HAVE_LONG_LONG
+-                if (unlikely(a != x >> b)) {
++                if (unlikely(!(b < sizeof(long)*8 && a == x >> b)) && a) {
+                     ll{{ival}} = {{ival}};
+                     goto long_long;
+                 }
+ #else
+-                if (likely(a == x >> b)) /* execute return statement below */
++                if (likely(b < sizeof(long)*8 && a == x >> b) || !a) /* execute return statement below */
+ #endif
+                 {{endif}}
+             {{endif}}
+
+From ea1939d4e88c598dd9685ca5372d6da73e0b44b0 Mon Sep 17 00:00:00 2001
+From: Robert Bradshaw <robertwb at gmail.com>
+Date: Mon, 21 Nov 2016 22:35:40 -0800
+Subject: [PATCH] Fix some trailing Ls in doctsts.
+
+---
+ tests/run/pyintop.pyx | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/run/pyintop.pyx b/tests/run/pyintop.pyx
+index b9fba34..8ca77ae 100644
+--- a/tests/run/pyintop.pyx
++++ b/tests/run/pyintop.pyx
+@@ -159,16 +159,16 @@ def lshift_int(obj):
+     >>> bigints(lshift_int(-32))
+     (-256, -68719476736, -295147905179352825856, -340282366920938463463374607431768211456)
+ 
+-    >>> (2**28) << 3
++    >>> bigint((2**28) << 3)
+     2147483648
+     >>> bigints(lshift_int(2**28))
+     (2147483648, 576460752303423488, 2475880078570760549798248448, 2854495385411919762116571938898990272765493248)
+-    >>> (-2**28) << 3
++    >>> bigint((-2**28) << 3)
+     -2147483648
+     >>> bigints(lshift_int(-2**28))
+     (-2147483648, -576460752303423488, -2475880078570760549798248448, -2854495385411919762116571938898990272765493248)
+ 
+-    >>> (2**30) << 3
++    >>> bigint((2**30) << 3)
+     8589934592
+     >>> bigints(lshift_int(2**30))
+     (8589934592, 2305843009213693952, 9903520314283042199192993792, 11417981541647679048466287755595961091061972992)

Modified: packages/cython/trunk/debian/patches/series
===================================================================
--- packages/cython/trunk/debian/patches/series	2016-11-28 23:25:36 UTC (rev 13746)
+++ packages/cython/trunk/debian/patches/series	2016-11-30 14:44:18 UTC (rev 13747)
@@ -1,3 +1,4 @@
 deb_nopngmath
 deb_disable_googleanalytics
 honour_SOURCE_DATE_EPOCH_for_copyright_year
+lshift_32bit_ftbfs.patch




More information about the Python-apps-commits mailing list