Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-numba for openSUSE:Factory 
checked in at 2021-11-20 09:37:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-numba (Old)
 and      /work/SRC/openSUSE:Factory/.python-numba.new.1895 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-numba"

Sat Nov 20 09:37:53 2021 rev:29 rq:932339 version:0.54.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-numba/python-numba.changes        
2021-03-24 16:13:58.736003641 +0100
+++ /work/SRC/openSUSE:Factory/.python-numba.new.1895/python-numba.changes      
2021-11-20 09:37:54.774243818 +0100
@@ -1,0 +2,106 @@
+Thu Nov 18 18:42:21 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 0.54.1
+  * This is a bugfix release for 0.54.0. It fixes a regression in
+    structured array type handling, a potential leak on
+    initialization failure in the CUDA target, a regression caused
+    by Numba???s vendored cloudpickle module resetting dynamic
+    classes and a few minor testing/infrastructure related
+    problems.
+- Release summary for 0.54.0
+  * This release includes a significant number of new features,
+    important refactoring, critical bug fixes and a number of
+    dependency upgrades.
+  * Python language support enhancements:
+    - Basic support for f-strings.
+    - dict comprehensions are now supported.
+    - The sum built-in function is implemented.
+  * NumPy features/enhancements, The following functions are now
+    supported:
+    - np.clip
+    - np.iscomplex
+    - np.iscomplexobj
+    - np.isneginf
+    - np.isposinf
+    - np.isreal
+    - np.isrealobj
+    - np.isscalar
+    - np.random.dirichlet
+    - np.rot90
+    - np.swapaxes
+  * Also np.argmax has gained support for the axis keyword argument
+    and it???s now possible to use 0d NumPy arrays as scalars in
+    __setitem__ calls.
+
+  Internal changes:
+  * Debugging support through DWARF has been fixed and enhanced.
+  * Numba now optimises the way in which locals are emitted to help
+    reduce time spend in LLVM???s SROA passes.
+
+  CUDA target changes:
+  * Support for emitting lineinfo to be consumed by profiling tools
+    such as Nsight Compute
+  * Improved fastmath code generation for various trig, division,
+    and other functions
+  * Faster compilation using lazy addition of libdevice to compiled
+    units
+  * Support for IPC on Windows
+  * Support for passing tuples to CUDA ufuncs
+  * Performance warnings:
+    - When making implicit copies by calling a kernel on arrays in
+      host memory
+    - When occupancy is poor due to kernel or ufunc/gufunc
+      configuration
+  * Support for implementing warp-aggregated intrinsics:
+    - Using support for more CUDA functions: activemask(),
+      lanemask_lt()
+    - The ffs() function now works correctly!
+  * Support for @overload in the CUDA target
+
+  Intel kindly sponsored research and development that lead to a
+  number of new features and internal support changes:
+  * Dispatchers can now be retargetted to a new target via a user
+    defined context manager.
+  * Support for custom NumPy array subclasses has been added
+    (including an overloadable memory allocator).
+  * An inheritance based model for targets that permits targets to
+    share @overload implementations.
+  * Per function compiler flags with inheritance behaviours.
+  * The extension API now has support for overloading class methods
+    via the @overload_classmethod decorator.
+  
+  Deprecations:
+  * The ROCm target (for AMD ROC GPUs) has been moved to an
+    ???unmaintained??? status and a seperate repository stub has been
+    created for it at: https://github.com/numba/numba-rocm
+ 
+  CUDA target deprecations and breaking changes:
+  * Relaxed strides checking is now the default when computing the
+    contiguity of device arrays.
+  * The inspect_ptx() method is deprecated. For use cases that
+    obtain PTX for further compilation outside of Numba, use
+    compile_ptx() instead.
+  * Eager compilation of device functions (the case when
+    device=True and a signature is provided) is deprecated.
+ 
+  Version support/dependency changes:
+  * LLVM 11 is now supported on all platforms via llvmlite.
+  * The minimum supported Python version is raised to 3.7.
+  * NumPy version 1.20 is supported.
+  * The minimum supported NumPy version is raised to 1.17 for
+    runtime (compilation however remains compatible with NumPy
+    1.11).
+  * Vendor cloudpickle v1.6.0 ??? now used for all pickle operations.
+  * TBB >= 2021 is now supported and all prior versions are
+    unsupported (not easily possible to maintain the ABI breaking
+    changes).
+- Full release notes;
+  https://numba.readthedocs.io/en/0.54.1/release-notes.html
+- Drop patches merged upstream:
+  * packaging-ignore-setuptools-deprecation.patch
+  * numba-pr6851-llvm-timings.patch
+- Refresh skip-failing-tests.patch, fix-max-name-size.patch
+- Add numba-pr7483-numpy1_21.patch gh#numba/numba#7176,
+  gh#numba/numba#7483
+
+-------------------------------------------------------------------

