New submission from Nick Coghlan <ncogh...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue36225>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to