https://github.com/python/cpython/commit/e709361fc87d0d9ab9c58033a0a7f2fef0ad43d2
commit: e709361fc87d0d9ab9c58033a0a7f2fef0ad43d2
branch: 3.12
author: Hugo van Kemenade <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-08-21T15:18:35+01:00
summary:

[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 a852c7bdd48979218a0c756ff1a5586d91cff607)

Co-authored-by: Pablo Galindo Salgado <[email protected]>

files:
M Lib/test/test_perf_profiler.py

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")

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to