1
0
forked from VimPlug/jedi

Get rid of the imp library import in Python3 to avoid warnings, fixes #1001

This commit is contained in:
Dave Halter
2018-03-05 10:55:21 +01:00
parent d063dadcf7
commit 9e9c62a5ab
4 changed files with 20 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
import sys
import os
import imp
from jedi._compatibility import find_module, cast_path, force_unicode, iter_modules
from jedi._compatibility import find_module, cast_path, force_unicode, \
iter_modules, all_suffixes
from jedi.evaluate.compiled import access
from jedi import parser_utils
@@ -90,7 +90,7 @@ def _get_init_path(directory_path):
The __init__ file can be searched in a directory. If found return it, else
None.
"""
for suffix, _, _ in imp.get_suffixes():
for suffix in all_suffixes():
path = os.path.join(directory_path, '__init__' + suffix)
if os.path.exists(path):
return path