[numexpr] 04/08: Remove 0001-fix-test-on-powerpc-and-ppc64el.patch and 0002-numpy-1.12-compatibility.patch: applied upstream

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Wed Jun 28 20:22:29 UTC 2017


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

a_valentino-guest pushed a commit to branch master
in repository numexpr.

commit a353b4cd44c2c84ca1753d00b7557171735c50f8
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Wed Jun 28 19:09:03 2017 +0000

    Remove 0001-fix-test-on-powerpc-and-ppc64el.patch and 0002-numpy-1.12-compatibility.patch: applied upstream
---
 debian/changelog                                   |   3 +
 .../0001-fix-test-on-powerpc-and-ppc64el.patch     |  27 ------
 debian/patches/0002-numpy-1.12-compatibility.patch | 104 ---------------------
 debian/patches/series                              |   2 -
 4 files changed, 3 insertions(+), 133 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7928f4e..fbc7ef5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,9 @@ numexpr (2.6.2-1) UNRELEASED; urgency=medium
 
   * New upstream release
   * Standard version bumped to 4.0.0
+  * debian/patches:
+    - drop 0001-fix-test-on-powerpc-and-ppc64el.patch and
+      0002-numpy-1.12-compatibility.patch: applied upstream
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Wed, 28 Jun 2017 18:52:05 +0000
 
