[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-11-14 Thread Hai Shi
Hai Shi added the comment: OK,thanks. If it's just only interal calling, I don't think throwing a exception would break anything. As your pasted code shows, the modules have judeged the tp_name is inited or not. -- ___ Python tracker

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-11-09 Thread junyixie
junyixie added the comment: Include/internal/pycore_structseq.h: 10 11 12: PyAPI_FUNC(int) _PyStructSequence_InitType( 13 PyTypeObject *type, 14 PyStructSequence_Desc *desc, Modules/_cursesmodule.c: 4794 /* ncurses_version */ 4795 if

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-10-20 Thread Hai Shi
Hai Shi added the comment: > In _PyStructSequence_InitType, it will check type is initialized. It's a internal C API :) > when type already been initialized, should return 0 rather than throw > exception. The another solution is to check the type status before calling

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-06-29 Thread junyixie
Change by junyixie : -- keywords: +patch pull_requests: +25516 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26949 ___ Python tracker ___

[issue44532] multi subinterpreters use _PyStructSequence_InitType failed.

2021-06-29 Thread junyixie
New submission from junyixie : In _PyStructSequence_InitType, it will check type is initialized. but when we have multi subinterpreters, type may be initialized expected. when type already been initialized, should return 0 rather than throw exception. ```c /* PyTypeObject has already been