Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-numexpr for openSUSE:Factory 
checked in at 2023-01-03 15:04:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-numexpr (Old)
 and      /work/SRC/openSUSE:Factory/.python-numexpr.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-numexpr"

Tue Jan  3 15:04:27 2023 rev:18 rq:1046267 version:2.8.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-numexpr/python-numexpr.changes    
2022-08-04 13:23:19.472475012 +0200
+++ /work/SRC/openSUSE:Factory/.python-numexpr.new.1563/python-numexpr.changes  
2023-01-03 15:04:34.794234799 +0100
@@ -1,0 +2,13 @@
+Mon Jan  2 18:44:01 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.8.4:
+  * Support for Python 3.11 has been added.
+  * Thanks to Tobias Hangleiter for an improved accuracy complex `expm1` 
function.
+    While it is 25 % slower, it is significantly more accurate for the real 
component
+    over a range of values and matches NumPy outputs much more closely.
+  * Thanks to Kirill Kouzoubov for a range of fixes to constants parsing that 
was 
+    resulting in duplicated constants of the same value.
+  * Thanks to Mark Harfouche for noticing that we no longer need `numpy` 
version 
+    checks. `packaging` is no longer a requirement as a result.
+
+-------------------------------------------------------------------

Old:
----
  numexpr-2.8.3.tar.gz

New:
----
  numexpr-2.8.4.tar.gz

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

Other differences:
------------------
++++++ python-numexpr.spec ++++++
--- /var/tmp/diff_new_pack.fu4Y0e/_old  2023-01-03 15:04:35.278237624 +0100
+++ /var/tmp/diff_new_pack.fu4Y0e/_new  2023-01-03 15:04:35.282237647 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-numexpr
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python-numexpr
-Version:        2.8.3
+Version:        2.8.4
 Release:        0
 Summary:        Numerical expression evaluator for NumPy
 License:        MIT
@@ -26,13 +26,11 @@
 Source:         
https://files.pythonhosted.org/packages/source/n/numexpr/numexpr-%{version}.tar.gz
 BuildRequires:  %{python_module devel >= 3.7}
 BuildRequires:  %{python_module numpy-devel >= 1.13.3}
-BuildRequires:  %{python_module packaging}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  python-rpm-macros
 Requires:       python-numpy >= 1.13.3
-Requires:       python-packaging
 %python_subpackages
 
 %description

++++++ numexpr-2.8.3.tar.gz -> numexpr-2.8.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/ANNOUNCE.rst 
new/numexpr-2.8.4/ANNOUNCE.rst
--- old/numexpr-2.8.3/ANNOUNCE.rst      2022-06-25 22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/ANNOUNCE.rst      2022-10-26 04:43:06.000000000 +0200
@@ -1,42 +1,29 @@
 ========================
-Announcing NumExpr 2.8.3
+Announcing NumExpr 2.8.4
 ========================
 
 Hi everyone, 
 
-Please find here another maintenance release of NumExpr. Support for Python 
3.6 
-has been dropped to enable support for NumPy 1.23 (and by extension Python 
3.11 
-when it is released). Wheels for ARM64 multilinux should be available again 
after 
-troubles with GitHub Actions and Apple Silicon wheels are also now available 
on 
-PyPi for download.
+This is a maintenance and bug-fix release for NumExpr. In particular, now we 
have 
+added Python 3.11 support. 
 
 Project documentation is available at:
 
 http://numexpr.readthedocs.io/
 
 
-Changes from 2.8.1 to 2.8.2
+Changes from 2.8.3 to 2.8.4
 ---------------------------
 
