[New-bugs-announce] [issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

Nick Coghlan report at bugs.python.org
Thu Mar 7 08:17:43 EST 2019


New submission from Nick Coghlan <ncoghlan at gmail.com>:

https://docs.python.org/3/c-api/init.html#c.Py_EndInterpreter states that "Py_FinalizeEx() will destroy all sub-interpreters that haven’t been explicitly destroyed at that point."

As discussed in https://github.com/hexchat/hexchat/issues/2237, Python 3.7+ doesn't currently do that - it calls Py_FatalError instead.

That change came from https://github.com/python/cpython/pull/1728, which was based on my initial PEP 432 refactoring work, and I didn't realise that implicitly cleaning up lingering subinterpreters was a documented behaviour.

So I think we should just fix it to behave as documented, and add a new regression test to make sure it doesn't get broken again in the future.

----------
keywords: 3.7regression
messages: 337392
nosy: eric.snow, ncoghlan, petr.viktorin
priority: normal
severity: normal
stage: needs patch
status: open
title: Lingering subinterpreters should be implicitly cleared on shutdown
type: crash
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36225>
_______________________________________


More information about the New-bugs-announce mailing list