From: Petr Viktorin Date: Wed, 19 Nov 2025 13:43:42 +0000 (+0100) Subject: gh-135953: Avoid BytesWarning when sampling profiler tests fail (GH-141719) X-Git-Tag: v3.15.0a3~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2178743feab3964a25578b0c0bd3ed1a5ed6f75;p=thirdparty%2FPython%2Fcpython.git gh-135953: Avoid BytesWarning when sampling profiler tests fail (GH-141719) With `-bb`, this failed on BytesWarning: str() on a bytes instance --- diff --git a/Lib/test/test_profiling/test_sampling_profiler/helpers.py b/Lib/test/test_profiling/test_sampling_profiler/helpers.py index abd5a7377ad6..f1c01afd0fa5 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 @@ _test_sock.sendall(b"ready") 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)