-* Support for Python 3.6 has been dropped due to the need to substitute the 
flag 
-  `NPY_ARRAY_WRITEBACKIFCOPY` for `NPY_ARRAY_UPDATEIFCOPY`. This flag change 
was 
-  initiated in NumPy 1.14 and finalized in 1.23. The only changes were made to 
-  cases where an unaligned constant was passed in with a pre-allocated output 
-  variable:
-
-```
-    x = np.empty(5, dtype=np.uint8)[1:].view(np.int32)
-    ne.evaluate('3', out=x)
-```
-
-  We think the risk of issues is very low, but if you are using NumExpr as a 
-  expression evaluation tool you may want to write a test for this edge case.
-* Thanks to Matt Einhorn (@matham) for improvements to the GitHub Actions 
build process to
-  add support for Apple Silicon and aarch64.
-* Thanks to Biswapriyo Nath (@biswa96) for a fix to allow `mingw` builds on 
Windows.
-* There have been some changes made to not import `platform.machine()` on 
`sparc`
-  but it is highly advised to upgrade to Python 3.9+ to avoid this issue with 
-  the Python core package `platform`.
+* Support for Python 3.11 has been added.
+* Thanks to Tobias Hangleiter for an improved accuracy complex `expm1` 
function.
+  While it is 25 % slower, it is significantly more accurate for the real 
component
+  over a range of values and matches NumPy outputs much more closely.
+* Thanks to Kirill Kouzoubov for a range of fixes to constants parsing that 
was 
+  resulting in duplicated constants of the same value.
+* Thanks to Mark Harfouche for noticing that we no longer need `numpy` version 
+  checks. `packaging` is no longer a requirement as a result.
+
 
 What's Numexpr?
 ---------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/PKG-INFO new/numexpr-2.8.4/PKG-INFO
--- old/numexpr-2.8.3/PKG-INFO  2022-06-25 22:35:21.620025000 +0200
+++ new/numexpr-2.8.4/PKG-INFO  2022-10-26 04:59:27.071168200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: numexpr
-Version: 2.8.3
+Version: 2.8.4
 Summary: Fast numerical expression evaluator for NumPy
 Home-page: https://github.com/pydata/numexpr
 Author: David M. Cooke, Francesc Alted, and others
@@ -16,6 +16,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: POSIX
 Classifier: Operating System :: MacOS
@@ -86,9 +87,9 @@
 The result is that NumExpr can get the most of your machine computing
 capabilities for array-wise computations. Common speed-ups with regard
 to NumPy are usually between 0.95x (for very simple expressions like
-:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a >
-2.5*b'`), although much higher speed-ups can be achieved for some functions 
-and complex math operations (up to 15x in some cases).
+:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 
2.5*b'`), 
+although much higher speed-ups can be achieved for some functions  and complex 
+math operations (up to 15x in some cases).
 
 NumExpr performs best on matrices that are too large to fit in L1 CPU cache. 
 In order to get a better idea on the different speed-ups that can be achieved 
@@ -114,17 +115,17 @@
 From Source
 ^^^^^^^^^^^
 
-On most `Nix systems your compilers will already be present. However if you 
+On most \*nix systems your compilers will already be present. However if you 
 are using a virtual environment with a substantially newer version of Python 
than
 your system Python you may be prompted to install a new version of `gcc` or 
`clang`.
 
 For Windows, you will need to install the Microsoft Visual C++ Build Tools 
-(which are free) first.The version depends on which version of Python you have 
+(which are free) first. The version depends on which version of Python you 
have 
 installed:
 
 https://wiki.python.org/moin/WindowsCompilers
 
-For Python 3.6+ simply installating the latest version of MSVC build tools 
should 
+For Python 3.6+ simply installing the latest version of MSVC build tools 
should 
 be sufficient. Note that wheels found via pip do not include MKL support. 
Wheels 
 available via `conda` will have MKL, if the MKL backend is used for NumPy.
 
@@ -145,7 +146,7 @@
 
 NumExpr includes support for Intel's MKL library. This may provide better 
 performance on Intel architectures, mainly when evaluating transcendental 
-functions (trigonometrical, exponential...). 
+functions (trigonometrical, exponential, ...). 
 
 If you have Intel's MKL, copy the `site.cfg.example` that comes with the 
 distribution to `site.cfg` and edit the latter file to provide correct paths 
to 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/README.rst new/numexpr-2.8.4/README.rst
--- old/numexpr-2.8.3/README.rst        2022-06-25 22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/README.rst        2022-10-26 04:43:06.000000000 +0200
@@ -60,9 +60,9 @@
 The result is that NumExpr can get the most of your machine computing
 capabilities for array-wise computations. Common speed-ups with regard
 to NumPy are usually between 0.95x (for very simple expressions like
-:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a >
-2.5*b'`), although much higher speed-ups can be achieved for some functions 
-and complex math operations (up to 15x in some cases).
+:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 
2.5*b'`), 
+although much higher speed-ups can be achieved for some functions  and complex 
+math operations (up to 15x in some cases).
 
 NumExpr performs best on matrices that are too large to fit in L1 CPU cache. 
 In order to get a better idea on the different speed-ups that can be achieved 
