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 emilyemorehouse, eric.snow, ncoghlan, pitrou, vstinner
Date 2020-05-15.01:51:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589507509.03.0.628601391814.issue33607@roundup.psfhosted.org>
In-reply-to
Content
I see two options:

* Add a field to PyObject, but only in a special debug mode. Maybe not even in Py_DEBUG (since I managed to make Py_DEBUG ABI-compatible with the release mode!)

* Add an hash table mapping an object to its interpreter. The hash table would only be used in debug mode. It may even be turned on at runtime depending on a command line option or something else.

See also bpo-40514: [subinterpreters] Add --experimental-isolated-subinterpreters build option.


Antoine: "Can I ask why you're considering this?  I thought you didn't want to transfer ownership between interpreters."

I guess that the purpose is to ensure that: detect when an object is shared between two interpreters.

Currently, tons of objects are still shared between interpreters. Starting with static types: see bpo-40601 "[C API] Hide static types from the limited C API".
History
Date User Action Args
2020-05-15 01:51:49vstinnersetrecipients: + vstinner, ncoghlan, pitrou, eric.snow, emilyemorehouse
2020-05-15 01:51:49vstinnersetmessageid: <1589507509.03.0.628601391814.issue33607@roundup.psfhosted.org>
2020-05-15 01:51:49vstinnerlinkissue33607 messages
2020-05-15 01:51:48vstinnercreate