Hello community, here is the log from the commit of package python-numba for openSUSE:Factory checked in at 2018-07-28 12:45:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-numba (Old) and /work/SRC/openSUSE:Factory/.python-numba.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-numba" Sat Jul 28 12:45:33 2018 rev:13 rq:625840 version:0.39.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-numba/python-numba.changes 2018-07-21 10:25:29.606953512 +0200 +++ /work/SRC/openSUSE:Factory/.python-numba.new/python-numba.changes 2018-07-28 12:45:34.853009419 +0200 @@ -1,0 +2,6 @@ +Fri Jul 20 13:09:58 UTC 2018 - [email protected] + +- Add patch numba-0.39.0-fix-3135.patch to make not fail datashader + tests. (https://github.com/bokeh/datashader/issues/620) + +------------------------------------------------------------------- New: ---- numba-0.39.0-fix-3135.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-numba.spec ++++++ --- /var/tmp/diff_new_pack.sj1xqe/_old 2018-07-28 12:45:35.465010531 +0200 +++ /var/tmp/diff_new_pack.sj1xqe/_new 2018-07-28 12:45:35.481010560 +0200 @@ -25,6 +25,7 @@ Group: Development/Languages/Python URL: http://numba.github.com Source: https://files.pythonhosted.org/packages/source/n/numba/numba-%{version}.tar.gz +Patch0: numba-0.39.0-fix-3135.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module llvmlite >= 0.24} BuildRequires: %{python_module numpy-devel >= 1.10} @@ -76,6 +77,7 @@ %prep %setup -q -n numba-%{version} +%patch0 -p1 sed -i '1{\@^#!%{_bindir}/env python@d}' numba/appdirs.py %build @@ -89,12 +91,12 @@ %python_clone -a %{buildroot}%{_bindir}/pycc %check -# Sadly needs 3 hours to finish in OBS run localy when updating! -#%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} -#pushd $PYTHONPATH -#$python -Wd -m pytest numba/tests -v -rs -#popd -#} +# # Sadly needs 3 hours to finish in OBS run localy when updating! +# %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} +# pushd $PYTHONPATH +# $python -Wd -m pytest numba/tests -v -rs +# popd +# } %post %{python_install_alternative numba pycc} ++++++ numba-0.39.0-fix-3135.patch ++++++ >From 99d35798b2e833792624574fd1b31b41bd1f496e Mon Sep 17 00:00:00 2001 From: Stuart Archibald <[email protected]> Date: Thu, 19 Jul 2018 20:38:31 +0100 Subject: [PATCH] Fix #3135 This fixes #3135 by adding guards to make sure that only line numbers in Z^+ are accessed and if no lines are found then they are not addressed. Test case from bug report is added. --- numba/ir.py | 18 ++++++++++++------ numba/tests/test_errorhandling.py | 16 ++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) --- a/numba/ir.py +++ b/numba/ir.py @@ -63,7 +63,12 @@ class Loc(object): spaces += 1 return spaces - selected = lines[self.line - nlines_up:self.line] + # A few places in the code still use no `loc` or default to line 1 + # this is often in places where exceptions are used for the purposes + # of flow control. As a result max is in use to prevent slice from + # `[negative: positive]` + selected = lines[max(0, self.line - nlines_up):self.line] + # see if selected contains a definition def_found = False for x in selected: @@ -83,12 +88,13 @@ class Loc(object): spaces = count_spaces(x) ret.append(' '*(4 + spaces) + '<source elided>\n') - ret.extend(selected[:-1]) - ret.append(_termcolor.highlight(selected[-1])) + if selected: + ret.extend(selected[:-1]) + ret.append(_termcolor.highlight(selected[-1])) - # point at the problem with a caret - spaces = count_spaces(selected[-1]) - ret.append(' '*(spaces) + _termcolor.indicate("^")) + # point at the problem with a caret + spaces = count_spaces(selected[-1]) + ret.append(' '*(spaces) + _termcolor.indicate("^")) # if in the REPL source may not be available if not ret:
