Message384618
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. |
|
Date |
User |
Action |
Args |
2021-01-07 23:05:41 | vstinner | set | recipients:
+ vstinner, paul.moore, tim.golden, petr.viktorin, zach.ware, steve.dower, corona10, shihai1991, neonene, erlendaasland |
2021-01-07 23:05:41 | vstinner | set | messageid: <1610060741.83.0.911035522238.issue42846@roundup.psfhosted.org> |
2021-01-07 23:05:41 | vstinner | link | issue42846 messages |
2021-01-07 23:05:41 | vstinner | create | |
|