Re: [Twisted-Python] why can't a callback be called with a deferred?

2019-02-19 Thread Chris Withers
On 19/02/2019 11:41, Adi Roiban wrote: I think it was introduced to catch some common bad usage patterns ... like yours :) Not a massively helpful comment. If you want to chain the deferreds, use the dedicated helper

Re: [Twisted-Python] why can't a callback be called with a deferred?

2019-02-19 Thread Adi Roiban
On Tue, 19 Feb 2019 at 11:01, Chris Withers wrote: > > Hi All, > > There's this assert: > > https://github.com/twisted/twisted/blob/trunk/src/twisted/internet/defer.py#L459 > > ...and I'd like to understand why it's there. [snip] > Unfortunately, the commit that introduced that assert is just a

[Twisted-Python] why can't a callback be called with a deferred?

2019-02-19 Thread Chris Withers
Hi All, There's this assert: https://github.com/twisted/twisted/blob/trunk/src/twisted/internet/defer.py#L459 ...and I'd like to understand why it's there. I have what feels like a legitimate case where that assert trips me up, as I'd like to change this line: