diff options
| author | Mike Taves <mwtoews@gmail.com> | 2022-10-27 10:19:42 +1300 |
|---|---|---|
| committer | Mike Taves <mwtoews@gmail.com> | 2022-10-27 10:38:56 +1300 |
| commit | 69a39461de4da2bfc0e6aeeff02c73c0972a8614 (patch) | |
| tree | cdab4df7d48c675a0961c4386dd3cd90d00dd22d /numpy/distutils/exec_command.py | |
| parent | 13d55a3c2f016a58a6e9d6b8086f338e07c7478f (diff) | |
| download | numpy-69a39461de4da2bfc0e6aeeff02c73c0972a8614.tar.gz | |
MAINT: change subprocess arguments from Python>=3.7
Diffstat (limited to 'numpy/distutils/exec_command.py')
| -rw-r--r-- | numpy/distutils/exec_command.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/numpy/distutils/exec_command.py b/numpy/distutils/exec_command.py index 79998cf5d..a67453abf 100644 --- a/numpy/distutils/exec_command.py +++ b/numpy/distutils/exec_command.py @@ -276,14 +276,13 @@ def _exec_command(command, use_shell=None, use_tee = None, **env): # Inherit environment by default env = env or None try: - # universal_newlines is set to False so that communicate() + # text is set to False so that communicate() # will return bytes. We need to decode the output ourselves # so that Python will not raise a UnicodeDecodeError when # it encounters an invalid character; rather, we simply replace it - proc = subprocess.Popen(command, shell=use_shell, env=env, + proc = subprocess.Popen(command, shell=use_shell, env=env, text=False, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - universal_newlines=False) + stderr=subprocess.STDOUT) except OSError: # Return 127, as os.spawn*() and /bin/sh do return 127, '' |