Old:
----
  numba-0.53.0.tar.gz
  numba-pr6851-llvm-timings.patch
  packaging-ignore-setuptools-deprecation.patch

New:
----
  numba-0.54.1.tar.gz
  numba-pr7483-numpy1_21.patch

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

Other differences:
------------------
++++++ python-numba.spec ++++++
--- /var/tmp/diff_new_pack.zlY5Hh/_old  2021-11-20 09:37:55.526241267 +0100
+++ /var/tmp/diff_new_pack.zlY5Hh/_new  2021-11-20 09:37:55.526241267 +0100
@@ -1,5 +1,5 @@
 #
-# spec file for package python-numba-test
+# spec file
 #
 # Copyright (c) 2021 SUSE LLC
 #
@@ -18,7 +18,6 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
-# NEP 29: python36-numpy and -scipy no longer in TW
 %define skip_python36 1
 %global flavor @BUILD_FLAVOR@%{nil}
 %if "%{flavor}" == "test"
@@ -29,7 +28,7 @@
 %bcond_with test
 %endif
 Name:           python-numba%{psuffix}
-Version:        0.53.0
+Version:        0.54.1
 Release:        0
 Summary:        NumPy-aware optimizing compiler for Python using LLVM
 License:        BSD-2-Clause
@@ -37,22 +36,20 @@
 Source:         
https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM fix-max-name-size.patch -- fix for gh#numba/numba#3876 -- 
from gh#numba/numba#4373
 Patch0:         fix-max-name-size.patch
-# PATCH-FIX-UPSTREAM packaging-ignore-setuptools-deprecation.patch -- 
gh#numba/numba#6837
-Patch1:         
https://github.com/numba/numba/pull/6837.patch#/packaging-ignore-setuptools-deprecation.patch
-# PATCH-FIX-USPTREAM ignore empty system time column on llvm timings --  
gh#numba/numba#6851
-Patch2:         numba-pr6851-llvm-timings.patch
+# PATCH-FIX-UPSTREAM support numpy 1.21 -- gh#numba/numba#7176, 
gh#numba/numba#7483
+Patch1:         numba-pr7483-numpy1_21.patch
 # PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics
 Patch3:         skip-failing-tests.patch
-BuildRequires:  %{python_module devel}
-BuildRequires:  %{python_module numpy-devel >= 1.15}
+BuildRequires:  %{python_module devel >= 3.7}
+BuildRequires:  %{python_module numpy-devel >= 1.18}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  python-rpm-macros
-BuildRequires:  tbb-devel
-Requires:       python-llvmlite < 0.37
-Requires:       python-llvmlite >= 0.36
-Requires:       python-numpy >= 1.15
+BuildRequires:  tbb-devel >= 2021
+Requires:       python-llvmlite < 0.38
+Requires:       python-llvmlite >= 0.37
+Requires:       python-numpy >= 1.18
 Requires:       python-scipy >= 0.16
 Requires(post): update-alternatives
 Requires(preun):update-alternatives
