mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
gh-106659: Fix test_embed.test_forced_io_encoding() on Windows (#108010)
Use config.legacy_windows_stdio=1 to avoid _io._WindowsConsoleIO.
This commit is contained in:
parent
57a20b0960
commit
e35c722d22
2 changed files with 8 additions and 1 deletions
|
|
@ -237,6 +237,11 @@ static void check_stdio_details(const wchar_t *encoding, const wchar_t *errors)
|
|||
if (errors) {
|
||||
config_set_string(&config, &config.stdio_errors, errors);
|
||||
}
|
||||
#ifdef MS_WINDOWS
|
||||
// gh-106659: On Windows, don't use _io._WindowsConsoleIO which always
|
||||
// announce UTF-8 for sys.stdin.encoding.
|
||||
config.legacy_windows_stdio = 1;
|
||||
#endif
|
||||
config_set_program_name(&config);
|
||||
init_from_config_clear(&config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue