From 01d737d3b25b90c28c6b63f3fb9d12044678c915 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Sat, 26 Jul 2025 18:01:51 +0100 Subject: [PATCH] gh-131038: Use text=True in subprocesses in test_perf_profiler (#137117) (cherry picked from commit a852c7bdd48979218a0c756ff1a5586d91cff607) --- Lib/test/test_perf_profiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_perf_profiler.py b/Lib/test/test_perf_profiler.py index b380e496a2d3cb..f673f4d78d59b2 100644 --- a/Lib/test/test_perf_profiler.py +++ b/Lib/test/test_perf_profiler.py @@ -283,6 +283,7 @@ def run_perf(cwd, *args, **env_vars): stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env, + text=True, ) if proc.returncode: print(proc.stderr) @@ -295,10 +296,9 @@ def run_perf(cwd, *args, **env_vars): stderr=subprocess.PIPE, env=env, check=True, + text=True, ) - return proc.stdout.decode("utf-8", "replace"), proc.stderr.decode( - "utf-8", "replace" - ) + return proc.stdout, proc.stderr @unittest.skipUnless(perf_command_works(), "perf command doesn't work")