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 vstinner
Recipients gvanrossum, pitrou, python-dev, vstinner
Date 2013-12-20.09:55:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387533328.06.0.922737653156.issue19967@psf.upfronthosting.co.za>
In-reply-to
Content
> I think this patch is bad and should be reverted. It always calls traceback.format_exception() which is an expensive operation, while the _TracebackLogger takes care to call it only when necessary.

Oh, I didn't notice that, and I agree that the new code is inefficient.

Since the Future object does not release the reference to the exception after result() or exception() has been called, there is no need to preformat the exception. It can be done in the destructor.

Attached asyncio_defer_format_tb.patch implements that.

Future.set_exception() creates a reference cycle. I created the issue #20032 to discuss that.
History
Date User Action Args
2013-12-20 09:55:28vstinnersetrecipients: + vstinner, gvanrossum, pitrou, python-dev
2013-12-20 09:55:28vstinnersetmessageid: <1387533328.06.0.922737653156.issue19967@psf.upfronthosting.co.za>
2013-12-20 09:55:28vstinnerlinkissue19967 messages
2013-12-20 09:55:27vstinnercreate