From 58d0215ab7c1ea8060f5ac6eef068ca19048da16 Mon Sep 17 00:00:00 2001 From: Zac Hatfield-Dodds Date: Wed, 5 Jul 2023 23:31:52 -0700 Subject: [PATCH] Use utf-8 so we support non-ascii module names It's safe to assume that this is always utf-8-safe because we only ever use the function to send Python source code, which must be utf-8 encodable (and indeed utf-8 at rest) --- execnet/gateway_bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/execnet/gateway_bootstrap.py b/execnet/gateway_bootstrap.py index 30b6d866..ba5bf104 100644 --- a/execnet/gateway_bootstrap.py +++ b/execnet/gateway_bootstrap.py @@ -75,7 +75,7 @@ def bootstrap_socket(io, id): def sendexec(io, *sources): source = "\n".join(sources) - io.write((repr(source) + "\n").encode("ascii")) + io.write((repr(source) + "\n").encode("utf-8")) def fix_pid_for_jython_popen(gw):