Description of problem: When updating numpy to 1.23.4, I realized python-Bottleneck fails to build with it. https://copr.fedorainfracloud.org/coprs/churchyard/numpy-1.23/package/python-Bottleneck/ =================================== FAILURES =================================== _________________________ test_list_input[move_argmin] _________________________ func = <built-in function move_argmin> @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__) def test_list_input(func): """Test that bn.xxx gives the same output as bn.slow.xxx for list input.""" msg = "\nfunc %s | input %s (%s) | shape %s\n" msg += "\nInput array:\n%s\n" name = func.__name__ if name == "replace": return func0 = eval("bn.slow.%s" % name) for i, a in enumerate(lists()): with warnings.catch_warnings(): warnings.simplefilter("ignore") try: > actual = func(a) E TypeError: wrong number of arguments bottleneck/tests/list_input_test.py:42: TypeError During handling of the above exception, another exception occurred: func = <built-in function move_argmin> @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__) def test_list_input(func): """Test that bn.xxx gives the same output as bn.slow.xxx for list input.""" msg = "\nfunc %s | input %s (%s) | shape %s\n" msg += "\nInput array:\n%s\n" name = func.__name__ if name == "replace": return func0 = eval("bn.slow.%s" % name) for i, a in enumerate(lists()): with warnings.catch_warnings(): warnings.simplefilter("ignore") try: actual = func(a) desired = func0(a) except TypeError: actual = func(a, 2) > desired = func0(a, 2) bottleneck/tests/list_input_test.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:75: in move_argmin return move_func(argmin, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([0.]), axis = -1 def argmin(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:59: IndexError _________________________ test_list_input[move_argmax] _________________________ func = <built-in function move_argmax> @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__) def test_list_input(func): """Test that bn.xxx gives the same output as bn.slow.xxx for list input.""" msg = "\nfunc %s | input %s (%s) | shape %s\n" msg += "\nInput array:\n%s\n" name = func.__name__ if name == "replace": return func0 = eval("bn.slow.%s" % name) for i, a in enumerate(lists()): with warnings.catch_warnings(): warnings.simplefilter("ignore") try: > actual = func(a) E TypeError: wrong number of arguments bottleneck/tests/list_input_test.py:42: TypeError During handling of the above exception, another exception occurred: func = <built-in function move_argmax> @pytest.mark.parametrize("func", bn.get_functions("all"), ids=lambda x: x.__name__) def test_list_input(func): """Test that bn.xxx gives the same output as bn.slow.xxx for list input.""" msg = "\nfunc %s | input %s (%s) | shape %s\n" msg += "\nInput array:\n%s\n" name = func.__name__ if name == "replace": return func0 = eval("bn.slow.%s" % name) for i, a in enumerate(lists()): with warnings.catch_warnings(): warnings.simplefilter("ignore") try: actual = func(a) desired = func0(a) except TypeError: actual = func(a, 2) > desired = func0(a, 2) bottleneck/tests/list_input_test.py:46: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:101: in move_argmax return move_func(argmax, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([0.]), axis = -1 def argmax(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:85: IndexError ____________________________ test_move[move_argmin] ____________________________ func = <built-in function move_argmin> @pytest.mark.parametrize("func", bn.get_functions("move"), ids=lambda x: x.__name__) def test_move(func): """Test that bn.xxx gives the same output as a reference function.""" fmt = ( "\nfunc %s | window %d | min_count %s | input %s (%s) | shape %s | " "axis %s | order %s\n" ) fmt += "\nInput array:\n%s\n" aaae = assert_array_almost_equal func_name = func.__name__ func0 = eval("bn.slow.%s" % func_name) if func_name == "move_var": decimal = 3 else: decimal = 5 for i, a in enumerate(arrays(func_name)): axes = range(-1, a.ndim) for axis in axes: windows = range(1, a.shape[axis]) for window in windows: min_counts = list(range(1, window + 1)) + [None] for min_count in min_counts: actual = func(a, window, min_count, axis=axis) > desired = func0(a, window, min_count, axis=axis) bottleneck/tests/move_test.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:75: in move_argmin return move_func(argmin, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([inf]), axis = -1 def argmin(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:59: IndexError ____________________________ test_move[move_argmax] ____________________________ func = <built-in function move_argmax> @pytest.mark.parametrize("func", bn.get_functions("move"), ids=lambda x: x.__name__) def test_move(func): """Test that bn.xxx gives the same output as a reference function.""" fmt = ( "\nfunc %s | window %d | min_count %s | input %s (%s) | shape %s | " "axis %s | order %s\n" ) fmt += "\nInput array:\n%s\n" aaae = assert_array_almost_equal func_name = func.__name__ func0 = eval("bn.slow.%s" % func_name) if func_name == "move_var": decimal = 3 else: decimal = 5 for i, a in enumerate(arrays(func_name)): axes = range(-1, a.ndim) for axis in axes: windows = range(1, a.shape[axis]) for window in windows: min_counts = list(range(1, window + 1)) + [None] for min_count in min_counts: actual = func(a, window, min_count, axis=axis) > desired = func0(a, window, min_count, axis=axis) bottleneck/tests/move_test.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:101: in move_argmax return move_func(argmax, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([inf]), axis = -1 def argmax(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:85: IndexError ________________________ test_arg_parsing[move_argmin] _________________________ func = <built-in function move_argmin>, decimal = 5 @pytest.mark.parametrize("func", bn.get_functions("move"), ids=lambda x: x.__name__) def test_arg_parsing(func, decimal=5): """test argument parsing.""" name = func.__name__ func0 = eval("bn.slow.%s" % name) a = np.array([1.0, 2, 3]) fmt = "\n%s" % func fmt += "%s\n" fmt += "\nInput array:\n%s\n" % a actual = func(a, 2) > desired = func0(a, 2) bottleneck/tests/move_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:75: in move_argmin return move_func(argmin, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([1.]), axis = -1 def argmin(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:59: IndexError ________________________ test_arg_parsing[move_argmax] _________________________ func = <built-in function move_argmax>, decimal = 5 @pytest.mark.parametrize("func", bn.get_functions("move"), ids=lambda x: x.__name__) def test_arg_parsing(func, decimal=5): """test argument parsing.""" name = func.__name__ func0 = eval("bn.slow.%s" % name) a = np.array([1.0, 2, 3]) fmt = "\n%s" % func fmt += "%s\n" fmt += "\nInput array:\n%s\n" % a actual = func(a, 2) > desired = func0(a, 2) bottleneck/tests/move_test.py:71: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ bottleneck/slow/move.py:101: in move_argmax return move_func(argmax, a, window, min_count, axis=axis) bottleneck/slow/move.py:149: in move_func y[tuple(idx2)] = func(a[tuple(idx1)], axis=axis, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([1.]), axis = -1 def argmax(a, axis): a = np.array(a, copy=False) flip = [slice(None)] * a.ndim flip[axis] = slice(None, None, -1) > a = a[flip] # if tie, pick index of rightmost tie E IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices bottleneck/slow/move.py:85: IndexError =========================== short test summary info ============================ FAILED bottleneck/tests/list_input_test.py::test_list_input[move_argmin] - In... FAILED bottleneck/tests/list_input_test.py::test_list_input[move_argmax] - In... FAILED bottleneck/tests/move_test.py::test_move[move_argmin] - IndexError: on... FAILED bottleneck/tests/move_test.py::test_move[move_argmax] - IndexError: on... FAILED bottleneck/tests/move_test.py::test_arg_parsing[move_argmin] - IndexEr... FAILED bottleneck/tests/move_test.py::test_arg_parsing[move_argmax] - IndexEr... ================ 6 failed, 185 passed, 51962 warnings in 56.06s ================ Version-Release number of selected component: 1.3.2-5 How reproducible: Fetch numpy from his PR: https://src.fedoraproject.org/rpms/numpy/pull-request/27 Or use this Copr: https://copr.fedorainfracloud.org/coprs/churchyard/numpy-1.23/ And build this package. Actual results: Package fails to build. Expected results: Package builds successfully. Let me know if we should delay the update or proceed.
No response, so I'm proceeding with the numpy update.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
This is blocking the latest xarray update as the use of np.bool breaks since NumPy 1.23 removed those aliases. I think it's fixed in the latest version.
We're now past F38 Beta and the package is (at least partially) broken. Do you have plans to make an update?
I've opened PR myself since Bottleneck is blocking Python 3.12 effort. PR: https://src.fedoraproject.org/rpms/python-Bottleneck/pull-request/4
I've just realized this is a F38 bugzilla. This is the correct PR: https://src.fedoraproject.org/rpms/python-Bottleneck/pull-request/5
FEDORA-2023-f48885ca7a has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-f48885ca7a
FEDORA-2023-becec70b15 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-becec70b15
FEDORA-2023-becec70b15 has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-f48885ca7a has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-f48885ca7a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-f48885ca7a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-f48885ca7a has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days