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 yselivanov
Recipients gvanrossum, jinty, r.david.murray, vstinner, yselivanov
Date 2015-10-27.17:37:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445967448.69.0.27630794002.issue25489@psf.upfronthosting.co.za>
In-reply-to
Content
> No, you are talking about *all* exceptions, since they all descend from BaseException.  Python's normal __del__ handling just prints the ignored exception to stdout, even if it is a BaseException.  Why should asyncio be different (other than logging it instead, which would be useful)?

My bad -- my current patch does indeed re-raise all exceptions.  But would you be OK with something like this:

        def __del__():
            ...

            try:
                self._loop.call_exception_handler(context)
            except Exception as ex:
                # log or re-raise
                logger.log(...)
            except BaseException as ex:
                logger.error(
                    'BaseException in Future.__del__, will be re-raised soon',
                    exc_info=True)
                def throw():
                    raise ex
                self._loop.call_soon(throw)
History
Date User Action Args
2015-10-27 17:37:28yselivanovsetrecipients: + yselivanov, gvanrossum, vstinner, r.david.murray, jinty
2015-10-27 17:37:28yselivanovsetmessageid: <1445967448.69.0.27630794002.issue25489@psf.upfronthosting.co.za>
2015-10-27 17:37:28yselivanovlinkissue25489 messages
2015-10-27 17:37:28yselivanovcreate