gh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec` (#132248)
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index b3dba9d..5f7171d 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py
@@ -2101,7 +2101,7 @@ def test_remote_exec_raises_audit_event(self): prologue = '''\ import sys def audit_hook(event, arg): - print(f"Audit event: {event}, arg: {arg}") + print(f"Audit event: {event}, arg: {arg}".encode("ascii", errors="replace")) sys.addaudithook(audit_hook) ''' script = '''