Skip to content

Commit f9c8f1c

Browse files
committed
Drop Python 3.6 testing
This is now a Python 3.8+ codebase Default to Python 3.12 for release testing and others
1 parent 3a36d09 commit f9c8f1c

File tree

11 files changed

+45
-62
lines changed

11 files changed

+45
-62
lines changed

.github/workflows/ci-tests.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,8 @@ jobs:
2121
matrix:
2222
# The README.rst file mentions the versions tested, please update it as well
2323
py-ver-major: [3]
24-
py-ver-minor: [6, 8, 9, 10, 11, 12]
24+
py-ver-minor: [8, 9, 10, 11, 12]
2525
step: [lint, unit, mypy, bandit]
26-
exclude:
27-
- py-ver-major: 3
28-
py-ver-minor: 6
29-
step: mypy
30-
- py-ver-major: 3
31-
py-ver-minor: 6
32-
step: lint
3326

3427
env:
3528
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
@@ -44,7 +37,6 @@ jobs:
4437
uses: actions/setup-python@v4
4538
with:
4639
python-version: ${{ env.py-semver }}
47-
allow-prereleases: true
4840
cache: pip
4941
cache-dependency-path: |
5042
requirements.txt
@@ -83,8 +75,8 @@ jobs:
8375
step: [lintreadme, pydocstyle]
8476

8577
env:
86-
py-semver: "3.11"
87-
TOXENV: ${{ format('py311-{0}', matrix.step) }}
78+
py-semver: "3.12"
79+
TOXENV: ${{ format('py312-{0}', matrix.step) }}
8880

8981
steps:
9082
- uses: actions/checkout@v4
@@ -124,7 +116,7 @@ jobs:
124116
- name: Set up Python
125117
uses: actions/setup-python@v4
126118
with:
127-
python-version: "3.11"
119+
python-version: "3.12"
128120
cache: pip
129121
cache-dependency-path: |
130122
requirements.txt

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,9 @@ mypy3: mypy
168168
mypy: $(filter-out setup.py gittagger.py,$(PYSOURCES))
169169
MYPYPATH=$$MYPYPATH:mypy-stubs mypy $^
170170

171-
mypy_3.6: $(filter-out setup.py gittagger.py,$(PYSOURCES))
172-
MYPYPATH=$$MYPYPATH:mypy-stubs mypy --python-version 3.6 $^
173-
174171
pyupgrade: $(filter-out schema_salad/metaschema.py,$(PYSOURCES))
175-
pyupgrade --exit-zero-even-if-changed --py36-plus $^
172+
pyupgrade --exit-zero-even-if-changed --py38-plus $^
173+
auto-walrus $^
176174

177175
release-test: FORCE
178176
git diff-index --quiet HEAD -- || ( echo You have uncommitted changes, please commit them and try again; false )

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This is a testing tool for checking the output of Tools and Workflows described
3232
with the Common Workflow Language. Among other uses, it is used to run the CWL
3333
conformance tests.
3434

35-
This is written and tested for Python 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11.
35+
This is written and tested for Python 3.8, 3.9, 3.10, 3.11, and 3.12.
3636

3737
.. contents:: Table of Contents
3838
:local:

cwltest/argparser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ def arg_parser() -> argparse.ArgumentParser:
107107
help="Create JSON badges and store them in this directory.",
108108
)
109109

110-
pkg = pkg_resources.require("cwltest")
111-
if pkg:
110+
if pkg := pkg_resources.require("cwltest"):
112111
ver = f"{sys.argv[0]} {pkg[0].version}"
113112
else:
114113
ver = "{} {}".format(sys.argv[0], "unknown version")

cwltest/compare.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ def _check_keys(
3737

3838

3939
def _compare_contents(expected: Dict[str, Any], actual: Dict[str, Any]) -> None:
40-
expected_contents = expected["contents"]
4140
with open(actual["path"]) as f:
4241
actual_contents = f.read()
43-
if expected_contents != actual_contents:
42+
if (expected_contents := expected["contents"]) != actual_contents:
4443
raise CompareFail.format(
4544
expected,
4645
actual,

cwltest/plugin.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Iterator,
1414
List,
1515
Optional,
16+
Protocol,
1617
Set,
1718
Tuple,
1819
Union,
@@ -21,7 +22,6 @@
2122

2223
import pytest
2324
from cwltest.compare import CompareFail, compare
24-
from typing_extensions import Protocol
2525

2626
from cwltest import REQUIRED, UNSUPPORTED_FEATURE, logger, utils
2727

@@ -207,8 +207,7 @@ def _add_global_properties(self) -> None:
207207
"""Nonfunctional if xdist is installed and anything besides "-n 0" is used."""
208208
from _pytest.junitxml import xml_key
209209

210-
xml = self.config._store.get(xml_key, None)
211-
if xml:
210+
if xml := self.config._store.get(xml_key, None):
212211
xml.add_global_property("runner", self.config.getoption("cwl_runner"))
213212
xml.add_global_property(
214213
"runner_extra_args", self.config.getoption("cwl_args")
@@ -381,8 +380,7 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: int) -> None:
381380
nunsupported,
382381
_,
383382
) = utils.parse_results(results, tests)
384-
cwl_badgedir = session.config.getoption("cwl_badgedir")
385-
if cwl_badgedir:
383+
if cwl_badgedir := session.config.getoption("cwl_badgedir"):
386384
utils.generate_badges(cwl_badgedir, ntotal, npassed)
387385

388386

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ autoflake
1212
flake8-bugbear
1313
pyupgrade
1414
bandit
15+
auto-walrus

release-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ else
1818
HEAD=$(git rev-parse HEAD)
1919
fi
2020
run_tests="bin/py.test -p pytester --pyargs ${module}"
21-
pipver=20.3.3 # minimum required version of pip for Python 3.10
22-
setuptoolsver=50.0.1 # required for Python 3.10
21+
pipver=23.1 # minimum required version of pip for Python 3.12
22+
setuptoolsver=67.6.1 # required for Python 3.12
2323
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
2424

2525
rm -Rf testenv? || /bin/true

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ schema-salad >= 5.0.20200220195218, < 9
22
junit-xml >= 1.8
33
pytest >= 7, < 8
44
defusedxml
5-
typing-extensions

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
url="https://github.com/common-workflow-language/cwltest",
3131
download_url="https://github.com/common-workflow-language/cwltest",
3232
license="Apache 2.0",
33-
python_requires=">=3.6, <4",
33+
python_requires=">=3.8, <4",
3434
setup_requires=[] + pytest_runner,
3535
packages=["cwltest", "cwltest.tests"],
3636
package_dir={"cwltest.tests": "tests"},
@@ -64,7 +64,6 @@
6464
"Operating System :: POSIX",
6565
"Operating System :: MacOS :: MacOS X",
6666
"Development Status :: 5 - Production/Stable",
67-
"Programming Language :: Python :: 3.6",
6867
"Programming Language :: Python :: 3.8",
6968
"Programming Language :: Python :: 3.9",
7069
"Programming Language :: Python :: 3.10",

0 commit comments

Comments
 (0)