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

Versioning with latest python libs #1015

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion cwltool/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Optional, Sequence, Union, cast)

from schema_salad.ref_resolver import file_uri
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .loghandler import _logger
Expand Down
2 changes: 1 addition & 1 deletion cwltool/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from schema_salad.avro.schema import make_avsc_object, Schema
from schema_salad.sourceline import SourceLine
from six import iteritems, string_types
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text, Type)
# move to a regular typing import when Python 3.3-3.6 is no longer supported

Expand Down
2 changes: 1 addition & 1 deletion cwltool/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import six
from schema_salad import validate
from schema_salad.sourceline import SourceLine, bullets, strip_dup_lineno
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .errors import WorkflowException
Expand Down
2 changes: 1 addition & 1 deletion cwltool/command_line_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from six import string_types

from six.moves import map, urllib
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text, Type)
# move to a regular typing import when Python 3.3-3.6 is no longer supported

Expand Down
2 changes: 1 addition & 1 deletion cwltool/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from schema_salad import schema
from schema_salad.ref_resolver import (ContextType, # pylint: disable=unused-import
Fetcher, Loader)
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text)
# move to a regular typing import when Python 3.3-3.6 is no longer supported
from .builder import Builder, HasReqsHints
Expand Down
2 changes: 1 addition & 1 deletion cwltool/cwlrdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from schema_salad.jsonld_context import makerdf
from schema_salad.ref_resolver import ContextType
from six.moves import urllib
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .process import Process
Expand Down
2 changes: 1 addition & 1 deletion cwltool/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import Dict, List, MutableMapping, Optional, Set, Tuple

import requests
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .context import RuntimeContext # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cwltool/docker_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import List, Optional, Tuple # pylint: disable=unused-import

from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .utils import subprocess
Expand Down
2 changes: 1 addition & 1 deletion cwltool/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import psutil
from six import string_types, with_metaclass
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
from schema_salad.validate import ValidationException

from .builder import Builder # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cwltool/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import six
from six import string_types, u
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .sandboxjs import default_timeout, execjs, JavascriptException
Expand Down
2 changes: 1 addition & 1 deletion cwltool/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Callable as tCallable # pylint: disable=unused-import
from typing import Any, Dict, Tuple, Union

from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from . import load_tool
Expand Down
2 changes: 1 addition & 1 deletion cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from prov.model import PROV
from schema_salad.sourceline import SourceLine
from six import PY2, with_metaclass
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text)

from .builder import Builder, HasReqsHints # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cwltool/load_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from schema_salad.validate import ValidationException
from six import itervalues, string_types
from six.moves import urllib
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from . import process, update
Expand Down
2 changes: 1 addition & 1 deletion cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from schema_salad.ref_resolver import Loader, file_uri, uri_file_path
from schema_salad.sourceline import strip_dup_lineno, cmap
from six import string_types, iteritems, PY3
from typing_extensions import Text
from typing import Text
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from . import command_line_tool, workflow
Expand Down
2 changes: 1 addition & 1 deletion cwltool/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections import namedtuple
from typing import Any, Dict