@@ -106,24 +103,20 @@
 %setup -q -n numba-%{version}
 %autopatch -p1
 
-# Incompatilbe numpy versions (?)
-# Check these with every version update! (Last check 0.53)
-# https://github.com/numba/numba/issues/5251
-# https://numba.discourse.group/t/helping-test-numba-0-53-0-rc/519/34
-rm numba/tests/test_np_functions.py
-rm numba/tests/test_array_reductions.py
 # timeouts randomly in OBS
 rm numba/tests/test_typedlist.py
 # if we reduced the amount of tests too much:
-#sed -i -e '/check_testsuite_size/ s/5000/3000/' numba/tests/test_runtests.py
+# sed -i -e '/check_testsuite_size/ s/5000/3000/' numba/tests/test_runtests.py
 # our setup imports distutils. Not sure why, but should not be a problem.
 sed -i -e "/def test_laziness/,/def/ {/'distutils',/ d}" 
numba/tests/test_import.py
 
 sed -i -e '1{/env python/ d}' numba/misc/appdirs.py
 
 %build
+%if !%{with test}
 export CFLAGS="%{optflags} -fPIC"
 %python_build
+%endif
 
 %install
 %if !%{with test}
@@ -154,7 +147,7 @@
 %post
 %{python_install_alternative numba pycc}
 
-%preun
+%postun
 %python_uninstall_alternative numba
 
 %files %{python_files} -f devel-files-exclude-%{python_bin_suffix}.files

++++++ fix-max-name-size.patch ++++++
--- /var/tmp/diff_new_pack.zlY5Hh/_old  2021-11-20 09:37:55.598241023 +0100
+++ /var/tmp/diff_new_pack.zlY5Hh/_new  2021-11-20 09:37:55.598241023 +0100
@@ -8,11 +8,11 @@
  numba/__init__.py | 5 +++++
  1 file changed, 5 insertions(+)
 
-diff --git a/numba/__init__.py b/numba/__init__.py
-index c62ad06289..114e9a597e 100644
---- a/numba/__init__.py
-+++ b/numba/__init__.py
-@@ -102,6 +102,11 @@ def _ensure_llvm():
+Index: numba-0.54.1/numba/__init__.py
+===================================================================
+--- numba-0.54.1.orig/numba/__init__.py
++++ numba-0.54.1/numba/__init__.py
+@@ -119,6 +119,11 @@ def _ensure_llvm():
                 "Please update llvmlite." %
                 (_min_llvm_version + llvm_version_info))
          raise ImportError(msg)

++++++ numba-0.53.0.tar.gz -> numba-0.54.1.tar.gz ++++++
++++ 48494 lines of diff (skipped)

++++++ numba-pr7483-numpy1_21.patch ++++++
>From 3a2c5042fa85ac9b8fe398d605d6d373d27f42bb Mon Sep 17 00:00:00 2001
From: Stuart Archibald <stuartarchib...@users.noreply.github.com>
Date: Thu, 14 Oct 2021 09:35:24 +0100
Subject: [PATCH 1/7] Update build matrix for NumPy 1.21 as per NEP-029.

As title.
---
 azure-pipelines.yml                  | 68 ++++++++++++++--------------
 buildscripts/azure/azure-windows.yml |  8 ++--
 2 files changed, 38 insertions(+), 38 deletions(-)

Index: numba-0.54.1/setup.py
===================================================================
--- numba-0.54.1.orig/setup.py
+++ numba-0.54.1/setup.py
@@ -22,8 +22,7 @@ except ImportError:
 min_python_version = "3.7"
 max_python_version = "3.10"  # exclusive
 min_numpy_build_version = "1.11"
-min_numpy_run_version = "1.17"
-max_numpy_run_version = "1.21"
+min_numpy_run_version = "1.18"
 min_llvmlite_version = "0.37.0rc1"
 max_llvmlite_version = "0.38"
 
