Message 410866 - Python tracker

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.

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.