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 2022-01-15 20:05:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-numba (Old) and /work/SRC/openSUSE:Factory/.python-numba.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-numba" Sat Jan 15 20:05:10 2022 rev:31 rq:946610 version:0.55.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-numba/python-numba.changes 2022-01-10 23:54:34.600855528 +0100 +++ /work/SRC/openSUSE:Factory/.python-numba.new.1892/python-numba.changes 2022-01-15 20:05:15.173761495 +0100 @@ -1,0 +2,70 @@ +Fri Jan 14 16:55:37 UTC 2022 - Ben Greiner <[email protected]> + +- Update to 0.55.0 + * This release includes a significant number important dependency + upgrades along with a number of new features and bug fixes. + * NOTE: Due to NumPy CVE-2021-33430 this release has bypassed the + usual release process so as to promptly provide a Numba release + that supports NumPy 1.21. A single release candidate (RC1) was + made and a few issues were reported, these are summarised as + follows and will be fixed in a subsequent 0.55.1 release. + * Known issues with this release: + - Incorrect result copying array-typed field of structured + array (#7693) + - Two issues in DebugInfo generation (#7726, #7730) + - Compilation failure for hash of floating point values on 32 + bit Windows when using Python 3.10 (#7713). + * Support for Python 3.10 + * Support for NumPy 1.21 + * The minimum supported NumPy version is raised to 1.18 for + runtime (compilation however remains compatible with NumPy + 1.11). + * Experimental support for isinstance. + * The following functions are now supported: + - np.broadcast_to + - np.float_power + - np.cbrt + - np.logspace + - np.take_along_axis + - np.average + - np.argmin gains support for the axis kwarg. + - np.ndarray.astype gains support for types expressed as + literal strings. + * For users of the Numba extension API, Numba now has a new error + handling mode whereby it will treat all exceptions that do not + inherit from numba.errors.NumbaException as a ???hard error??? and + immediately unwind the stack. This makes it much easier to + debug when writing @overloads etc from the extension API as + there???s now no confusion between Python errors and Numba + errors. This feature can be enabled by setting the environment + variable: NUMBA_CAPTURED_ERRORS='new_style'. + * The threading layer selection priority can now be changed via + the environment variable NUMBA_THREADING_LAYER_PRIORITY. + * Support for NVIDIA???s CUDA Python bindings. + * Support for 16-bit floating point numbers and their basic + operations via intrinsics. + * Streams are provided in the Stream.async_done result, making it + easier to implement asynchronous work queues. + * Support for structured types in device arrays, character + sequences in NumPy arrays, and some array operations on nested + arrays. + * Much underlying refactoring to align the CUDA target more + closely with the CPU target, which lays the groudwork for + supporting the high level extension API in CUDA in future + releases. + * Intel also kindly sponsored research and development into + native debug (DWARF) support and handling per-function + compilation flags: + * Line number/location tracking is much improved. + * Numba???s internal representation of containers (e.g. tuples, + arrays) are now encoded as structures. + * Numba???s per-function compilation flags are encoded into the ABI + field of the mangled name of the function such that it???s + possible to compile and differentiate between versions of the + same function with different flags set. + * There are no new general deprecations. + * There are no new CUDA target deprecations. +- Drop numba-pr7483-numpy1_21.patch +- Add numba-pr7748-random32bitwidth.patch -- gh#numba/numba#7748 + +------------------------------------------------------------------- Old: ---- numba-0.54.1.tar.gz numba-pr7483-numpy1_21.patch New: ---- numba-0.55.0.tar.gz numba-pr7748-random32bitwidth.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-numba.spec ++++++ --- /var/tmp/diff_new_pack.KiVhFz/_old 2022-01-15 20:05:15.789761975 +0100 +++ /var/tmp/diff_new_pack.KiVhFz/_new 2022-01-15 20:05:15.793761978 +0100 @@ -16,9 +16,8 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -%define skip_python310 1 %define plainpython python %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" @@ -29,7 +28,7 @@ %bcond_with test %endif Name: python-numba%{psuffix} -Version: 0.54.1 +Version: 0.55.0 Release: 0 Summary: NumPy-aware optimizing compiler for Python using LLVM License: BSD-2-Clause @@ -37,26 +36,25 @@ 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 support numpy 1.21 -- gh#numba/numba#7176, gh#numba/numba#7483, gh#numpy/numpy#20376 -Patch1: numba-pr7483-numpy1_21.patch +# PATCH-FIX-UPSTREAM numba-pr7748-random32bitwidth.patch -- gh#numba/numba#7748 +Patch1: numba-pr7748-random32bitwidth.patch # PATCH-FIX-OPENSUSE skip tests failing due to OBS specifics Patch3: skip-failing-tests.patch -BuildRequires: %{python_module devel >= 3.7 with %python-devel < 3.10} +BuildRequires: %{python_module devel >= 3.7} BuildRequires: %{python_module numpy-devel >= 1.18 with %python-numpy-devel < 1.22} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: python-rpm-macros BuildRequires: tbb-devel >= 2021 -Requires: python-llvmlite < 0.38 -Requires: python-llvmlite >= 0.37 -Requires: python-scipy >= 0.16 +Requires: (python-llvmlite >= 0.38 with python-llvmlite < 0.39) Requires: (python-numpy >= 1.18 with python-numpy < 1.22) Requires(post): update-alternatives Requires(preun):update-alternatives Recommends: python-Jinja2 Recommends: python-Pygments Recommends: python-cffi +Recommends: python-scipy > 1.0 Recommends: python-tbb %if %{with test} BuildRequires: %{python_module Jinja2} @@ -69,7 +67,7 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module scipy >= 0.16} +BuildRequires: %{python_module scipy >= 1.0} BuildRequires: %{python_module tbb} %endif %python_subpackages @@ -102,17 +100,13 @@ This package contains files for developing applications using numba. %prep -%setup -q -n numba-%{version} -%autopatch -p1 +%autosetup -p1 -n numba-%{version} +sed -i -e '1{/env python/ d}' numba/misc/appdirs.py -# timeouts randomly in OBS +# random timeouts 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 -# 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} @@ -136,13 +130,14 @@ %check %if %{with test} -mv numba numba_temp -export NUMBA_PARALLEL_DIAGNOSTICS=1 -%{python_expand # test the installed package +# test the installed package, not the source without compiled modules +mkdir emtpytestdir +pushd emtpytestdir +%{python_expand # numbatests: check specific tests with `osc build -M test --define="numbatests <testnames>"` %{_bindir}/numba-%{$python_bin_suffix} -s -$python -m numba.runtests -v -b --exclude-tags='long_running' -m %{_smp_build_ncpus} -- numba.tests +$python -m numba.runtests -v -b --exclude-tags='long_running' -m %{_smp_build_ncpus} -- %{?!numbatests:numba.tests}%{?numbatests} } -mv numba_temp numba +popd %endif %if !%{with test} ++++++ numba-0.54.1.tar.gz -> numba-0.55.0.tar.gz ++++++ ++++ 22494 lines of diff (skipped) ++++++ numba-pr7748-random32bitwidth.patch ++++++ >From e6df66d52152156ba8bcda64b37f4995bda72d2f Mon Sep 17 00:00:00 2001 From: Graham Markall <[email protected]> Date: Fri, 14 Jan 2022 21:24:40 +0000 Subject: [PATCH] Fix #7713: Ensure _prng_random_hash return has correct bitwidth When the hash width is 32 bits, get_next_int32 needs to be used because that returns a 32-bit integer, as opposed to get_next_int, which returns a 64-bit integer regardless of the supplied bitwidth. This commit also alters the signature of _prng_random_hash to use _Py_hash_t as the return type - it will be equal to types.intp, but the intent should be clearer. --- numba/cpython/hashing.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/numba/cpython/hashing.py b/numba/cpython/hashing.py index 5a8673b04b..227fc4e1c5 100644 --- a/numba/cpython/hashing.py +++ b/numba/cpython/hashing.py @@ -18,7 +18,8 @@ from numba.core import errors from numba.core import types, utils from numba.core.unsafe.bytes import grab_byte, grab_uint64_t -from numba.cpython.randomimpl import get_state_ptr, get_next_int, const_int +from numba.cpython.randomimpl import (const_int, get_next_int, get_next_int32, + get_state_ptr) _py38_or_later = utils.PYVERSION >= (3, 8) _py310_or_later = utils.PYVERSION >= (3, 10) @@ -137,11 +138,23 @@ def _prng_random_hash(tyctx): def impl(cgctx, builder, signature, args): state_ptr = get_state_ptr(cgctx, builder, "internal") - bits = const_int(types.intp.bitwidth) - value = get_next_int(cgctx, builder, state_ptr, bits, False) + bits = const_int(_hash_width) + + # Why not just use get_next_int() with the correct bitwidth? + # get_next_int() always returns an i64, because the bitwidth it is + # passed may not be a compile-time constant, so it needs to allocate + # the largest unit of storage that may be required. Therefore, if the + # hash width is 32, then we need to use get_next_int32() to ensure we + # don't return a wider-than-expected hash, even if everything above + # the low 32 bits would have been zero. + if _hash_width == 32: + value = get_next_int32(cgctx, builder, state_ptr) + else: + value = get_next_int(cgctx, builder, state_ptr, bits, False) + return value - sig = types.intp() + sig = _Py_hash_t() return sig, impl
