From 884cac5fb5729cd808c747fe0cbb4803606b07cf Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 26 Aug 2020 04:33:42 +0200 Subject: [PATCH] Make run_command backwards compatible --- spacy/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index eb40dfa21..57693a776 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -585,10 +585,11 @@ def run_command(command: Union[str, List[str]], *, capture=False, stdin=None) -> ret = subprocess.run( command, env=os.environ.copy(), - capture_output=capture, input=stdin, text=True, check=True, + stdout=subprocess.PIPE if capture else None, + stderr=subprocess.PIPE if capture else None, ) except FileNotFoundError: raise FileNotFoundError(