Skip to content

Commit 780f64a

Browse files
committed
Drop Python 3.6
1 parent 73e5295 commit 780f64a

File tree

15 files changed

+73
-74
lines changed

15 files changed

+73
-74
lines changed

.github/workflows/ci-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
matrix:
2626
py-ver-major: [3]
27-
py-ver-minor: [6, 7, 8, 9, 10]
27+
py-ver-minor: [7, 8, 9, 10]
2828
step: [lint, unit, bandit, mypy]
2929

3030
env:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ shellcheck: FORCE
184184
cwltool-in-docker.sh
185185

186186
pyupgrade: $(PYSOURCES)
187-
pyupgrade --exit-zero-even-if-changed --py36-plus $^
187+
pyupgrade --exit-zero-even-if-changed --py37-plus $^
188188

189189
release-test: check-python3 FORCE
190190
git diff-index --quiet HEAD -- || ( echo You have uncommited changes, please commit them and try again; false )

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ List of all environment can be seen using:
694694
and running a specfic test env using:
695695
``tox -e <env name>``
696696
and additionally run a specific test using this format:
697-
``tox -e py36-unit -- -v tests/test_examples.py::test_scandeps``
697+
``tox -e py310-unit -- -v tests/test_examples.py::test_scandeps``
698698

699699
- Running the entire suite of CWL conformance tests:
700700

cwltool/context.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@
33
import os
44
import tempfile
55
import threading
6-
from typing import IO, Any, Callable, Dict, Iterable, List, Optional, TextIO, Union
6+
from typing import (
7+
IO,
8+
TYPE_CHECKING,
9+
Any,
10+
Callable,
11+
Dict,
12+
Iterable,
13+
List,
14+
Optional,
15+
TextIO,
16+
Union,
17+
)
718

8-
# move to a regular typing import when Python 3.3-3.6 is no longer supported
919
from ruamel.yaml.comments import CommentedMap
1020
from schema_salad.avro.schema import Names
1121
from schema_salad.ref_resolver import Loader
1222
from schema_salad.utils import FetcherCallableType
13-
from typing_extensions import TYPE_CHECKING
1423

1524
from .builder import Builder
1625
from .mpi import MpiConfig

cwltool/cuda.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import subprocess # nosec
22
import xml.dom.minidom # nosec
3+
from typing import Tuple, cast
4+
35
from .loghandler import _logger
46
from .utils import CWLObjectType
57

6-
from typing import Tuple, cast
7-
88

99
def cuda_version_and_device_count() -> Tuple[str, int]:
1010
try:

cwltool/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
from .utils import (
5252
CWLObjectType,
5353
CWLOutputType,
54-
HasReqsHints,
5554
DirectoryType,
55+
HasReqsHints,
5656
OutputCallbackType,
5757
bytes2str_in_dicts,
5858
create_tmp_dir,

cwltool/provenance.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -247,24 +247,22 @@ def _valid_orcid(orcid: Optional[str]) -> str:
247247
"oa:motivatedBy": Dict[str, str],
248248
},
249249
)
250-
Aggregate = TypedDict(
251-
"Aggregate",
252-
{
253-
"uri": Optional[str],
254-
"bundledAs": Optional[Dict[str, Any]],
255-
"mediatype": Optional[str],
256-
"conformsTo": Optional[Union[str, List[str]]],
257-
"createdOn": Optional[str],
258-
"createdBy": Optional[Dict[str, str]],
259-
},
260-
total=False,
261-
)
250+
251+
252+
class Aggregate(TypedDict, total=False):
253+
uri: Optional[str]
254+
bundledAs: Optional[Dict[str, Any]]
255+
mediatype: Optional[str]
256+
conformsTo: Optional[Union[str, List[str]]]
257+
createdOn: Optional[str]
258+
createdBy: Optional[Dict[str, str]]
259+
260+
262261
# Aggregate.bundledAs is actually type Aggregate, but cyclic definitions are not suported
263-
AuthoredBy = TypedDict(
264-
"AuthoredBy",
265-
{"orcid": Optional[str], "name": Optional[str], "uri": Optional[str]},
266-
total=False,
267-
)
262+
class AuthoredBy(TypedDict, total=False):
263+
orcid: Optional[str]
264+
name: Optional[str]
265+
uri: Optional[str]
268266

269267

270268
class ResearchObject:

cwltool/utils.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,13 @@
101101
JSONType = Union[
102102
Dict[str, JSONAtomType], List[JSONAtomType], str, int, float, bool, None
103103
]
104-
WorkflowStateItem = NamedTuple(
105-
"WorkflowStateItem",
106-
[
107-
("parameter", CWLObjectType),
108-
("value", Optional[CWLOutputType]),
109-
("success", str),
110-
],
111-
)
104+
105+
106+
class WorkflowStateItem(NamedTuple):
107+
parameter: CWLObjectType
108+
value: Optional[CWLOutputType]
109+
success: str
110+
112111

113112
ParametersType = List[CWLObjectType]
114113
StepType = CWLObjectType # WorkflowStep

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ coloredlogs
1212
pydot>=1.4.1
1313
argcomplete>=1.12.0
1414
pyparsing != 3.0.2 # breaks --print-dot (pydot) https://github.com/pyparsing/pyparsing/issues/319
15-
pyparsing < 3;python_version<='3.6' # breaks --print-dot

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,12 @@
120120
"coloredlogs",
121121
"pydot >= 1.4.1",
122122
"pyparsing != 3.0.2", # breaks --print-dot (pydot) https://github.com/pyparsing/pyparsing/issues/319
123-
"pyparsing < 3 ;python_version<='3.6'", # breaks --print-dot (pydot)
124123
"argcomplete",
125124
],
126125
extras_require={
127126
"deps": ["galaxy-tool-util >= 21.1.0"],
128127
},
129-
python_requires=">=3.6, <4",
128+
python_requires=">=3.7, <4",
130129
setup_requires=PYTEST_RUNNER,
131130
test_suite="tests",
132131
tests_require=[
@@ -151,10 +150,10 @@
151150
"Operating System :: POSIX",
152151
"Operating System :: POSIX :: Linux",
153152
"Programming Language :: Python :: 3",
154-
"Programming Language :: Python :: 3.6",
155153
"Programming Language :: Python :: 3.7",
156154
"Programming Language :: Python :: 3.8",
157155
"Programming Language :: Python :: 3.9",
156+
"Programming Language :: Python :: 3.10",
158157
"Topic :: Scientific/Engineering",
159158
"Topic :: Scientific/Engineering :: Bio-Informatics",
160159
"Topic :: Scientific/Engineering :: Astronomy",

0 commit comments

Comments
 (0)