diff --git a/doc/changes/0.23.inc b/doc/changes/0.23.inc index 2f4cfa910bc..349f1f65f67 100644 --- a/doc/changes/0.23.inc +++ b/doc/changes/0.23.inc @@ -12,6 +12,13 @@ like this (where xxxx is the pull request number): - description of enhancement/bugfix/API change (:gh:`xxxx` **by new contributor** |Firstname Lastname|_) +.. _changes_0_23_2: + +Version 0.23.2 +-------------- + +- Fix bug in shim for ``contextlib.nullcontext`` for Python 3.6 (by `Eric Larson`_) + .. _changes_0_23_1: Version 0.23.1 diff --git a/mne/_version.py b/mne/_version.py index 162f52d90c0..baffb73fad0 100644 --- a/mne/_version.py +++ b/mne/_version.py @@ -3,4 +3,4 @@ # # License: BSD (3-clause) -__version__ = '0.23.1' +__version__ = '0.23.2' diff --git a/mne/fixes.py b/mne/fixes.py index 3caed995e1f..20c5d1a6c38 100644 --- a/mne/fixes.py +++ b/mne/fixes.py @@ -1080,6 +1080,11 @@ def mean(array, axis): except ImportError: from contextlib import contextmanager + @contextmanager + def nullcontext(): + yield + + def _is_last_row(ax): try: return ax.get_subplotspec().is_last_row() # 3.4+ diff --git a/mne/tests/test_import_nesting.py b/mne/tests/test_import_nesting.py index 18cce60ef81..a1db6bd00b8 100644 --- a/mne/tests/test_import_nesting.py +++ b/mne/tests/test_import_nesting.py @@ -14,7 +14,7 @@ # check scipy (Numba imports it to check the version) ok_scipy_submodules = set(['scipy', 'numpy', # these appear in old scipy - 'version']) + 'version', 'sparse', 'misc']) scipy_submodules = set(x.split('.')[1] for x in sys.modules.keys() if x.startswith('scipy.') and '__' not in x and not x.split('.')[1].startswith('_')