This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients corona10, erlendaasland, neonene, paul.moore, petr.viktorin, shihai1991, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-01-07.23:05:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610060741.83.0.911035522238.issue42846@roundup.psfhosted.org>
In-reply-to
Content
Attached PR 24157 should fix the issue.

> FAIL: test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadingTests)

This test runs code in a subinterpreter which is run in a subprocess. The problem is not in the code run in the subinterpreter, but the creation of sys.stdout in the subprocess.

The test creates a subprocess and redirects its stdout and stderr. In this case, Python doesn't create a _io._WindowsConsoleIO for sys.stdout.buffer.raw, but a regular _io.FileIO object. When the raw I/O is a _WindowsConsoleIO instance, create_stdio() of Python/pylifecycle.c forces the usage of the UTF-8 encoding. But for FileIO, it keeps the locale encoding.

If the locale encoding is "cp932", a CJK multicodec is used. In the main interpreter, it's fine. In a subinterpreter, we hit the bug of the _codecs_jp which doesn't use the new multi-phase initialization API.
History
Date User Action Args
2021-01-07 23:05:41vstinnersetrecipients: + vstinner, paul.moore, tim.golden, petr.viktorin, zach.ware, steve.dower, corona10, shihai1991, neonene, erlendaasland
2021-01-07 23:05:41vstinnersetmessageid: <1610060741.83.0.911035522238.issue42846@roundup.psfhosted.org>
2021-01-07 23:05:41vstinnerlinkissue42846 messages
2021-01-07 23:05:41vstinnercreate