@@ -360,7 +359,7 @@ packages = find_packages(include=["numba
 build_requires = ['numpy >={}'.format(min_numpy_build_version)]
 install_requires = [
     'llvmlite >={},<{}'.format(min_llvmlite_version, max_llvmlite_version),
-    'numpy >={},<{}'.format(min_numpy_run_version, max_numpy_run_version),
+    'numpy >={}'.format(min_numpy_run_version),
     'setuptools',
 ]
 
Index: numba-0.54.1/numba/__init__.py
===================================================================
--- numba-0.54.1.orig/numba/__init__.py
+++ numba-0.54.1/numba/__init__.py
@@ -137,10 +137,8 @@ def _ensure_critical_deps():
     if PYVERSION < (3, 7):
         raise ImportError("Numba needs Python 3.7 or greater")
 
-    if numpy_version < (1, 17):
-        raise ImportError("Numba needs NumPy 1.17 or greater")
-    elif numpy_version > (1, 20):
-        raise ImportError("Numba needs NumPy 1.20 or less")
+    if numpy_version < (1, 18):
+        raise ImportError("Numba needs NumPy 1.18 or greater")
 
     try:
         import scipy
Index: numba-0.54.1/README.rst
===================================================================
--- numba-0.54.1.orig/README.rst
+++ numba-0.54.1/README.rst
@@ -50,7 +50,7 @@ Dependencies
 
 * Python versions: 3.7-3.9
 * llvmlite 0.37.*
-* NumPy >=1.17,<1.21 (can build with 1.11 for ABI compatibility).
+* NumPy >=1.18 (can build with 1.11 for ABI compatibility).
 
 Optionally:
 
Index: numba-0.54.1/docs/source/user/5minguide.rst
===================================================================
--- numba-0.54.1.orig/docs/source/user/5minguide.rst
+++ numba-0.54.1/docs/source/user/5minguide.rst
@@ -18,7 +18,7 @@ Out of the box Numba works with the foll
   support on M1/Arm64.
 * GPUs: Nvidia CUDA.
 * CPython
-* NumPy 1.17 - latest
+* NumPy 1.18 - latest
 
 How do I get it?
 ----------------
Index: numba-0.54.1/numba/np/ufunc/_internal.c
===================================================================
--- numba-0.54.1.orig/numba/np/ufunc/_internal.c
+++ numba-0.54.1/numba/np/ufunc/_internal.c
@@ -275,6 +275,7 @@ static PyMemberDef dufunc_members[] = {
  */
 
 static struct _ufunc_dispatch {
+    /* Note that the following may also hold `_PyCFunctionFastWithKeywords` */
     PyCFunctionWithKeywords ufunc_reduce;
     PyCFunctionWithKeywords ufunc_accumulate;
     PyCFunctionWithKeywords ufunc_reduceat;
@@ -285,7 +286,7 @@ static struct _ufunc_dispatch {
 } ufunc_dispatch;
 
 static int
-init_ufunc_dispatch(void)
+init_ufunc_dispatch(int *numpy_uses_fastcall)
 {
     int result = 0;
     PyMethodDef * crnt = PyUFunc_Type.tp_methods;
@@ -328,6 +329,16 @@ init_ufunc_dispatch(void)
             result = -1; /* Unknown method */
         }
         if (result < 0) break;
+
+        /* Check whether NumPy uses fastcall (ufunc.at never uses it) */
+        if (strncmp(crnt_name, "at", 3) != 0) {
+            if (*numpy_uses_fastcall == -1) {
+                *numpy_uses_fastcall = crnt->ml_flags & METH_FASTCALL;
+            }
+            else if (*numpy_uses_fastcall != (crnt->ml_flags & METH_FASTCALL)) 
{
+                return -1;
+            }
+        }
     }
     if (result == 0) {
         /* Sanity check. */
@@ -343,6 +354,7 @@ init_ufunc_dispatch(void)
     return result;
 }
 
+
 static PyObject *
 dufunc_reduce(PyDUFuncObject * self, PyObject * args, PyObject *kws)
 {
@@ -367,6 +379,47 @@ dufunc_outer(PyDUFuncObject * self, PyOb
     return ufunc_dispatch.ufunc_outer((PyObject*)self->ufunc, args, kws);
 }
 
+
+/*
+ * The following are the vectorcall versions of the above, since NumPy
+ * uses the FASTCALL/Vectorcall protocol starting with version 1.21.
+ * The only NumPy versions supporting vectorcall use Python 3.7 or higher.
+ */
+static PyObject *
+dufunc_reduce_fast(PyDUFuncObject * self,
+        PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
+{
+    return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_reduce)(
+            (PyObject*)self->ufunc, args, len_args, kwnames);
+}
+
+static PyObject *
+dufunc_reduceat_fast(PyDUFuncObject * self,
+        PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
+{
+    return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_reduceat)(
+            (PyObject*)self->ufunc, args, len_args, kwnames);
+}
+
+
+static PyObject *
+dufunc_accumulate_fast(PyDUFuncObject * self,
+        PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
+{
+    return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_accumulate)(
+            (PyObject*)self->ufunc, args, len_args, kwnames);
+}
+
+
+static PyObject *
+dufunc_outer_fast(PyDUFuncObject * self,
+        PyObject *const *args, Py_ssize_t len_args, PyObject *kwnames)
+{
+    return ((_PyCFunctionFastWithKeywords)ufunc_dispatch.ufunc_outer)(
+            (PyObject*)self->ufunc, args, len_args, kwnames);
+}
+
+
 #if NPY_API_VERSION >= 0x00000008
 static PyObject *
 dufunc_at(PyDUFuncObject * self, PyObject * args)
@@ -567,6 +620,41 @@ static struct PyMethodDef dufunc_methods
     {NULL, NULL, 0, NULL}           /* sentinel */
 };
 
+
+/*
+ * If Python is new enough, NumPy may use fastcall.  In that case we have to
+ * also use fastcall for simplicity and speed.
+ */
+static struct PyMethodDef dufunc_methods_fast[] = {
+    {"reduce",
+        (PyCFunction)dufunc_reduce_fast,
+        METH_FASTCALL | METH_KEYWORDS, NULL },
+    {"accumulate",
+        (PyCFunction)dufunc_accumulate_fast,
+        METH_FASTCALL | METH_KEYWORDS, NULL },
+    {"reduceat",
+        (PyCFunction)dufunc_reduceat_fast,
+        METH_FASTCALL | METH_KEYWORDS, NULL },
+    {"outer",
+        (PyCFunction)dufunc_outer_fast,
+        METH_FASTCALL | METH_KEYWORDS, NULL},
+#if NPY_API_VERSION >= 0x00000008
+    {"at",
+        (PyCFunction)dufunc_at,
+        METH_VARARGS, NULL},
+#endif
+    {"_compile_for_args",
+        (PyCFunction)dufunc__compile_for_args,
+        METH_VARARGS | METH_KEYWORDS,
+        "Abstract method: subclasses should overload _compile_for_args() to 
compile the ufunc at the given arguments' types."},
+    {"_add_loop",
+        (PyCFunction)dufunc__add_loop,
+        METH_VARARGS,
+        NULL},
+    {NULL, NULL, 0, NULL}           /* sentinel */
+};
+
+
 static PyObject *
 dufunc_getfrozen(PyDUFuncObject * self, void * closure)
 {
@@ -680,8 +768,15 @@ MOD_INIT(_internal)
         return MOD_ERROR_VAL;
 
     PyDUFunc_Type.tp_new = PyType_GenericNew;
-    if (init_ufunc_dispatch() <= 0)
+
+    int numpy_uses_fastcall = -1;
+    if (init_ufunc_dispatch(&numpy_uses_fastcall) <= 0)
         return MOD_ERROR_VAL;
+
+    if (numpy_uses_fastcall) {
+        PyDUFunc_Type.tp_methods = dufunc_methods_fast;
+    }
+
     if (PyType_Ready(&PyDUFunc_Type) < 0)
         return MOD_ERROR_VAL;
     Py_INCREF(&PyDUFunc_Type);
++++++ skip-failing-tests.patch ++++++
--- /var/tmp/diff_new_pack.zlY5Hh/_old  2021-11-20 09:37:56.066239436 +0100
+++ /var/tmp/diff_new_pack.zlY5Hh/_new  2021-11-20 09:37:56.066239436 +0100
@@ -1,39 +1,38 @@
-Index: numba-0.53.0/numba/tests/test_parfors.py
+Index: numba-0.54.0/numba/tests/test_parfors.py
 ===================================================================
---- numba-0.53.0.orig/numba/tests/test_parfors.py
-+++ numba-0.53.0/numba/tests/test_parfors.py
-@@ -1649,7 +1649,7 @@ class TestParfors(TestParforsBase):
-         msg = ("The reshape API may only include one negative argument.")
-         self.assertIn(msg, str(raised.exception))
+--- numba-0.54.0.orig/numba/tests/test_parfors.py
++++ numba-0.54.0/numba/tests/test_parfors.py
+@@ -1146,6 +1146,7 @@ class TestParforNumPy(TestParforsBase):
+         self.check_variants(test_impl2, data_gen)
+         self.count_parfors_variants(test_impl2, data_gen)
  
--    @skip_parfors_unsupported
 +    @unittest.skip("Fails on type check in OBS")
      def test_ndarray_fill(self):
          def test_impl(x):
              x.fill(7.0)
-@@ -2842,7 +2842,7 @@ class TestParforsVectorizer(TestPrangeBa
+@@ -3890,7 +3891,7 @@ class TestParforsVectorizer(TestPrangeBa
      # to check vsqrtpd operates on zmm
      match_vsqrtpd_on_zmm = re.compile('\n\s+vsqrtpd\s+.*zmm.*\n')
  
 -    @linux_only
-+    @unittest.skip("Our x86_64 asm is most probably different from the Travis 
one.")
++    @unittest.skip("Our x86_64 asm is most probably different from the 
upstream one.")
      def test_vectorizer_fastmath_asm(self):
          """ This checks that if fastmath is set and the underlying hardware
          is suitable, and the function supplied is amenable to fastmath based
-@@ -2885,7 +2885,7 @@ class TestParforsVectorizer(TestPrangeBa
+@@ -3933,7 +3934,7 @@ class TestParforsVectorizer(TestPrangeBa
              # check no zmm addressing is present
              self.assertTrue('zmm' not in v)
  
 -    @linux_only
-+    @unittest.skip("Our x86_64 asm is most probably different from the Travis 
one.")
++    @unittest.skip("Our x86_64 asm is most probably different from the 
upstream one.")
      def test_unsigned_refusal_to_vectorize(self):
          """ This checks that if fastmath is set and the underlying hardware
          is suitable, and the function supplied is amenable to fastmath based
-Index: numba-0.53.0/numba/tests/test_parfors_passes.py
+Index: numba-0.54.0/numba/tests/test_parfors_passes.py
 ===================================================================
---- numba-0.53.0.orig/numba/tests/test_parfors_passes.py
-+++ numba-0.53.0/numba/tests/test_parfors_passes.py
-@@ -512,6 +512,7 @@ class TestConvertLoopPass(BaseTest):
+--- numba-0.54.0.orig/numba/tests/test_parfors_passes.py
++++ numba-0.54.0/numba/tests/test_parfors_passes.py
+@@ -516,6 +516,7 @@ class TestConvertLoopPass(BaseTest):
              str(raises.exception),
          )
  

Reply via email to