1
0
forked from VimPlug/jedi

Improve Environment

It only takes `executable` and gets all the information from the
subprocess directly.

Fixes https://github.com/davidhalter/jedi/issues/1107.
This commit is contained in:
Daniel Hahler
2018-04-27 10:05:46 +02:00
committed by Dave Halter
parent f6bc166ea7
commit 2fc91ceb64
3 changed files with 69 additions and 74 deletions

View File

@@ -1,5 +1,5 @@
import sys
import os
import sys
def _get_paths():
@@ -45,7 +45,11 @@ else:
load('jedi')
from jedi.evaluate.compiled import subprocess # NOQA
from jedi._compatibility import highest_pickle_protocol # noqa: E402
# Retrieve the pickle protocol.
pickle_protocol = int(sys.argv[2])
host_sys_version = [int(x) for x in sys.argv[2].split('.')]
pickle_protocol = highest_pickle_protocol([sys.version_info, host_sys_version])
# And finally start the client.
subprocess.Listener(pickle_protocol).listen()
subprocess.Listener(pickle_protocol=pickle_protocol).listen()