1
0
forked from VimPlug/jedi

fix some python 3 compatibility things (which involves some real bugs, but py2 was passing)

This commit is contained in:
Dave Halter
2014-01-12 17:02:26 +01:00
parent e4f3f5bea2
commit c75cef0882
5 changed files with 16 additions and 17 deletions
+3
View File
@@ -154,6 +154,9 @@ def load_module(path, name):
name = os.path.basename(path)
name = name.rpartition('.')[0] # cut file type (normally .so)
# sometimes there are endings like `_sqlite3.cpython-32mu`
name = re.sub(r'\..*', '', name)
sys_path = get_sys_path()
if path:
sys_path.insert(0, path)
-3
View File
@@ -45,9 +45,6 @@ def _load_fakes(module_name):
raise NotImplementedError()
return funcs
# sometimes there are stupid endings like `_sqlite3.cpython-32mu`
module_name = re.sub(r'\..*', '', module_name)
if module_name == '__builtin__' and not is_py3k:
module_name = 'builtins'
path = os.path.dirname(os.path.abspath(__file__))