Control: tags -1 + confirmed Control: retitle -1 python-mne: FTBFS: NumPy 2.0 AttributeError and other issues
The original error looks to have gone away when #1092354 affecting python3-vtk9 has been resolved: > mne/commands/tests/test_commands.py::test_sys_info Fatal Python error: > Segmentation fault > > Current thread 0x00007f24f9b14080 (most recent call first): > File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed […] > File "<frozen importlib._bootstrap>", line 1360 in _find_and_load > File "/usr/lib/python3/dist-packages/vtk.py", line 4 in <module> > File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed […] > Segmentation fault However, my build attempt of python-mne reported a new bunch of test failures, some of which look related to the migration to numpy 2.0, example: ______________________________ test_search_light _______________________________ joblib.externals.loky.process_executor._RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3/dist-packages/joblib/externals/loky/backend/queues.py", line 159, in _feed obj_ = dumps(obj, reducers=reducers) File "/usr/lib/python3/dist-packages/joblib/externals/loky/backend/reduction.py", line 215, in dumps dump(obj, buf, reducers=reducers, protocol=protocol) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/joblib/externals/loky/backend/reduction.py", line 208, in dump _LokyPickler(file, reducers=reducers, protocol=protocol).dump(obj) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ File "/usr/lib/python3/dist-packages/joblib/externals/cloudpickle/cloudpickle_fast.py", line 632, in dump return Pickler.dump(self, obj) ~~~~~~~~~~~~^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/joblib/_memmapping_reducer.py", line 385, in __call__ return _reduce_memmap_backed(a, m) File "/usr/lib/python3/dist-packages/joblib/_memmapping_reducer.py", line 269, in _reduce_memmap_backed a_start, a_end = np.byte_bounds(a) ^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 400, in __getattr__ raise AttributeError( ...<3 lines>... ) AttributeError: `np.byte_bounds` was removed in the NumPy 2.0 release. Now it's available under `np.lib.array_utils.byte_bounds` """ The above exception was the direct cause of the following exception: mne/decoding/tests/test_search_light.py:150: in test_search_light score_njobs = sl.fit(X, y).score(X, y) mne/decoding/search_light.py:103: in fit estimators = parallel( /usr/lib/python3/dist-packages/joblib/parallel.py:1952: in __call__ return output if self.return_generator else list(output) /usr/lib/python3/dist-packages/joblib/parallel.py:1595: in _get_outputs yield from self._retrieve() /usr/lib/python3/dist-packages/joblib/parallel.py:1699: in _retrieve self._raise_error_fast() /usr/lib/python3/dist-packages/joblib/parallel.py:1734: in _raise_error_fast error_job.get_result(self.timeout) /usr/lib/python3/dist-packages/joblib/parallel.py:736: in get_result return self._return_or_raise() /usr/lib/python3/dist-packages/joblib/parallel.py:754: in _return_or_raise raise self._result E _pickle.PicklingError: Could not pickle the task to send it to the workers. Some others look to stem from another issue having to do with doctest perhaps: ______________________ [doctest] mne.utils.docs.copy_doc _______________________ 5093 >>> class A: 5094 ... def m1(): 5095 ... '''Docstring for m1''' 5096 ... pass 5097 >>> class B (A): 5098 ... @copy_doc(A.m1) 5099 ... def m1(): 5100 ... ''' this gets appended''' 5101 ... pass 5102 >>> print(B.m1.__doc__) Expected: Docstring for m1 this gets appended Got: Docstring for m1this gets appended /build/reproducible-path/python-mne-1.8.0/mne/utils/docs.py:5102: DocTestFailure ___________ [doctest] mne.utils.docs.copy_function_doc_to_method_doc ___________ 5162 >>> class A: 5163 ... @copy_function_doc_to_method_doc(plot_function) 5164 ... def plot(self, a, b): 5165 ... ''' 5166 ... Notes 5167 ... ----- 5168 ... .. versionadded:: 0.13.0 5169 ... ''' 5170 ... plot_function(self, a, b) 5171 >>> print(A.plot.__doc__) Differences (unified diff with -expected +actual): @@ -1,13 +1,13 @@ Docstring for plotting function. <BLANKLINE> - Parameters - ---------- - a : int - Some parameter - b : int - Some parameter +Parameters +---------- +a : int + Some parameter +b : int + Some parameter <BLANKLINE> - Notes - ----- - .. versionadded:: 0.13.0 +Notes +----- +.. versionadded:: 0.13.0 <BLANKLINE> /build/reproducible-path/python-mne-1.8.0/mne/utils/docs.py:5171: DocTestFailure _____________________ test_copy_function_doc_to_method_doc _____________________ mne/utils/tests/test_docs.py:196: in test_copy_function_doc_to_method_doc assert ( E AssertionError: assert 'Docstring fo...Parameter b\n' == 'Docstring fo...r b\n ' E E Docstring for f1. E E + Parameters E + ---------- E + a : int E - Parameters... E E ...Full output truncated (12 lines hidden), use '-vv' to show - generated xml file: /build/reproducible-path/python-mne-1.8.0/junit-results.xml - Have a nice day, :) -- .''`. Étienne Mollier <emoll...@debian.org> : :' : pgp: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da `. `' sent from /dev/pts/2, please excuse my verbosity `- on air: Kaprekar's Constant - Ghost Planes
signature.asc
Description: PGP signature