Future.__del__
logs ignored exceptions during interpreter shutdown
#8500
Labels
bug
Something is broken
While I don't have a reproducer, multiple users have reported seeing many logs about
Future.__del__
ignoring exceptions during interpreter shutdown. #8449 was supposed to address this, but it failed to do so:Before #8449
After #8449
From what I understand, this fails because of this caveat: https://github.com/python/cpython/blob/e39ae6bef2c357a88e232dcab2e4b4c0f367544b/Doc/c-api/init.rst#L403-L405
Empirically, we can fix the
Future.__del__
problem by bindingsys.is_finalizing
to a class variable which will avoid its destruction. However, I assume thatis_python_shutting_down
has a similar problem. While this issue isn't urgent, the chattiness is annoying and might distract from genuine issues on shutdown.The text was updated successfully, but these errors were encountered: