Skip to content

Commit

Permalink
BUG: Fix for 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Aug 26, 2021
1 parent 50a1524 commit efb7659
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions doc/changes/0.23.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mne/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# License: BSD (3-clause)

__version__ = '0.23.1'
__version__ = '0.23.2'
5 changes: 5 additions & 0 deletions mne/fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand Down
2 changes: 1 addition & 1 deletion mne/tests/test_import_nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('_')
Expand Down

0 comments on commit efb7659

Please sign in to comment.