Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
exit()"""
stdout, stderr = repl.communicate(script)
self.assertIsNone(stderr)
- self.assertIn(b"remaining subinterpreters", stdout)
+ self.assertIn(b"Interpreter.close()", stdout)
self.assertNotIn(b"Traceback", stdout)
@support.requires_subprocess()
--- /dev/null
+Suggest using :meth:`concurrent.interpreters.Interpreter.close` instead of the
+private ``_interpreters.destroy`` function when warning about remaining subinterpreters.
+Patch by Sergey Miryanov.
(void)PyErr_WarnEx(
PyExc_RuntimeWarning,
"remaining subinterpreters; "
- "destroy them with _interpreters.destroy()",
+ "close them with Interpreter.close()",
0);
/* Swap out the current tstate, which we know must belong