Author ncoghlan
Recipients eric.snow, nanjekyejoannah, ncoghlan, petr.viktorin
Date 2019-03-30.12:09:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553947747.73.0.238759627809.issue36225@roundup.psfhosted.org>
In-reply-to
Content
I think test_embed would be the right home for this, as there's an existing test case there for subinterpreter lifecycles and repeated init/finalize cycles: https://github.com/python/cpython/blob/ddbb978e1065dde21d1662386b26ded359f4b16e/Programs/_testembed.c#L43

The test case here would be similar, but it wouldn't need the outer loop - it would just create a handful of subinterpreters, but instead of ending each one before creating the next one the way the existing test does, what it would instead do is:

* setup as per the existing test case
* create a pair of subinterpeters, using a copy of the existing loop, but omitting the `Py_EndInterpreter` call
* switch back to the main interpreter
* create a second pair of subinterpeters
* switch back to the main interpreter
* call Py_Finalize

It also occurs to me that we don't currently have a test case for what happens if you call Py_Finalize from a subinterpreter rather than the main interpreter.
History
Date User Action Args
2019-03-30 12:09:07ncoghlansetrecipients: + ncoghlan, petr.viktorin, eric.snow, nanjekyejoannah
2019-03-30 12:09:07ncoghlansetmessageid: <1553947747.73.0.238759627809.issue36225@roundup.psfhosted.org>
2019-03-30 12:09:07ncoghlanlinkissue36225 messages
2019-03-30 12:09:07ncoghlancreate