New submission from neonene <nicesal...@gmail.com>:
After https://github.com/python/cpython/commit/0b858cdd5d114f0890b11b6c4d6559d0ceb468ab (bpo-1635741: Convert _multibytecodec to multi-phase init), On Windows x64/x86 with chinese/japanese/korean system-locale, MultibyteCodec_Check() in multibytecodec.c returns false and PyExc_TypeError follows. This affects some tests and PGO training. 1) python -m test --verbose test_threading ====================================================================== FAIL: test_daemon_threads_fatal_error (test.test_threading.SubinterpThreadi ngTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cpython-0b858\lib\test\test_threading.py", line 1124, in test_da emon_threads_fatal_error self.assertIn("Fatal Python error: Py_EndInterpreter: " AssertionError: 'Fatal Python error: Py_EndInterpreter: not the last thread ' not found in 'TypeError: codec is unexpected type\nFatal Python error: _P yThreadState_Delete: tstate 00000000003FF980 is still current\nPython runti me state: initialized\n\nThread 0x00000710 (most recent call first):\n<no P ython frame>\n' 2) python -m test --verbose test_embed ====================================================================== FAIL: test_audit_subinterpreter (test.test_embed.AuditingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cpython-0b858\lib\test\test_embed.py", line 1433, in test_audit_ subinterpreter self.run_embedded_interpreter("test_audit_subinterpreter") File "C:\cpython-0b858\lib\test\test_embed.py", line 104, in run_embedded _interpreter self.assertEqual(p.returncode, returncode, AssertionError: 3221225477 != 0 : bad returncode 3221225477, stderr is 'Typ eError: codec is unexpected type\nFatal Python error: _PyThreadState_Delete : tstate 000000000050CAF0 is still current\nPython runtime state: initializ ed\n\nThread 0x000009d8 (most recent call first):\n<no Python frame>\n' ====================================================================== FAIL: test_subinterps_different_ids (test.test_embed.EmbeddingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cpython-0b858\lib\test\test_embed.py", line 169, in test_subinte rps_different_ids for run in self.run_repeated_init_and_subinterpreters(): File "C:\cpython-0b858\lib\test\test_embed.py", line 110, in run_repeated _init_and_subinterpreters out, err = self.run_embedded_interpreter("test_repeated_init_and_subint erpreters") File "C:\cpython-0b858\lib\test\test_embed.py", line 104, in run_embedded _interpreter self.assertEqual(p.returncode, returncode, AssertionError: 3221225477 != 0 : bad returncode 3221225477, stderr is 'Typ eError: codec is unexpected type\nFatal Python error: _PyThreadState_Delete : tstate 000000000041C960 is still current\nPython runtime state: initializ ed\n\nThread 0x00000a40 (most recent call first):\n<no Python frame>\n' ====================================================================== FAIL: test_subinterps_distinct_state (test.test_embed.EmbeddingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cpython-0b858\lib\test\test_embed.py", line 177, in test_subinte rps_distinct_state for run in self.run_repeated_init_and_subinterpreters(): File "C:\cpython-0b858\lib\test\test_embed.py", line 110, in run_repeated _init_and_subinterpreters out, err = self.run_embedded_interpreter("test_repeated_init_and_subint erpreters") File "C:\cpython-0b858\lib\test\test_embed.py", line 104, in run_embedded _interpreter self.assertEqual(p.returncode, returncode, AssertionError: 3221225477 != 0 : bad returncode 3221225477, stderr is 'Typ eError: codec is unexpected type\nFatal Python error: _PyThreadState_Delete : tstate 000000000047C960 is still current\nPython runtime state: initializ ed\n\nThread 0x00000b34 (most recent call first):\n<no Python frame>\n' ====================================================================== FAIL: test_subinterps_main (test.test_embed.EmbeddingTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cpython-0b858\lib\test\test_embed.py", line 163, in test_subinte rps_main for run in self.run_repeated_init_and_subinterpreters(): File "C:\cpython-0b858\lib\test\test_embed.py", line 110, in run_repeated _init_and_subinterpreters out, err = self.run_embedded_interpreter("test_repeated_init_and_subint erpreters") File "C:\cpython-0b858\lib\test\test_embed.py", line 104, in run_embedded _interpreter self.assertEqual(p.returncode, returncode, AssertionError: 3221225477 != 0 : bad returncode 3221225477, stderr is 'Typ eError: codec is unexpected type\nFatal Python error: _PyThreadState_Delete : tstate 000000000032C960 is still current\nPython runtime state: initializ ed\n\nThread 0x00000bf0 (most recent call first):\n<no Python frame>\n' ---------- components: Extension Modules, Subinterpreters, Tests, Windows messages: 384541 nosy: corona10, erlendaasland, neonene, paul.moore, petr.viktorin, shihai1991, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: Using _multibytecodec module on Windows, test_threading/embed get failure type: behavior versions: Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42846> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com