Pin text I/O to UTF-8 and fail CI on locale-dependent reads/writes (#3296)

Co-authored-by: ShuQingDollarVoyager <57471784+ShuQingDollarVoyager@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Max 2026-08-16 12:41:53 +01:00 • committed by GitHub
commit 5285e936a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,7 @@ async def test_tool_call_and_notification_round_trip_over_a_stdio_subprocess(
async def collect(params: LoggingMessageNotificationParams) -> None:
received.append(params)
with tempfile.TemporaryFile(mode="w+") as errlog:
with tempfile.TemporaryFile(mode="w+", encoding="utf-8", errors="replace") as errlog:
transport = stdio_client(
StdioServerParameters(
command=sys.executable,