diff --git a/doc/conf.py b/doc/conf.py index 5213ffd6fdc..50c8cefcf2c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1339,6 +1339,7 @@ def reset_warnings(gallery_conf, fname): r"datetime\.datetime\.utcfromtimestamp", # joblib r"ast\.Num is deprecated", + r"Attribute n is deprecated and will be removed in Python 3\.14", ): warnings.filterwarnings( # deal with other modules having bad imports "ignore", message=".*%s.*" % key, category=DeprecationWarning diff --git a/mne/conftest.py b/mne/conftest.py index 871b1b9e34c..6e6cbff2232 100644 --- a/mne/conftest.py +++ b/mne/conftest.py @@ -191,6 +191,7 @@ def pytest_configure(config): ignore:datetime.datetime.utcfromtimestamp.*:DeprecationWarning # joblib ignore:ast\.Num is deprecated.*:DeprecationWarning + ignore:Attribute n is deprecated and will be removed in Python 3\.14.*:DeprecationWarning """ # noqa: E501 for warning_line in warning_lines.split("\n"): warning_line = warning_line.strip() diff --git a/mne/export/_egimff.py b/mne/export/_egimff.py index da770b6ae88..aef6d2e9a31 100644 --- a/mne/export/_egimff.py +++ b/mne/export/_egimff.py @@ -50,7 +50,6 @@ def export_evokeds_mff(fname, evoked, history=None, *, overwrite=False, verbose= using MFF read functions. """ mffpy = _import_mffpy("Export evokeds to MFF.") - import pytz info = evoked[0].info if np.round(info["sfreq"]) != info["sfreq"]: @@ -73,7 +72,7 @@ def export_evokeds_mff(fname, evoked, history=None, *, overwrite=False, verbose= if op.exists(fname): os.remove(fname) if op.isfile(fname) else shutil.rmtree(fname) writer = mffpy.Writer(fname) - current_time = pytz.utc.localize(datetime.datetime.now(datetime.UTC)) + current_time = datetime.datetime.now(datetime.UTC) writer.addxml("fileInfo", recordTime=current_time) try: device = info["device_info"]["type"]