From e2178743feab3964a25578b0c0bd3ed1a5ed6f75 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 19 Nov 2025 14:43:42 +0100 Subject: [PATCH] gh-135953: Avoid BytesWarning when sampling profiler tests fail (GH-141719) With `-bb`, this failed on BytesWarning: str() on a bytes instance --- Lib/test/test_profiling/test_sampling_profiler/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_profiling/test_sampling_profiler/helpers.py b/Lib/test/test_profiling/test_sampling_profiler/helpers.py index abd5a7377ad..f1c01afd0fa 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)