Skip to content

Commit efb7659

Browse files
committed
BUG: Fix for 3.6
1 parent 50a1524 commit efb7659

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

doc/changes/0.23.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
like this (where xxxx is the pull request number):
1313
- description of enhancement/bugfix/API change (:gh:`xxxx` **by new contributor** |Firstname Lastname|_)
1414

15+
.. _changes_0_23_2:
16+
17+
Version 0.23.2
18+
--------------
19+
20+
- Fix bug in shim for ``contextlib.nullcontext`` for Python 3.6 (by `Eric Larson`_)
21+
1522
.. _changes_0_23_1:
1623

1724
Version 0.23.1

mne/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
#
44
# License: BSD (3-clause)
55

6-
__version__ = '0.23.1'
6+
__version__ = '0.23.2'

mne/fixes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,11 @@ def mean(array, axis):
10801080
except ImportError:
10811081
from contextlib import contextmanager
10821082

1083+
@contextmanager
1084+
def nullcontext():
1085+
yield
1086+
1087+
10831088
def _is_last_row(ax):
10841089
try:
10851090
return ax.get_subplotspec().is_last_row() # 3.4+

mne/tests/test_import_nesting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
# check scipy (Numba imports it to check the version)
1616
ok_scipy_submodules = set(['scipy', 'numpy', # these appear in old scipy
17-
'version'])
17+
'version', 'sparse', 'misc'])
1818
scipy_submodules = set(x.split('.')[1] for x in sys.modules.keys()
1919
if x.startswith('scipy.') and '__' not in x and
2020
not x.split('.')[1].startswith('_')

0 commit comments

Comments
 (0)