Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for python 3.7 #983

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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