This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients guijarro, mark.dickinson, nanjekyejoannah, nascheme, pablogsal
Date 2021-10-22.12:51:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634907073.52.0.552255984143.issue45555@roundup.psfhosted.org>
In-reply-to
Content
I don't think this is a bug: there's still a reference to the `A` instance in `sys.exc_info()` (specifically, in the exception traceback) in this case, so that instance is still alive.

If you add an `except: pass` clause to your `try / finally`, you should see that dereferencing the weakref gives `None` in the `finally` clause.
History
Date User Action Args
2021-10-22 12:51:13mark.dickinsonsetrecipients: + mark.dickinson, nascheme, pablogsal, nanjekyejoannah, guijarro
2021-10-22 12:51:13mark.dickinsonsetmessageid: <1634907073.52.0.552255984143.issue45555@roundup.psfhosted.org>
2021-10-22 12:51:13mark.dickinsonlinkissue45555 messages
2021-10-22 12:51:13mark.dickinsoncreate