Skip to content

Commit 85cca11

Browse files
committed
build(python): drop support for Python 3.6 and 3.7 (#453)
BREAKING CHANGE: drop support for Python 3.6 and 3.7 Closes reanahub/reana#784
1 parent a7bcf7a commit 85cca11

3 files changed

Lines changed: 11 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Setup Python
5656
uses: actions/setup-python@v5
5757
with:
58-
python-version: '3.8'
58+
python-version: "3.8"
5959

6060
- name: Check Python code formatting
6161
run: |
@@ -71,7 +71,7 @@ jobs:
7171
- name: Setup Python
7272
uses: actions/setup-python@v5
7373
with:
74-
python-version: '3.8'
74+
python-version: "3.8"
7575

7676
- name: Check compliance with pep8, pyflakes and circular complexity
7777
run: |
@@ -87,7 +87,7 @@ jobs:
8787
- name: Setup Python
8888
uses: actions/setup-python@v5
8989
with:
90-
python-version: '3.8'
90+
python-version: "3.8"
9191

9292
- name: Check compliance with Python docstring conventions
9393
run: |
@@ -103,7 +103,7 @@ jobs:
103103
- name: Setup Python
104104
uses: actions/setup-python@v5
105105
with:
106-
python-version: '3.8'
106+
python-version: "3.8"
107107

108108
- name: Check Python manifest completeness
109109
run: |
@@ -119,7 +119,7 @@ jobs:
119119
- name: Setup Python
120120
uses: actions/setup-python@v5
121121
with:
122-
python-version: '3.8'
122+
python-version: "3.8"
123123

124124
- name: Install system dependencies
125125
run: |
@@ -143,7 +143,7 @@ jobs:
143143
runs-on: ubuntu-20.04
144144
strategy:
145145
matrix:
146-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
146+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
147147

148148
steps:
149149
- name: Checkout

setup.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,12 @@
3636
"yadage": ["adage~=0.10.1", "yadage~=0.20.1", "yadage-schemas~=0.10.6"],
3737
"cwl": ["cwltool==3.1.20210628163208"],
3838
"snakemake": [
39-
"snakemake==6.15.5 ; python_version<'3.7'", # Snakemake v7 requires Python 3.7+
40-
"snakemake==7.32.4 ; python_version>='3.7'",
41-
"tabulate<0.9",
39+
"snakemake==7.32.4",
4240
"pulp>=2.7.0,<2.8.0",
43-
"smart-open<7 ; python_version<'3.7'", # see https://github.com/piskvorky/smart_open/issues/806
4441
],
4542
"snakemake-reports": [
46-
"snakemake[reports]==6.15.5 ; python_version<'3.7'",
47-
"snakemake[reports]==7.32.4 ; python_version>='3.7'",
48-
"pygraphviz<1.8",
49-
"tabulate<0.9", # tabulate 0.9 crashes snakemake, more info: https://github.com/snakemake/snakemake/issues/1899
43+
"snakemake[reports]==7.32.4",
5044
"pulp>=2.7.0,<2.8.0",
51-
"smart-open<7 ; python_version<'3.7'", # see https://github.com/piskvorky/smart_open/issues/806
5245
],
5346
}
5447

@@ -104,7 +97,7 @@
10497
],
10598
zip_safe=False,
10699
include_package_data=True,
107-
python_requires=">=3.6",
100+
python_requires=">=3.8",
108101
install_requires=install_requires,
109102
extras_require=extras_require,
110103
setup_requires=setup_requires,
@@ -116,8 +109,6 @@
116109
"License :: OSI Approved :: MIT License",
117110
"Operating System :: OS Independent",
118111
"Programming Language :: Python :: 3",
119-
"Programming Language :: Python :: 3.6",
120-
"Programming Language :: Python :: 3.7",
121112
"Programming Language :: Python :: 3.8",
122113
"Programming Language :: Python :: 3.9",
123114
"Programming Language :: Python :: 3.10",

tests/test_workspace.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of REANA.
4-
# Copyright (C) 2022 CERN.
4+
# Copyright (C) 2022, 2024 CERN.
55
#
66
# REANA is free software; you can redistribute it and/or modify it
77
# under the terms of the MIT License; see LICENSE file for more details.
88
"""Workspace utilities tests"""
99

10-
import contextlib
10+
from contextlib import nullcontext as does_not_raise
1111
import os
1212
from pathlib import Path
1313

@@ -16,13 +16,6 @@
1616
from reana_commons import workspace
1717

1818

19-
# FIXME: use `contextlib.nullcontext` when moving to Python 3.7
20-
@contextlib.contextmanager
21-
def does_not_raise():
22-
"""Context manager that does nothing."""
23-
yield None
24-
25-
2619
@pytest.fixture()
2720
def test_workspace(tmp_path: Path):
2821
"""Workspace containing test files."""

0 commit comments

Comments
 (0)