https://github.com/python/cpython/commit/e2178743feab3964a25578b0c0bd3ed1a5ed6f75
commit: e2178743feab3964a25578b0c0bd3ed1a5ed6f75
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2025-11-19T14:43:42+01:00
summary:

gh-135953: Avoid BytesWarning when sampling profiler tests fail (GH-141719)

With `-bb`, this failed on BytesWarning: str() on a bytes instance

files:
M Lib/test/test_profiling/test_sampling_profiler/helpers.py

diff --git a/Lib/test/test_profiling/test_sampling_profiler/helpers.py 
b/Lib/test/test_profiling/test_sampling_profiler/helpers.py
index abd5a7377ad68e..f1c01afd0fa555 100644
--- a/Lib/test/test_profiling/test_sampling_profiler/helpers.py
+++ b/Lib/test/test_profiling/test_sampling_profiler/helpers.py
@@ -83,7 +83,7 @@ def test_subprocess(script):
         response = client_socket.recv(1024)
         if response != b"ready":
             raise RuntimeError(
-                f"Unexpected response from subprocess: {response}"
+                f"Unexpected response from subprocess: {response!r}"
             )
 
         yield SubprocessInfo(proc, client_socket)

_______________________________________________
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