diff --git a/debian/patches/0001-fix-test-on-powerpc-and-ppc64el.patch b/debian/patches/0001-fix-test-on-powerpc-and-ppc64el.patch
deleted file mode 100644
index 467e739..0000000
--- a/debian/patches/0001-fix-test-on-powerpc-and-ppc64el.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Sat, 26 Nov 2016 16:02:27 +0000
-Subject: fix test on powerpc and ppc64el
-
-See also upstream bug #224 [1]
-
-[1] https://github.com/pydata/numexpr/issues/224
----
- numexpr/interp_body.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/numexpr/interp_body.cpp b/numexpr/interp_body.cpp
-index 475a89f..cd5bb45 100644
---- a/numexpr/interp_body.cpp
-+++ b/numexpr/interp_body.cpp
-@@ -271,7 +271,11 @@
-         case OP_SUB_LLL: VEC_ARG2(l_dest = l1 - l2);
-         case OP_MUL_LLL: VEC_ARG2(l_dest = l1 * l2);
-         case OP_DIV_LLL: VEC_ARG2(l_dest = l2 ? (l1 / l2) : 0);
-+#if defined _MSC_VER && _MSC_VER < 1800
-         case OP_POW_LLL: VEC_ARG2(l_dest = (l2 < 0) ? (1 / l1) : (long long)pow((long double)l1, (long double)l2));
-+#else
-+        case OP_POW_LLL: VEC_ARG2(l_dest = (l2 < 0) ? (1 / l1) : (long long)llround(pow((long double)l1, (long double)l2)));
-+#endif
-         case OP_MOD_LLL: VEC_ARG2(l_dest = l2 ? (l1 % l2) : 0);
-         case OP_LSHIFT_LLL: VEC_ARG2(l_dest = l1 << l2);
-         case OP_RSHIFT_LLL: VEC_ARG2(l_dest = l1 >> l2);
diff --git a/debian/patches/0002-numpy-1.12-compatibility.patch b/debian/patches/0002-numpy-1.12-compatibility.patch
deleted file mode 100644
index bd653ae..0000000
--- a/debian/patches/0002-numpy-1.12-compatibility.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Sat, 24 Dec 2016 21:52:23 +0100
-Subject: numpy 1.12 compatibility
-
----
- numexpr/expressions.py        | 10 ++++++++++
- numexpr/tests/test_numexpr.py | 45 +++++++++++++++++++++++++++++++------------
- 2 files changed, 43 insertions(+), 12 deletions(-)
-
-diff --git a/numexpr/expressions.py b/numexpr/expressions.py
-index 1bb2a80..b8261cf 100644
---- a/numexpr/expressions.py
-+++ b/numexpr/expressions.py
-@@ -15,6 +15,8 @@ import sys
- import threading
- 
- import numpy
-+from pkg_resources import parse_version
-+_np_version = parse_version(numpy.__version__)
- 
- # Declare a double type that does not exist in Python space
- double = numpy.double
-@@ -280,6 +282,14 @@ def rtruediv_op(a, b):
- 
- @ophelper
- def pow_op(a, b):
-+    if (_np_version >= parse_version('1.12.0b1') and
-+        b.astKind in ('int', 'long') and
-+        a.astKind in ('int', 'long') and
-+        numpy.any(b.value < 0)):
-+
-+        raise ValueError(
-+            'Integers to negative integer powers are not allowed.')
-+
-     if allConstantNodes([a, b]):
-         return ConstantNode(a ** b)
-     if isinstance(b, ConstantNode):
-diff --git a/numexpr/tests/test_numexpr.py b/numexpr/tests/test_numexpr.py
-index 7e6e27a..7cc9dca 100644
---- a/numexpr/tests/test_numexpr.py
-+++ b/numexpr/tests/test_numexpr.py
-@@ -566,29 +566,50 @@ def test_expressions():
-         this_locals = locals()
- 
-         def method():
--            # We don't want to listen at RuntimeWarnings like
--            # "overflows" or "divide by zero" in plain eval().
--            warnings.simplefilter("ignore")
--            npval = eval(expr, globals(), this_locals)
--            warnings.simplefilter("always")
--            npval = eval(expr, globals(), this_locals)
-+            try:
-+                # We don't want to listen at RuntimeWarnings like
-+                # "overflows" or "divide by zero" in plain eval().
-+                warnings.simplefilter("ignore")
-+                npval = eval(expr, globals(), this_locals)
-+                warnings.simplefilter("always")
-+                npval = eval(expr, globals(), this_locals)
-+            except Exception as ex:
-+                # just store the exception in a variable
-+                # compatibility with numpy v1.12
-+                # see also https://github.com/pydata/numexpr/issues/239
-+                np_exception = ex
-+                npval = None
-+            else:
-+                np_exception = None
-+
-             try:
-                 neval = evaluate(expr, local_dict=this_locals,
-                                  optimization=optimization)
--                assert equal(npval, neval, exact), """%r
--(test_scalar=%r, dtype=%r, optimization=%r, exact=%r,
-- npval=%r (%r - %r)\n neval=%r (%r - %r))""" % (expr, test_scalar, dtype.__name__,
--                                                optimization, exact,
--                                                npval, type(npval), shape(npval),
--                                                neval, type(neval), shape(neval))
-             except AssertionError:
-                 raise
-             except NotImplementedError:
-                 print('%r not implemented for %s (scalar=%d, opt=%s)'
-                       % (expr, dtype.__name__, test_scalar, optimization))
-+            except Exception as ne_exception:
-+                same_exc_type = issubclass(type(ne_exception),
-+                                           type(np_exception))
-+                if np_exception is None or not same_exc_type:
-+                    print('numexpr error for expression %r' % (expr,))
-+                    raise
-             except:
-                 print('numexpr error for expression %r' % (expr,))
-                 raise
-+            else:
-+                msg = ('expected numexpr error not raised for expression '
-+                       '%r' % (expr,))
-+                assert np_exception is None, msg
-+
-+                assert equal(npval, neval, exact), """%r
-+(test_scalar=%r, dtype=%r, optimization=%r, exact=%r,
-+ npval=%r (%r - %r)\n neval=%r (%r - %r))""" % (expr, test_scalar, dtype.__name__,
-+                                                optimization, exact,
-+                                                npval, type(npval), shape(npval),
-+                                                neval, type(neval), shape(neval))
- 
-         method.description = ('test_expressions(%s, test_scalar=%r, '
-                               'dtype=%r, optimization=%r, exact=%r)') \
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 79ab7d9..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-0001-fix-test-on-powerpc-and-ppc64el.patch
-0002-numpy-1.12-compatibility.patch

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



More information about the debian-science-commits mailing list