File tree 2 files changed +7
-11
lines changed
2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ pytest-benchmark
10
10
pytest-docker-pexpect
11
11
twine
12
12
pathlib2
13
+ importlib
Original file line number Diff line number Diff line change 4
4
from six import text_type
5
5
from . import const
6
6
from .system import Path
7
+ import importlib .util
7
8
8
- try :
9
- import importlib .util
10
-
11
- def load_source (name , pathname , _file = None ):
12
- module_spec = importlib .util .spec_from_file_location (name , pathname )
13
- module = importlib .util .module_from_spec (module_spec )
14
- module_spec .loader .exec_module (module )
15
- return module
16
- except ImportError :
17
- from imp import load_source
18
-
9
+ def load_source (name , pathname , _file = None ):
10
+ module_spec = importlib .util .spec_from_file_location (name , pathname )
11
+ module = importlib .util .module_from_spec (module_spec )
12
+ module_spec .loader .exec_module (module )
13
+ return module
19
14
20
15
class Settings (dict ):
21
16
def __getattr__ (self , item ):
You can’t perform that action at this time.
0 commit comments