diff --git a/mne/export/tests/test_export.py b/mne/export/tests/test_export.py index f9146227d50..ac9551252c5 100644 --- a/mne/export/tests/test_export.py +++ b/mne/export/tests/test_export.py @@ -536,7 +536,9 @@ def test_export_raw_edf_does_not_fail_on_empty_header_fields(tmp_path): raw.export(tmp_path / "test.edf", add_ch_type=True) -@pytest.mark.skipif(not check_version("eeglabio", "0.1.2"), reason="fixed by 0.1.2") +@pytest.mark.skipif( + not check_version("eeglabio", "0.1.2"), reason="fixed by eeglabio 0.1.2" +) @pytest.mark.parametrize("preload", (True, False)) def test_export_epochs_eeglab(tmp_path, preload): """Test saving an Epochs instance to EEGLAB's set format.""" @@ -581,7 +583,6 @@ def test_export_epochs_eeglab(tmp_path, preload): epochs.export(Path(temp_fname), overwrite=True) -@pytest.mark.filterwarnings("ignore::FutureWarning") @testing.requires_testing_data @pytest.mark.parametrize("fmt", ("auto", "mff")) @pytest.mark.parametrize("do_history", (True, False)) @@ -640,7 +641,6 @@ def test_export_evokeds_to_mff(tmp_path, fmt, do_history): evoked[0].export(export_fname, overwrite=True) -@pytest.mark.filterwarnings("ignore::FutureWarning") @testing.requires_testing_data def test_export_to_mff_no_device(): """Test no device type throws ValueError.""" @@ -652,7 +652,6 @@ def test_export_to_mff_no_device(): export_evokeds("output.mff", evoked) -@pytest.mark.filterwarnings("ignore::FutureWarning") def test_export_to_mff_incompatible_sfreq(): """Test non-whole number sampling frequency throws ValueError.""" pytest.importorskip("mffpy", "0.5.7") diff --git a/mne/forward/_field_interpolation.py b/mne/forward/_field_interpolation.py index 8695154e1cc..369af2ae695 100644 --- a/mne/forward/_field_interpolation.py +++ b/mne/forward/_field_interpolation.py @@ -22,7 +22,7 @@ from ..fixes import _safe_svd from ..surface import get_head_surf, get_meg_helmet_surf from ..transforms import _find_trans, transform_surface_to -from ..utils import _check_fname, _check_option, _pl, _reg_pinv, logger, verbose, warn +from ..utils import _check_fname, _check_option, _pl, _reg_pinv, logger, verbose from ._lead_dots import ( _do_cross_dots, _do_self_dots, @@ -444,11 +444,11 @@ def make_field_map( subject=None, subjects_dir=None, ch_type=None, + *, mode="fast", meg_surf="helmet", - origin=None, + origin="auto", n_jobs=None, - *, upsampling=1, head_source=("bem", "head"), verbose=None, @@ -504,15 +504,6 @@ def make_field_map( The surface maps to be used for field plots. The list contains separate ones for MEG and EEG (if both MEG and EEG are present). """ - if origin is None: - warn_message = ( - 'Default value for origin is "(0.0, 0.0, 0.04)" in version 1.11 ' - 'but will be changed to "auto" in 1.12. Set the origin parameter ' - "explicitly to avoid this warning." - ) - warn(warn_message, FutureWarning) - origin = (0.0, 0.0, 0.04) - info = evoked.info if ch_type is None: diff --git a/mne/report/report.py b/mne/report/report.py index 177e5ea09f6..663b23a45b6 100644 --- a/mne/report/report.py +++ b/mne/report/report.py @@ -54,6 +54,7 @@ _import_nibabel, _path_like, _pl, + _record_warnings, _safe_input, _validate_type, _verbose_safe_false, @@ -3501,9 +3502,8 @@ def _add_raw( init_kwargs, plot_kwargs = _split_psd_kwargs(kwargs=add_psd) init_kwargs.setdefault("fmax", fmax) plot_kwargs.setdefault("show", False) - with warnings.catch_warnings(): + with _record_warnings(): # SciPy warning about too short a data segment given the window size - warnings.simplefilter(action="ignore", category=FutureWarning) fig = raw.compute_psd(**init_kwargs).plot(**plot_kwargs) self._add_figure( fig=fig, diff --git a/mne/source_space/_source_space.py b/mne/source_space/_source_space.py index 948e7afe8e6..74ffc7a44f2 100644 --- a/mne/source_space/_source_space.py +++ b/mne/source_space/_source_space.py @@ -2824,7 +2824,7 @@ def _do_src_distances(con, vertno, run_inds, limit): return d, min_idx, min_dist -# XXX this should probably be deprecated because it returns surface Labels, +# XXX this should probably be removed because it returns surface Labels, # and probably isn't the way to go moving forward # XXX this also assumes that the first two source spaces are surf without # checking, which might not be the case (could be all volumes) diff --git a/tools/dev/Makefile b/tools/dev/Makefile index 9128d758289..6579a4f60b1 100644 --- a/tools/dev/Makefile +++ b/tools/dev/Makefile @@ -27,4 +27,4 @@ clean: @rm bug-reports-12-to-2-months-old.json || true dep: - cd ../../ && git grep -iI "\(deprecat\|futurewarning\)" -- ':!*.js' ':!*/conftest.py' ':!*/docs.py' ':!*/test_docs.py' ':!*/utils/__init__.pyi' mne/ + cd ../../ && git grep -iI "\(deprecat\|futurewarning\|TODO VERSION\)" -- ':!*.js' ':!*/conftest.py' ':!*/docs.py' ':!*/test_docs.py' ':!*/utils/__init__.pyi' mne/