From e99b176484635a0af60ab497c403f064f6b9f8cc Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith [Google LLC]" Date: Wed, 31 Aug 2022 17:12:44 -0700 Subject: [PATCH] subprocess API %s/universal_newlines=/text=/g. --- Lib/test/test_perf_profiler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py index f587995b008f68..2b977d78d39324 100644 --- a/Lib/test/test_perf_profiler.py +++ b/Lib/test/test_perf_profiler.py @@ -108,7 +108,7 @@ def baz(): script = make_script(script_dir, "perftest", code) with subprocess.Popen( [sys.executable, "-Xperf", script], - universal_newlines=True, + text=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE, ) as process: @@ -157,7 +157,7 @@ def baz(): script = make_script(script_dir, "perftest", code) with subprocess.Popen( [sys.executable, script], - universal_newlines=True, + text=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE, ) as process: @@ -211,7 +211,7 @@ def is_unwinding_reliable(): def perf_command_works(): try: cmd = ["perf", "--help"] - stdout = subprocess.check_output(cmd, universal_newlines=True) + stdout = subprocess.check_output(cmd, text=True) except (subprocess.SubprocessError, OSError): return False @@ -237,7 +237,7 @@ def perf_command_works(): 'print("hello")', ) stdout = subprocess.check_output( - cmd, cwd=script_dir, universal_newlines=True, stderr=subprocess.STDOUT + cmd, cwd=script_dir, text=True, stderr=subprocess.STDOUT ) except (subprocess.SubprocessError, OSError): return False