[Twisted-Python] deferred graph?

Andrew Bennetts andrew at bemusement.org
Mon Jul 16 19:20:23 EDT 2012

Dan Stromberg wrote:
> I'm playing with twisted.internet.defer.setDebugging now.
> Is there a corresponding function that can be used to produce its report?
> If I use it in a program with an infinite loop, it seems like I never get
> the report, but if I use it in a program with a finite length, I eventually
> get a useful-looking report.

It's triggered by garbage collection of a Deferred with an unhandled error.  So
you're at the mercy of when the garbage collector of your Python VM decides to
collect that object.

You could call yourDeferred._debugInfo._getDebugTracebacks() yourself, though,
if you don't mind (ab)using private attributes that might break without warning.


More information about the Twisted-Python mailing list