From b38d31b99d46815967b56fa81468f4ec12b252ee Mon Sep 17 00:00:00 2001 From: "T.Rzepka" Date: Sun, 11 Feb 2018 22:37:57 +0100 Subject: [PATCH] Fix for Python 2 on Windows, see #1037. --- AUTHORS.txt | 1 + jedi/evaluate/compiled/subprocess/__init__.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index 691795dd..bce27b07 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -47,5 +47,6 @@ Simon Ruggier (@sruggier) Robin Roth (@robinro) Malte Plath (@langsamer) Anton Zub (@zabulazza) +Tobias Rzepka (@TobiasRzepka) Note: (@user) means a github user name. diff --git a/jedi/evaluate/compiled/subprocess/__init__.py b/jedi/evaluate/compiled/subprocess/__init__.py index a8de8792..e4d5a304 100644 --- a/jedi/evaluate/compiled/subprocess/__init__.py +++ b/jedi/evaluate/compiled/subprocess/__init__.py @@ -138,11 +138,13 @@ class _CompiledSubprocess(object): _MAIN_PATH, os.path.dirname(os.path.dirname(parso_path)) ) + universal_newlines = not is_py3 return subprocess.Popen( args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, # stderr=subprocess.PIPE + universal_newlines=universal_newlines ) def run(self, evaluator, function, args=(), kwargs={}):