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 erlendaasland, petr.viktorin, shihai1991, vstinner
Date 2022-01-18.13:58:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642514337.76.0.937963974418.issue46417@roundup.psfhosted.org>
In-reply-to
Content
> If we have static types, that means there is a mechanism to share some objects across interpreters.

Sharing objects between interpreters is bad and is causing complex bugs. See a recent example of an object traveling from one interpreter to another and then causing a random crash on Windows related to the garbage collector:

* https://bugs.python.org/issue46070
* https://github.com/python/cpython/pull/30577#pullrequestreview-852106207


> And if that's the case, why can't small ints (like sys.float_info.n_unnamed_fields) be static & shared as well?

I would prefer to discuss that in other issues like bpo-40255 or bpo-39511, and focus this issue on fixing the static types implementation when Python is embedded in an application.

--

Hum, this issue is not really related to sub-interpreters. My proposed PR only  changes Py_Finalize(): the main interpreter.
History
Date User Action Args
2022-01-18 13:58:57vstinnersetrecipients: + vstinner, petr.viktorin, shihai1991, erlendaasland
2022-01-18 13:58:57vstinnersetmessageid: <1642514337.76.0.937963974418.issue46417@roundup.psfhosted.org>
2022-01-18 13:58:57vstinnerlinkissue46417 messages
2022-01-18 13:58:57vstinnercreate