from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .errors import WorkflowException
Expand Down
2 changes: 1 addition & 1 deletion cwltool/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from schema_salad.ref_resolver import SubLoader
from six import iteritems, string_types
from six.moves import urllib
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .process import shortname, uniquename
Expand Down
2 changes: 1 addition & 1 deletion cwltool/pathmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from schema_salad.ref_resolver import uri_file_path
from schema_salad.sourceline import SourceLine
from six.moves import urllib
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .loghandler import _logger
Expand Down
2 changes: 1 addition & 1 deletion cwltool/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ruamel.yaml.comments import CommentedMap, CommentedSeq
from six import PY3, iteritems, itervalues, string_types, with_metaclass
from six.moves import urllib
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text)
from schema_salad import schema, validate
from schema_salad.ref_resolver import Loader, file_uri
Expand Down
2 changes: 1 addition & 1 deletion cwltool/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from ruamel import yaml
from schema_salad.sourceline import SourceLine
from six.moves import urllib
from typing_extensions import (TYPE_CHECKING, # pylint: disable=unused-import
from typing import (TYPE_CHECKING, # pylint: disable=unused-import
Text)
# move to a regular typing import when Python 3.3-3.6 is no longer supported

Expand Down
2 changes: 1 addition & 1 deletion cwltool/sandboxjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import six
from pkg_resources import resource_stream
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .loghandler import _logger
Expand Down
2 changes: 1 addition & 1 deletion cwltool/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Any, Dict, List, MutableMapping, MutableSequence

from six import string_types
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported


Expand Down
2 changes: 1 addition & 1 deletion cwltool/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import Dict, List, MutableMapping, Optional, Tuple

from schema_salad.sourceline import SourceLine
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .context import RuntimeContext # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cwltool/software_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import string
from typing import Dict, List, MutableSequence, Optional

from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .builder import Builder, HasReqsHints
Expand Down
2 changes: 1 addition & 1 deletion cwltool/stdfsaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from schema_salad.ref_resolver import file_uri, uri_file_path
from six.moves import urllib
from typing_extensions import Text
from typing import Text
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .utils import onWindows
Expand Down
2 changes: 1 addition & 1 deletion cwltool/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from schema_salad.ref_resolver import Loader # pylint: disable=unused-import
from six import string_types
from six.moves import urllib
from typing_extensions import Text
from typing import Text
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from .utils import visit_class
Expand Down
2 changes: 1 addition & 1 deletion cwltool/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from mypy_extensions import TypedDict
from schema_salad.utils import json_dump, json_dumps # pylint: disable=unused-import
from six.moves import urllib, zip_longest
from typing_extensions import Deque, Text # pylint: disable=unused-import
from typing import Deque, Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

# no imports from cwltool allowed
Expand Down
2 changes: 1 addition & 1 deletion cwltool/validate_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pkg_resources import resource_stream
from ruamel.yaml.comments import CommentedMap # pylint: disable=unused-import
from six import string_types
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
from schema_salad import avro
from schema_salad.sourceline import SourceLine
from schema_salad.validate import Schema # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cwltool/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from schema_salad.sourceline import SourceLine
from six import string_types, iteritems
from six.moves import range
from typing_extensions import Text # pylint: disable=unused-import
from typing import Text # pylint: disable=unused-import
# move to a regular typing import when Python 3.3-3.6 is no longer supported

from . import command_line_tool, context, expression
Expand Down
10 changes: 6 additions & 4 deletions gittaggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
SETUPTOOLS_VER = pkg_resources.get_distribution(
"setuptools").version.split('.')

RECENT_SETUPTOOLS = int(SETUPTOOLS_VER[0]) > 40 or (
int(SETUPTOOLS_VER[0]) == 40 and int(SETUPTOOLS_VER[1]) > 0) or (
int(SETUPTOOLS_VER[0]) == 40 and int(SETUPTOOLS_VER[1]) == 0 and
int(SETUPTOOLS_VER[2]) > 0)
[major,minor,sub] = [ int(item) for item in SETUPTOOLS_VER ]

RECENT_SETUPTOOLS = major > 40 or (major == 40 and minor or (major == 40 and minor==0 and sub > 0))
# 40.6.3 does not have vtags
if major == 40 and minor == 6 and sub == 3:
RECENT_SETUPTOOLS=False

class EggInfoFromGit(egg_info):
"""Tag the build with git commit timestamp.
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ ruamel.yaml>=0.12.4,<=0.15.77
rdflib>=4.2.2,<4.3
shellescape>=3.4.1,<3.5
schema-salad>=3.0,<3.1
typing>=3.5.3; python_version<"3.6"
pathlib2==2.3.2; python_version<"3"
prov==1.5.1
prov>=1.5.1,!=1.5.2
bagit==1.6.4
mypy-extensions
psutil
scandir
subprocess32 >= 3.5.0; os.name=="posix" and python_version<"3.5"
typing-extensions
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
'six >= 1.9.0', # >= 1.9.0 required by prov
'psutil',
'scandir',
'prov == 1.5.1',
'prov >=1.5.1, !=1.5.2',
'bagit >= 1.6.4',
'typing-extensions',
# 'typing-extensions',
],
extras_require={
':os.name=="posix" and python_version<"3.5"': ['subprocess32 >= 3.5.0'],
Expand Down Expand Up @@ -109,6 +109,6 @@
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Medical Science Apps.',
'Topic :: System :: Distributed Computing',
'Topic :: Utilities',
'Topic :: Utilities'
]
)