Skip to content

Commit e709361

Browse files
hugovkpablogsal
andauthored
[3.12] gh-131038: Use text=True in subprocesses in test_perf_profiler (#137117) (#138024)
gh-131038: Use text=True in subprocesses in test_perf_profiler (#137117) (cherry picked from commit a852c7b) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
1 parent c9d9f78 commit e709361

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_perf_profiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def run_perf(cwd, *args, **env_vars):
283283
stdout=subprocess.PIPE,
284284
stderr=subprocess.PIPE,
285285
env=env,
286+
text=True,
286287
)
287288
if proc.returncode:
288289
print(proc.stderr)
@@ -295,10 +296,9 @@ def run_perf(cwd, *args, **env_vars):
295296
stderr=subprocess.PIPE,
296297
env=env,
297298
check=True,
299+
text=True,
298300
)
299-
return proc.stdout.decode("utf-8", "replace"), proc.stderr.decode(
300-
"utf-8", "replace"
301-
)
301+
return proc.stdout, proc.stderr
302302

303303

304304
@unittest.skipUnless(perf_command_works(), "perf command doesn't work")

0 commit comments

Comments
 (0)