Repository navigation
Test test_embed fails on Windows 11, Python 3.13.0a0 #106659
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jul 12, 2023 The test doesn't override
sys.stdinin the child process. Thus when it's run normally,stdinis a console file. By default, the raw type of a console file isio._WindowsConsoleIO, which always uses UTF-8. The test expects to be able to override this, but being able to do this will either require forcingstdinto be a pipe or nul or it will require defining the environment variablePYTHONLEGACYWINDOWSSTDIO. The latter forces the use ofio.FileIOfor console files, instead ofio._WindowsConsoleIO.The test expects to be able to override this, but being able to do this will either require forcing stdin to be a pipe or nul or it will require defining the environment variable PYTHONLEGACYWINDOWSSTDIO.
The removed
Py_SetStandardStreamEncoding()function did set Py_LegacyWindowsStdioFlag:/* Overriding the stream encoding implies legacy streams */ Py_LegacyWindowsStdioFlag = 1;
I missed that in my change. My PR fix it.
It should now be fixed. Thanks for your bug report! Thanks @Eclips4 for your review on my PR.
Reacted by Yonatan BittonReacted by Kirill PodoprigoraReacted by Kirill Podoprigora
Bug report
The test
test_embedfails on my Windows machine, using master branch (commit d0972c7).Full output -
Your environment
Linked PRs