STINNER Victor <vstin...@python.org> added the comment:
Oh. In _PyUnicode_FromId(), I made the assumption that _PyRuntime is left unchanged when Py_Initialize()Py_Finalize() is called multiple times. But I was wrong, it is always reset to zero. So I wrote PR 24193 to explicitly save/restore _PyRuntime.unicode_ids.next_index value. Using PR 24193, msg384761 example displays "Works" instead of failing with a Python fatal error. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42882> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com