Skip to content

Commit

Permalink
explicit dep on importlib_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Dec 1, 2023
1 parent 9932bf1 commit 834dddb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_0_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from collections import namedtuple
from io import StringIO
from typing import (
IO,
Any,
Dict,
IO,
List,
MutableMapping,
MutableSequence,
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_1_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from collections import namedtuple
from io import StringIO
from typing import (
IO,
Any,
Dict,
IO,
List,
MutableMapping,
MutableSequence,
Expand Down
2 changes: 1 addition & 1 deletion cwl_utils/parser/cwl_v1_2_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from collections import namedtuple
from io import StringIO
from typing import (
IO,
Any,
Dict,
IO,
List,
MutableMapping,
MutableSequence,
Expand Down
1 change: 1 addition & 0 deletions cwl_utils/parser/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import cwl_utils
import cwl_utils.parser

from . import (
LoadingOptions,
Process,
Expand Down
7 changes: 6 additions & 1 deletion cwl_utils/sandboxjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import re
import select
import subprocess # nosec
import sys
import threading
from abc import ABC, abstractmethod
from io import BytesIO
Expand All @@ -25,7 +26,11 @@
cast,
)

from importlib_resources import files
if sys.version_info >= (3, 9):
from importlib.resources import files
else:
from importlib_resources import files

from schema_salad.utils import json_dumps

from cwl_utils.errors import JavascriptException, WorkflowException
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ rdflib
requests
schema-salad >= 8.5, < 9
ruamel.yaml >= 0.17.6, < 0.19
importlib_resources;python_version<'3.9'
1 change: 1 addition & 0 deletions tests/test_parser_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import cwl_utils.parser.utils
from cwl_utils.errors import WorkflowException
from cwl_utils.parser import load_document_by_uri

from .util import get_data


Expand Down

0 comments on commit 834dddb

Please sign in to comment.