@@ -88,17 +88,17 @@
 From Source
 ^^^^^^^^^^^
 
-On most `Nix systems your compilers will already be present. However if you 
+On most \*nix systems your compilers will already be present. However if you 
 are using a virtual environment with a substantially newer version of Python 
than
 your system Python you may be prompted to install a new version of `gcc` or 
`clang`.
 
 For Windows, you will need to install the Microsoft Visual C++ Build Tools 
-(which are free) first.The version depends on which version of Python you have 
+(which are free) first. The version depends on which version of Python you 
have 
 installed:
 
 https://wiki.python.org/moin/WindowsCompilers
 
-For Python 3.6+ simply installating the latest version of MSVC build tools 
should 
+For Python 3.6+ simply installing the latest version of MSVC build tools 
should 
 be sufficient. Note that wheels found via pip do not include MKL support. 
Wheels 
 available via `conda` will have MKL, if the MKL backend is used for NumPy.
 
@@ -119,7 +119,7 @@
 
 NumExpr includes support for Intel's MKL library. This may provide better 
 performance on Intel architectures, mainly when evaluating transcendental 
-functions (trigonometrical, exponential...). 
+functions (trigonometrical, exponential, ...). 
 
 If you have Intel's MKL, copy the `site.cfg.example` that comes with the 
 distribution to `site.cfg` and edit the latter file to provide correct paths 
to 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/RELEASE_NOTES.rst 
new/numexpr-2.8.4/RELEASE_NOTES.rst
--- old/numexpr-2.8.3/RELEASE_NOTES.rst 2022-06-25 22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/RELEASE_NOTES.rst 2022-10-26 04:43:06.000000000 +0200
@@ -2,6 +2,18 @@
 Release notes for NumExpr 2.8 series
 ====================================
 
+Changes from 2.8.3 to 2.8.4
+---------------------------
+
+* Support for Python 3.11 has been added.
+* Thanks to Tobias Hangleiter for an improved accuracy complex `expm1` 
function.
+  While it is 25 % slower, it is significantly more accurate for the real 
component
+  over a range of values and matches NumPy outputs much more closely.
+* Thanks to Kirill Kouzoubov for a range of fixes to constants parsing that 
was 
+  resulting in duplicated constants of the same value.
+* Thanks to Mark Harfouche for noticing that we no longer need `numpy` version 
+  checks. `packaging` is no longer a requirement as a result.
+
 Changes from 2.8.1 to 2.8.3
 ---------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/complex_functions.hpp 
new/numexpr-2.8.4/numexpr/complex_functions.hpp
--- old/numexpr-2.8.3/numexpr/complex_functions.hpp     2022-06-25 
22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/numexpr/complex_functions.hpp     2022-10-26 
04:43:06.000000000 +0200
@@ -158,9 +158,10 @@
 static void
 nc_expm1(npy_cdouble *x, npy_cdouble *r)
 {
-    double a = exp(x->real);
-    r->real = a*cos(x->imag) - 1.0;
-    r->imag = a*sin(x->imag);
+    double a = sin(x->imag / 2);
+    double b = exp(x->real);
+    r->real = expm1(x->real) * cos(x->imag) - 2 * a * a;
+    r->imag = b * sin(x->imag);
     return;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/expressions.py 
new/numexpr-2.8.4/numexpr/expressions.py
--- old/numexpr-2.8.3/numexpr/expressions.py    2022-06-25 22:25:22.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr/expressions.py    2022-10-26 04:43:06.000000000 
+0200
@@ -15,10 +15,6 @@
 import threading
 
 import numpy
-# NumPy's behavior sometimes changes with versioning, especially in regard as 
-# to when ints are cast to floats.
-from packaging.version import parse, Version
-_np_version_forbids_neg_powint = parse(numpy.__version__) > Version('1.12.0b1')
 
 # Declare a double type that does not exist in Python space
 double = numpy.double
@@ -142,6 +138,8 @@
     # a float (32-bit) array with a double (64-bit) constant.
     if isinstance(x, double):
         return double
+    if isinstance(x, numpy.float32):
+        return float
     if isinstance(x, (int, numpy.integer)):
         # Constants needing more than 32 bits are always
         # considered ``long``, *regardless of the platform*, so we
@@ -156,7 +154,7 @@
             y = converter(x)
         except Exception as err:
             continue
-        if y == x:
+        if y == x or numpy.isnan(y):
             return converter
 
 
@@ -273,8 +271,7 @@
 
 @ophelper
 def pow_op(a, b):
-    if (_np_version_forbids_neg_powint and
-        b.astKind in ('int', 'long') and
+    if (b.astKind in ('int', 'long') and
         a.astKind in ('int', 'long') and
         numpy.any(b.value < 0)):
 
@@ -333,6 +330,7 @@
     return OpNode('pow', [a, b])
 
 # The functions and the minimum and maximum types accepted
+numpy.expm1x = numpy.expm1
 functions = {
     'copy': func(numpy.copy),
     'ones_like': func(numpy.ones_like),
@@ -504,7 +502,7 @@
     def __init__(self, value=None, children=None):
         kind = getKind(value)
         # Python float constants are double precision by default
-        if kind == 'float':
+        if kind == 'float' and isinstance(value, float):
             kind = 'double'
         LeafNode.__init__(self, value=value, kind=kind)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/functions.hpp 
new/numexpr-2.8.4/numexpr/functions.hpp
--- old/numexpr-2.8.3/numexpr/functions.hpp     2022-06-25 22:25:22.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr/functions.hpp     2022-10-26 04:43:06.000000000 
+0200
@@ -102,27 +102,27 @@
 #define ELIDE_FUNC_CC
 #define FUNC_CC(...)
 #endif
-FUNC_CC(FUNC_SQRT_CC,    "sqrt_cc",     nc_sqrt,  vzSqrt)
-FUNC_CC(FUNC_SIN_CC,     "sin_cc",      nc_sin,   vzSin)
-FUNC_CC(FUNC_COS_CC,     "cos_cc",      nc_cos,   vzCos)
-FUNC_CC(FUNC_TAN_CC,     "tan_cc",      nc_tan,   vzTan)
-FUNC_CC(FUNC_ARCSIN_CC,  "arcsin_cc",   nc_asin,  vzAsin)
-FUNC_CC(FUNC_ARCCOS_CC,  "arccos_cc",   nc_acos,  vzAcos)
-FUNC_CC(FUNC_ARCTAN_CC,  "arctan_cc",   nc_atan,  vzAtan)
-FUNC_CC(FUNC_SINH_CC,    "sinh_cc",     nc_sinh,  vzSinh)
-FUNC_CC(FUNC_COSH_CC,    "cosh_cc",     nc_cosh,  vzCosh)
-FUNC_CC(FUNC_TANH_CC,    "tanh_cc",     nc_tanh,  vzTanh)
-FUNC_CC(FUNC_ARCSINH_CC, "arcsinh_cc",  nc_asinh, vzAsinh)
-FUNC_CC(FUNC_ARCCOSH_CC, "arccosh_cc",  nc_acosh, vzAcosh)
-FUNC_CC(FUNC_ARCTANH_CC, "arctanh_cc",  nc_atanh, vzAtanh)
-FUNC_CC(FUNC_LOG_CC,     "log_cc",      nc_log,   vzLn)
-FUNC_CC(FUNC_LOG1P_CC,   "log1p_cc",    nc_log1p, vzLog1p)
-FUNC_CC(FUNC_LOG10_CC,   "log10_cc",    nc_log10, vzLog10)
-FUNC_CC(FUNC_EXP_CC,     "exp_cc",      nc_exp,   vzExp)
-FUNC_CC(FUNC_EXPM1_CC,   "expm1_cc",    nc_expm1, vzExpm1)
-FUNC_CC(FUNC_ABS_CC,     "absolute_cc", nc_abs,   vzAbs_)
-FUNC_CC(FUNC_CONJ_CC,    "conjugate_cc",nc_conj,  vzConj)
-FUNC_CC(FUNC_CC_LAST,    NULL,          NULL,     NULL)
+FUNC_CC(FUNC_SQRT_CC,    "sqrt_cc",     nc_sqrt,   vzSqrt)
+FUNC_CC(FUNC_SIN_CC,     "sin_cc",      nc_sin,    vzSin)
+FUNC_CC(FUNC_COS_CC,     "cos_cc",      nc_cos,    vzCos)
+FUNC_CC(FUNC_TAN_CC,     "tan_cc",      nc_tan,    vzTan)
+FUNC_CC(FUNC_ARCSIN_CC,  "arcsin_cc",   nc_asin,   vzAsin)
+FUNC_CC(FUNC_ARCCOS_CC,  "arccos_cc",   nc_acos,   vzAcos)
+FUNC_CC(FUNC_ARCTAN_CC,  "arctan_cc",   nc_atan,   vzAtan)
+FUNC_CC(FUNC_SINH_CC,    "sinh_cc",     nc_sinh,   vzSinh)
+FUNC_CC(FUNC_COSH_CC,    "cosh_cc",     nc_cosh,   vzCosh)
+FUNC_CC(FUNC_TANH_CC,    "tanh_cc",     nc_tanh,   vzTanh)
+FUNC_CC(FUNC_ARCSINH_CC, "arcsinh_cc",  nc_asinh,  vzAsinh)
+FUNC_CC(FUNC_ARCCOSH_CC, "arccosh_cc",  nc_acosh,  vzAcosh)
+FUNC_CC(FUNC_ARCTANH_CC, "arctanh_cc",  nc_atanh,  vzAtanh)
+FUNC_CC(FUNC_LOG_CC,     "log_cc",      nc_log,    vzLn)
+FUNC_CC(FUNC_LOG1P_CC,   "log1p_cc",    nc_log1p,  vzLog1p)
+FUNC_CC(FUNC_LOG10_CC,   "log10_cc",    nc_log10,  vzLog10)
+FUNC_CC(FUNC_EXP_CC,     "exp_cc",      nc_exp,    vzExp)
+FUNC_CC(FUNC_EXPM1_CC,   "expm1_cc",    nc_expm1,  vzExpm1)
+FUNC_CC(FUNC_ABS_CC,     "absolute_cc", nc_abs,    vzAbs_)
+FUNC_CC(FUNC_CONJ_CC,    "conjugate_cc",nc_conj,   vzConj)
+FUNC_CC(FUNC_CC_LAST,    NULL,          NULL,      NULL)
 #ifdef ELIDE_FUNC_CC
 #undef ELIDE_FUNC_CC
 #undef FUNC_CC
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/interpreter.cpp 
new/numexpr-2.8.4/numexpr/interpreter.cpp
--- old/numexpr-2.8.3/numexpr/interpreter.cpp   2022-06-25 22:25:22.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr/interpreter.cpp   2022-10-26 04:43:06.000000000 
+0200
@@ -261,7 +261,7 @@
     MKL_INT j;
     vzExp(n, x1, dest);
     for (j=0; j<n; j++) {
-    dest[j].real -= 1.0;
+        dest[j].real -= 1.0;
     };
 };
 
@@ -269,8 +269,8 @@
 {
     MKL_INT j;
     for (j=0; j<n; j++) {
-    dest[j].real = x1[j].real + 1;
-    dest[j].imag = x1[j].imag;
+        dest[j].real = x1[j].real + 1;
+        dest[j].imag = x1[j].imag;
     };
     vzLn(n, dest, dest);
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/necompiler.py 
new/numexpr-2.8.4/numexpr/necompiler.py
--- old/numexpr-2.8.3/numexpr/necompiler.py     2022-06-25 22:25:22.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr/necompiler.py     2022-10-26 04:43:06.000000000 
+0200
@@ -342,7 +342,8 @@
         a = 1 + 3j; b = 5.0
         ne.evaluate('a*2 + 15j - b')
     """
-    constants_order = sorted(ast.allOf('constant'))
+    constant_registers = set([node.reg for node in ast.allOf("constant")]) 
+    constants_order = sorted([r.node for r in constant_registers])
     constants = [convertConstantToKind(a.value, a.astKind)
                  for a in constants_order]
     return constants_order, constants
@@ -635,11 +636,15 @@
     r_constants = 1 + len(nex.signature)
     r_temps = r_constants + len(nex.constants)
 
+    def parseOp(op):
+        name, sig = [*op.rsplit(b'_', 1), ''][:2]
+        return name, sig 
+
     def getArg(pc, offset):
-        arg = nex.program[pc + offset]
-        op = rev_opcodes.get(nex.program[pc])
+        arg = nex.program[pc + (offset if offset < 4 else offset+1)]
+        _, sig = parseOp(rev_opcodes.get(nex.program[pc]))
         try:
-            code = op.split(b'_')[1][offset - 1]
+            code = sig[offset - 1]
         except IndexError:
             return None
 
@@ -662,10 +667,13 @@
     source = []
     for pc in range(0, len(nex.program), 4):
         op = rev_opcodes.get(nex.program[pc])
-        dest = getArg(pc, 1)
-        arg1 = getArg(pc, 2)
-        arg2 = getArg(pc, 3)
-        source.append((op, dest, arg1, arg2))
+        _, sig = parseOp(op)
+        parsed = [op]
+        for i in range(len(sig)):
+            parsed.append(getArg(pc, 1 + i))
+        while len(parsed) < 4:
+            parsed.append(None)
+        source.append(parsed)
     return source
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/tests/test_numexpr.py 
new/numexpr-2.8.4/numexpr/tests/test_numexpr.py
--- old/numexpr-2.8.3/numexpr/tests/test_numexpr.py     2022-06-25 
22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/numexpr/tests/test_numexpr.py     2022-10-26 
04:43:06.000000000 +0200
@@ -25,12 +25,14 @@
     sin, cos, tan, arcsin, arccos, arctan, arctan2,
     sinh, cosh, tanh, arcsinh, arccosh, arctanh,
     log, log1p, log10, exp, expm1, conj)
+import numpy
 from numpy.testing import (assert_equal, assert_array_equal,
                            assert_array_almost_equal, assert_allclose)
 from numpy import shape, allclose, array_equal, ravel, isnan, isinf
 
 import numexpr
 from numexpr import E, NumExpr, evaluate, re_evaluate, disassemble, use_vml
+from numexpr.expressions import ConstantNode
 
 import unittest
 
@@ -39,10 +41,6 @@
 double = np.double
 long = int
 
-# Recommended minimum versions
-from packaging.version import Version
-minimum_numpy_version = Version('1.7.0')
-present_numpy_version = Version(np.__version__)
 
 class test_numexpr(TestCase):
     """Testing with 1 thread"""
@@ -481,6 +479,31 @@
         else:
             self.fail()
 
+    def test_disassemble(self):
+        assert_equal(disassemble(NumExpr(
+            "where(m, a, -1)", [('m', bool), ('a', float)])),
+            [[b'where_fbff', b'r0', b'r1[m]', b'r2[a]', b'c3[-1.0]'], 
+             [b'noop', None, None, None]])
+
+    def test_constant_deduplication(self):
+        assert_equal(NumExpr("(a + 1)*(a - 1)", [('a', np.int32)]).constants, 
(1,))
+
+    def test_nan_constant(self):
+        assert_equal(str(ConstantNode(float("nan")).value), 'nan')
+
+        # check de-duplication works for nan
+        _nan = ConstantNode(float("nan"))
+        expr = (E.a + _nan)*(E.b + _nan)
+        assert_equal(NumExpr(expr, [('a', double), ('b', double)]).constants, 
(float("nan"),))
+
+
+    def test_f32_constant(self):
+        assert_equal(ConstantNode(numpy.float32(1)).astKind, "float")
+        assert_equal(ConstantNode(numpy.float32("nan")).astKind, "float")
+        assert_equal(ConstantNode(numpy.float32(3)).value.dtype, 
numpy.dtype("float32"))
+        assert_array_equal(NumExpr(ConstantNode(numpy.float32(1))).run(), 
+                           numpy.array(1, dtype="float32"))
+
     def test_unaligned_singleton(self):
         # Test for issue #397 whether singletons outputs assigned to consts 
must be 
         # aligned or not.
@@ -801,14 +824,9 @@
         str_list = [
             b'\0\0\0', b'\0\0foo\0', b'\0\0foo\0b', b'\0\0foo\0b\0',
             b'foo\0', b'foo\0b', b'foo\0b\0', b'foo\0bar\0baz\0\0']
-        min_tobytes_version = Version('1.9.0')
         for s in str_list:
             r = evaluate('s')
-            if present_numpy_version >= min_tobytes_version:
-                self.assertEqual(s, r.tobytes())  # check *all* stored data
-            else:
-                # ndarray.tostring() is deprecated as of NumPy 1.19
-                self.assertEqual(s, r.tostring())  # check *all* stored data
+            self.assertEqual(s, r.tobytes())  # check *all* stored data
 
     def test_compare_copy(self):
         sarr = self.str_array1
@@ -1075,10 +1093,6 @@
     from numexpr.cpuinfo import cpu
     import platform
 
-    np_version = Version(np.__version__)
-
-    if np_version < minimum_numpy_version:
-        print('*Warning*: NumPy version is lower than recommended: %s < %s' % 
(np_version, minimum_numpy_version))
     print('-=' * 38)
     print('Numexpr version:   %s' % numexpr.__version__)
     print('NumPy version:     %s' % np.__version__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr/version.py 
new/numexpr-2.8.4/numexpr/version.py
--- old/numexpr-2.8.3/numexpr/version.py        2022-06-25 22:35:20.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr/version.py        2022-10-26 04:59:26.000000000 
+0200
@@ -1,4 +1,4 @@
 # THIS FILE IS GENERATED BY `SETUP.PY`
-version = '2.8.3'
+version = '2.8.4'
 numpy_build_version = '1.21.6'
 platform_machine = 'AMD64'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr.egg-info/PKG-INFO 
new/numexpr-2.8.4/numexpr.egg-info/PKG-INFO
--- old/numexpr-2.8.3/numexpr.egg-info/PKG-INFO 2022-06-25 22:35:20.000000000 
+0200
+++ new/numexpr-2.8.4/numexpr.egg-info/PKG-INFO 2022-10-26 04:59:26.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: numexpr
-Version: 2.8.3
+Version: 2.8.4
 Summary: Fast numerical expression evaluator for NumPy
 Home-page: https://github.com/pydata/numexpr
 Author: David M. Cooke, Francesc Alted, and others
@@ -16,6 +16,7 @@
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
 Classifier: Operating System :: Microsoft :: Windows
 Classifier: Operating System :: POSIX
 Classifier: Operating System :: MacOS
@@ -86,9 +87,9 @@
 The result is that NumExpr can get the most of your machine computing
 capabilities for array-wise computations. Common speed-ups with regard
 to NumPy are usually between 0.95x (for very simple expressions like
-:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a >
-2.5*b'`), although much higher speed-ups can be achieved for some functions 
-and complex math operations (up to 15x in some cases).
+:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 
2.5*b'`), 
+although much higher speed-ups can be achieved for some functions  and complex 
+math operations (up to 15x in some cases).
 
 NumExpr performs best on matrices that are too large to fit in L1 CPU cache. 
 In order to get a better idea on the different speed-ups that can be achieved 
