Hello community,

here is the log from the commit of package python3-numexpr for openSUSE:Factory 
checked in at 2015-05-02 21:43:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-numexpr (Old)
 and      /work/SRC/openSUSE:Factory/.python3-numexpr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-numexpr"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-numexpr/python3-numexpr.changes  
2015-04-25 11:25:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-numexpr.new/python3-numexpr.changes     
2015-05-02 21:43:26.000000000 +0200
@@ -1,0 +2,7 @@
+Sat May  2 18:13:50 UTC 2015 - a...@gmx.de
+
+- update to version 2.4.3:
+  * Comparisons with empty strings work correctly now. Fixes #121 and
+    PyTables #184.
+
+-------------------------------------------------------------------

Old:
----
  numexpr-2.4.2.tar.gz

New:
----
  numexpr-2.4.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-numexpr.spec ++++++
--- /var/tmp/diff_new_pack.cgj39a/_old  2015-05-02 21:43:27.000000000 +0200
+++ /var/tmp/diff_new_pack.cgj39a/_new  2015-05-02 21:43:27.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python3-numexpr
-Version:        2.4.2
+Version:        2.4.3
 Release:        0
 Url:            https://github.com/pydata/numexpr
 Summary:        Fast numerical expression evaluator for NumPy

++++++ numexpr-2.4.2.tar.gz -> numexpr-2.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/ANNOUNCE.rst 
new/numexpr-2.4.3/ANNOUNCE.rst
--- old/numexpr-2.4.2/ANNOUNCE.rst      2015-04-22 10:38:27.000000000 +0200
+++ new/numexpr-2.4.3/ANNOUNCE.rst      2015-04-27 17:45:42.000000000 +0200
@@ -1,5 +1,5 @@
 =========================
- Announcing Numexpr 2.4.2
+ Announcing Numexpr 2.4.3
 =========================
 
 Numexpr is a fast numerical expression evaluator for NumPy.  With it,
@@ -21,9 +21,8 @@
 What's new
 ==========
 
-This is a maintenance release where basically setup.py has been
-improved so that pip can query the name and version without actually
-doing the installation.  Thanks to Joris Borgdorff.
+This is a maintenance release to cope with an old bug affecting
+comparisons with empty strings.  Fixes #121 and PyTables #184.
 
 In case you want to know more in detail what has changed in this
 version, see:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/PKG-INFO new/numexpr-2.4.3/PKG-INFO
--- old/numexpr-2.4.2/PKG-INFO  2015-04-22 10:45:06.000000000 +0200
+++ new/numexpr-2.4.3/PKG-INFO  2015-04-27 17:47:24.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: numexpr
-Version: 2.4.2
+Version: 2.4.3
 Summary: Fast numerical expression evaluator for NumPy
 Home-page: https://github.com/pydata/numexpr
 Author: David M. Cooke, Francesc Alted and others
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/RELEASE_NOTES.rst 
new/numexpr-2.4.3/RELEASE_NOTES.rst
--- old/numexpr-2.4.2/RELEASE_NOTES.rst 2015-04-21 18:18:02.000000000 +0200
+++ new/numexpr-2.4.3/RELEASE_NOTES.rst 2015-04-27 17:44:51.000000000 +0200
@@ -2,13 +2,18 @@
  Release notes for Numexpr 2.4 series
 ======================================
 
+Changes from 2.4.2 to 2.4.3
+===========================
+
+* Comparisons with empty strings work correctly now.  Fixes #121 and
+  PyTables #184.
+
 Changes from 2.4.1 to 2.4.2
 ===========================
 
 * Improved setup.py so that pip can query the name and version without
   actually doing the installation.  Thanks to Joris Borgdorff.
 
-
 Changes from 2.4 to 2.4.1
 =========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/numexpr/interpreter.cpp 
