Skip to content

Commit

Permalink
Bump minimum Python to 3.8 (mne-tools#11550)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr authored Mar 14, 2023
1 parent bf25021 commit 132d1da
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compat_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
# Minimal (runs with and without testing data)
job:
name: 'minimal 3.7'
name: 'minimal 3.8'
runs-on: ubuntu-20.04
defaults:
run:
Expand All @@ -28,7 +28,7 @@ jobs:
MNE_SKIP_NETWORK_TEST: 1
OPENBLAS_NUM_THREADS: '1'
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.7'
PYTHON_VERSION: '3.8'
steps:
- uses: actions/checkout@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/compat_old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ on:

jobs:
job:
name: 'old 3.7'
name: 'old 3.8'
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
env:
CONDA_DEPENDENCIES: 'numpy=1.18 scipy=1.4 matplotlib=3.1 pandas=1.0 scikit-learn=0.22'
CONDA_DEPENDENCIES: 'numpy=1.18 scipy=1.6.3 matplotlib=3.1 pandas=1.0 scikit-learn=0.22'
DISPLAY: ':99.0'
MNE_LOGGING_LEVEL: 'warning'
OPENBLAS_NUM_THREADS: '1'
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.7'
PYTHON_VERSION: '3.8'
MNE_IGNORE_WARNINGS_IN_TESTS: 'true'
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ To install the latest stable version of MNE-Python, you can use pip_ in a termin
- MNE-Python 0.18 requires Python 3.5 or higher
- MNE-Python 0.21 requires Python 3.6 or higher
- MNE-Python 0.24 requires Python 3.7 or higher
- MNE-Python 1.4 requires Python 3.8 or higher

For more complete instructions and more advanced installation methods (e.g. for
the latest development version), see the `installation guide`_.
Expand Down Expand Up @@ -92,9 +93,9 @@ Dependencies

The minimum required dependencies to run MNE-Python are:

- Python >= 3.7
- Python >= 3.8
- NumPy >= 1.18.1
- SciPy >= 1.4.1
- SciPy >= 1.6.3
- Matplotlib >= 3.1.0
- pooch >= 1.5
- tqdm
Expand Down
2 changes: 1 addition & 1 deletion doc/install/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Creating the virtual environment
These instructions will set up a Python environment that is separated from your
system-level Python and any other managed Python environments on your computer.
This lets you switch between different versions of Python (MNE-Python requires
version 3.7 or higher) and also switch between the stable and development
version 3.8 or higher) and also switch between the stable and development
versions of MNE-Python (so you can, for example, use the same computer to
analyze your data with the stable release, and also work with the latest
development version to fix bugs or add new features). Even if you've already
Expand Down
4 changes: 2 additions & 2 deletions doc/install/manual_install_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ conda to ``/home/user/anaconda3``):
$ conda --version && python --version
conda 4.9.2
Python 3.7.7 :: Anaconda, Inc.
Python 3.8.13 :: Anaconda, Inc.
$ which python
/home/user/anaconda3/bin/python
$ which pip
Expand All @@ -44,7 +44,7 @@ conda to ``/home/user/anaconda3``):
$ conda --version && python --version
conda 4.9.2
Python 3.7.7
Python 3.8.13
$ which python
/Users/user/opt/anaconda3/bin/python
$ which pip
Expand Down
15 changes: 8 additions & 7 deletions mne/preprocessing/ica.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from numbers import Integral
from time import time
from dataclasses import dataclass
from typing import Optional, List
from typing import Optional, List, Literal
import warnings

import math
Expand Down Expand Up @@ -448,12 +448,13 @@ def __init__(self, n_components=None, *, noise_cov=None,
def _get_infos_for_repr(self):
@dataclass
class _InfosForRepr:
# XXX replace with Optional[Literal['raw data', 'epochs'] once we
# drop support for Py 3.7
fit_on: Optional[str]
# XXX replace with fit_method: Literal['fastica', 'infomax',
# 'extended-infomax', 'picard'] once we drop support for Py 3.7
fit_method: str
fit_on: Optional[Literal['raw data', 'epochs']]
fit_method: Literal[
'fastica',
'infomax',
'extended-infomax',
'picard'
]
fit_n_iter: Optional[int]
fit_n_samples: Optional[int]
fit_n_components: Optional[int]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# requirements for full MNE-Python functionality (other than raw/epochs export)
numpy>=1.15.4
scipy>=1.1.0
scipy>=1.6.3
matplotlib
tqdm
pooch>=1.5
Expand Down
3 changes: 1 addition & 2 deletions requirements_base.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# requirements for basic MNE-Python functionality
numpy>=1.15.4
scipy>=1.1.0
scipy>=1.6.3
matplotlib
tqdm
pooch>=1.5
decorator
packaging
jinja2
importlib_resources>=5.10.2
importlib_metadata; python_version < '3.8'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def package_tree(pkgroot):
'Tracker': 'https://github.com/mne-tools/mne-python/issues/',
},
platforms='any',
python_requires='>=3.7',
python_requires='>=3.8',
install_requires=install_requires,
setup_requires=["setuptools>=45", "setuptools_scm>=6.2"],
use_scm_version={
Expand Down

0 comments on commit 132d1da

Please sign in to comment.