Skip to content

Commit 834dddb

Browse files
committed
explicit dep on importlib_resources
1 parent 9932bf1 commit 834dddb

File tree

7 files changed

+12
-4
lines changed

7 files changed

+12
-4
lines changed

cwl_utils/parser/cwl_v1_0_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from collections import namedtuple
66
from io import StringIO
77
from typing import (
8+
IO,
89
Any,
910
Dict,
10-
IO,
1111
List,
1212
MutableMapping,
1313
MutableSequence,

cwl_utils/parser/cwl_v1_1_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from collections import namedtuple
66
from io import StringIO
77
from typing import (
8+
IO,
89
Any,
910
Dict,
10-
IO,
1111
List,
1212
MutableMapping,
1313
MutableSequence,

cwl_utils/parser/cwl_v1_2_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from collections import namedtuple
66
from io import StringIO
77
from typing import (
8+
IO,
89
Any,
910
Dict,
10-
IO,
1111
List,
1212
MutableMapping,
1313
MutableSequence,

cwl_utils/parser/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import cwl_utils
1515
import cwl_utils.parser
16+
1617
from . import (
1718
LoadingOptions,
1819
Process,

cwl_utils/sandboxjs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import re
99
import select
1010
import subprocess # nosec
11+
import sys
1112
import threading
1213
from abc import ABC, abstractmethod
1314
from io import BytesIO
@@ -25,7 +26,11 @@
2526
cast,
2627
)
2728

28-
from importlib_resources import files
29+
if sys.version_info >= (3, 9):
30+
from importlib.resources import files
31+
else:
32+
from importlib_resources import files
33+
2934
from schema_salad.utils import json_dumps
3035

3136
from cwl_utils.errors import JavascriptException, WorkflowException

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ rdflib
44
requests
55
schema-salad >= 8.5, < 9
66
ruamel.yaml >= 0.17.6, < 0.19
7+
importlib_resources;python_version<'3.9'

tests/test_parser_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import cwl_utils.parser.utils
1818
from cwl_utils.errors import WorkflowException
1919
from cwl_utils.parser import load_document_by_uri
20+
2021
from .util import get_data
2122

2223

0 commit comments

Comments
 (0)