new/numexpr-2.4.3/numexpr/interpreter.cpp
--- old/numexpr-2.4.2/numexpr/interpreter.cpp   2015-04-14 14:28:33.000000000 
+0200
+++ new/numexpr-2.4.3/numexpr/interpreter.cpp   2015-04-27 17:38:58.000000000 
+0200
@@ -500,9 +500,15 @@
 {
     npy_intp maxlen, nextpos;
     /* Point to this when the end of a string is found,
-       to simulate infinte trailing NUL characters. */
+       to simulate infinte trailing NULL characters. */
     const char null = 0;
 
+    // First check if some of the operands is the empty string and if so,
+    // just check that the first char of the other is the NULL one.
+    // Fixes #121
+    if (maxlen2 == 0) return *s1 != null;
+    if (maxlen1 == 0) return *s2 != null;
+
     maxlen = (maxlen1 > maxlen2) ? maxlen1 : maxlen2;
     for (nextpos = 1;  nextpos <= maxlen;  nextpos++) {
         if (*s1 < *s2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/numexpr/tests/test_numexpr.py 
new/numexpr-2.4.3/numexpr/tests/test_numexpr.py
--- old/numexpr-2.4.2/numexpr/tests/test_numexpr.py     2015-04-14 
13:48:08.000000000 +0200
+++ new/numexpr-2.4.3/numexpr/tests/test_numexpr.py     2015-04-27 
17:38:07.000000000 +0200
@@ -14,7 +14,7 @@
 import platform
 import warnings
 
-import numpy
+import numpy as np
 from numpy import (
     array, arange, empty, zeros, int32, int64, uint16, complex_, float64, rec,
     copy, ones_like, where, alltrue, linspace,
@@ -33,7 +33,7 @@
 
 TestCase = unittest.TestCase
 
-double = numpy.double
+double = np.double
 
 
 # Recommended minimum versions
@@ -548,7 +548,7 @@
 
     x = None
     for test_scalar in (0, 1, 2):
-        for dtype in (int, long, numpy.float32, double, complex):
+        for dtype in (int, long, np.float32, double, complex):
             array_size = 100
             a = arange(2 * array_size, dtype=dtype)[::2]
             a2 = zeros([array_size, array_size], dtype=dtype)
@@ -617,8 +617,8 @@
 
     def test_long_constant_promotion(self):
         int32array = arange(100, dtype='int32')
-        itwo = numpy.int32(2)
-        ltwo = numpy.int64(2)
+        itwo = np.int32(2)
+        ltwo = np.int64(2)
         res = int32array * 2
         res32 = evaluate('int32array * itwo')
         res64 = evaluate('int32array * ltwo')
@@ -639,15 +639,15 @@
 class test_uint32_int64(TestCase):
     def test_small_uint32(self):
         # Small uint32 should not be downgraded to ints.
-        a = numpy.uint32(42)
+        a = np.uint32(42)
         res = evaluate('a')
         assert_array_equal(res, 42)
         self.assertEqual(res.dtype.name, 'int64')
 
     def test_uint32_constant_promotion(self):
         int32array = arange(100, dtype='int32')
-        stwo = numpy.int32(2)
-        utwo = numpy.uint32(2)
+        stwo = np.int32(2)
+        utwo = np.uint32(2)
         res = int32array * utwo
         res32 = evaluate('int32array * stwo')
         res64 = evaluate('int32array * utwo')
@@ -719,6 +719,22 @@
         expr = 'sarr1 + sarr2'
         self.assert_missing_op('add_sss', expr, locals())
 
+    def test_empty_string1(self):
+        a = np.array(["", "pepe"])
+        b = np.array(["pepe2", ""])
+        res = evaluate("(a == '') & (b == 'pepe2')")
+        assert_array_equal(res, np.array([True, False]))
+        res2 = evaluate("(a == 'pepe') & (b == '')")
+        assert_array_equal(res2, np.array([False, True]))
+
+    def test_empty_string2(self):
+        a = np.array(["p", "pepe"])
+        b = np.array(["pepe2", ""])
+        res = evaluate("(a == '') & (b == 'pepe2')")
+        assert_array_equal(res, np.array([False, False]))
+        res2 = evaluate("(a == 'pepe') & (b == '')")
+        assert_array_equal(res, np.array([False, False]))
+
     def test_add_numeric_array(self):
         sarr = self.str_array1
         narr = arange(len(sarr), dtype='int32')
@@ -814,7 +830,7 @@
 # The worker function for the subprocess (needs to be here because Windows
 # has problems pickling nested functions with the multiprocess module :-/)
 def _worker(qout=None):
-    ra = numpy.arange(1e3)
+    ra = np.arange(1e3)
     rows = evaluate('ra > 0')
     #print "Succeeded in evaluation!\n"
     if qout is not None:
@@ -845,12 +861,12 @@
 def print_versions():
     """Print the versions of software that numexpr relies on."""
     from pkg_resources import parse_version
-    if parse_version(numpy.__version__) < parse_version(minimum_numpy_version):
+    if parse_version(np.__version__) < parse_version(minimum_numpy_version):
         print("*Warning*: NumPy version is lower than recommended: %s < %s" % \
-              (numpy.__version__, minimum_numpy_version))
+              (np.__version__, minimum_numpy_version))
     print('-=' * 38)
     print("Numexpr version:   %s" % numexpr.__version__)
-    print("NumPy version:     %s" % numpy.__version__)
+    print("NumPy version:     %s" % np.__version__)
     print('Python version:    %s' % sys.version)
     if os.name == 'posix':
         (sysname, nodename, release, version, machine) = os.uname()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/numexpr/version.py 
new/numexpr-2.4.3/numexpr/version.py
--- old/numexpr-2.4.2/numexpr/version.py        2015-04-22 10:40:28.000000000 
+0200
+++ new/numexpr-2.4.3/numexpr/version.py        2015-04-27 17:46:06.000000000 
+0200
@@ -8,4 +8,4 @@
 #  rights to use.
 ####################################################################
 
-version = '2.4.2'
+version = '2.4.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.4.2/numexpr.egg-info/PKG-INFO 
new/numexpr-2.4.3/numexpr.egg-info/PKG-INFO
--- old/numexpr-2.4.2/numexpr.egg-info/PKG-INFO 2015-04-22 10:45:06.000000000 
+0200
+++ new/numexpr-2.4.3/numexpr.egg-info/PKG-INFO 2015-04-27 17:47:24.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: numexpr
-Version: 2.4.2
+Version: 2.4.3
 Summary: Fast numerical expression evaluator for NumPy
 Home-page: https://github.com/pydata/numexpr
 Author: David M. Cooke, Francesc Alted and others


Reply via email to