@@ -114,17 +115,17 @@
 From Source
 ^^^^^^^^^^^
 
-On most `Nix systems your compilers will already be present. However if you 
+On most \*nix systems your compilers will already be present. However if you 
 are using a virtual environment with a substantially newer version of Python 
than
 your system Python you may be prompted to install a new version of `gcc` or 
`clang`.
 
 For Windows, you will need to install the Microsoft Visual C++ Build Tools 
-(which are free) first.The version depends on which version of Python you have 
+(which are free) first. The version depends on which version of Python you 
have 
 installed:
 
 https://wiki.python.org/moin/WindowsCompilers
 
-For Python 3.6+ simply installating the latest version of MSVC build tools 
should 
+For Python 3.6+ simply installing the latest version of MSVC build tools 
should 
 be sufficient. Note that wheels found via pip do not include MKL support. 
Wheels 
 available via `conda` will have MKL, if the MKL backend is used for NumPy.
 
@@ -145,7 +146,7 @@
 
 NumExpr includes support for Intel's MKL library. This may provide better 
 performance on Intel architectures, mainly when evaluating transcendental 
-functions (trigonometrical, exponential...). 
+functions (trigonometrical, exponential, ...). 
 
 If you have Intel's MKL, copy the `site.cfg.example` that comes with the 
 distribution to `site.cfg` and edit the latter file to provide correct paths 
to 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/numexpr.egg-info/requires.txt 
new/numexpr-2.8.4/numexpr.egg-info/requires.txt
--- old/numexpr-2.8.3/numexpr.egg-info/requires.txt     2022-06-25 
22:35:21.000000000 +0200
+++ new/numexpr-2.8.4/numexpr.egg-info/requires.txt     2022-10-26 
04:59:26.000000000 +0200
@@ -1,2 +1 @@
 numpy>=1.13.3
-packaging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/requirements.txt 
new/numexpr-2.8.4/requirements.txt
--- old/numexpr-2.8.3/requirements.txt  2022-06-25 22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/requirements.txt  2022-10-26 04:43:06.000000000 +0200
@@ -1,2 +1 @@
 numpy >= 1.13.3
-packaging
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/setup.cfg new/numexpr-2.8.4/setup.cfg
--- old/numexpr-2.8.3/setup.cfg 2022-06-25 22:35:21.621027200 +0200
+++ new/numexpr-2.8.4/setup.cfg 2022-10-26 04:59:27.071168200 +0200
@@ -1,6 +1,6 @@
 [metadata]
 name = numexpr
-version = 2.8.3
+version = 2.8.4
 description = Fast numerical expression evaluator for NumPy
 author = David M. Cooke, Francesc Alted, and others
 maintainer = Robert A. McLeod
@@ -19,6 +19,7 @@
        Programming Language :: Python :: 3.8
        Programming Language :: Python :: 3.9
        Programming Language :: Python :: 3.10
+       Programming Language :: Python :: 3.11
        Operating System :: Microsoft :: Windows
        Operating System :: POSIX
        Operating System :: MacOS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/numexpr-2.8.3/setup.py new/numexpr-2.8.4/setup.py
--- old/numexpr-2.8.3/setup.py  2022-06-25 22:25:22.000000000 +0200
+++ new/numexpr-2.8.4/setup.py  2022-10-26 04:43:06.000000000 +0200
@@ -74,6 +74,7 @@
         libs.extend(
             site['mkl']['libraries'].split(os.pathsep))
         def_macros.append(('USE_VML', None))
+        print(f'FOUND MKL IMPORT')
         
 
 def setup_package():

Reply via email to