Skip to content

Commit

Permalink
Remove support for python 3.7 (#983)
Browse files Browse the repository at this point in the history
Since it is EOL this month anyway we should drop support and
encourage users to upgrade to a more stable python branch.

I removed the TODOs related to python 3.7 to the best of
my knowledge.
  • Loading branch information
ottonemo committed Jun 15, 2023
1 parent 5b222a5 commit de718ef
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 18 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:
strategy:
fail-fast: false # don't cancel all jobs when one fails
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
python_version: ['3.8', '3.9', '3.10']
torch_version: ['1.11.0+cpu', '1.12.1+cpu', '1.13.1+cpu', '2.0.0+cpu']
os: [ubuntu-latest]
exclude:
- python_version: '3.7'
torch_version: '2.0.0+cpu'

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ skorch also provides many convenient features, among others:
Installation
============

skorch requires Python 3.7 or higher.
skorch requires Python 3.8 or higher.

conda installation
==================
Expand Down
2 changes: 1 addition & 1 deletion docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ If you want to help developing, run:
pylint skorch # static code checks
You may adjust the Python version to any of the supported Python versions, i.e.
Python 3.7 or higher.
Python 3.8 or higher.

Using pip
^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
install_requires = [l.strip() for l in f]


python_requires = '>=3.7'
python_requires = '>=3.8'

tests_require = [
'pytest',
Expand Down
4 changes: 1 addition & 3 deletions skorch/_doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,7 @@ def get_param_names(self):
if self.gradient_recs_[module]:
# using the reversed order because gradients are recorded from
# last to first, but first to last is more intuitive to show
# TODO: When dropping python 3.7, dict keys are reversible, so
# no need to call list(keys)
keys = list(self.gradient_recs_[module][0].keys())
keys = self.gradient_recs_[module][0].keys()
names[module] = list(reversed(keys))
else:
names[module] = []
Expand Down
8 changes: 0 additions & 8 deletions skorch/tests/test_probabilistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,6 @@ def gp(self, gp_cls, module_cls, data):
# Since GPyTorch v1.10, GPRegressor works with pickle/deepcopy.

def test_pickling(self, gp_fit, data):
# TODO: remove once Python 3.7 is no longer supported
if version_gpytorch < Version('1.10'):
pytest.skip("GPyTorch < 1.10 does not support pickling.")

loaded = pickle.loads(pickle.dumps(gp_fit))
X, _ = data

Expand All @@ -650,10 +646,6 @@ def test_pickling(self, gp_fit, data):
assert np.allclose(y_pred_before, y_pred_after)

def test_deepcopy(self, gp_fit, data):
# TODO: remove once Python 3.7 is no longer supported
if version_gpytorch < Version('1.10'):
pytest.skip("GPyTorch < 1.10 does not support deepcopy.")

copied = copy.deepcopy(gp_fit)
X, _ = data

Expand Down

0 comments on commit de718ef

Please sign in to comment.