[Twisted-Python] twisted.protocols.loopback.loopbackTCP(UNIX) is broken

James Y Knight foom at fuhm.net
Mon Feb 27 08:09:41 MST 2006


On Feb 27, 2006, at 8:56 AM, Jean-Paul Calderone wrote:

> On Mon, 27 Feb 2006 17:48:38 +1100, Jonathan Lange <jml at mumak.net>  
> wrote:
>> Hi,
>>
>> loopbackTCP and loopbackUNIX both use spinWhile and spinUntil, which
>> makes them broken.
>
> They were not always based on these two functions.  Someone changed  
> them to work this way after spinWhile and spinUntil were added to  
> trial.
>
>>
>> It appears that they were always meant to block. Why is this? Can we
>> get rid of them?
>
> They should be deprecated in favor of an API which returns a Deferred.

They don't belong in twisted.protocols at all, as they a) aren't  
protocols, and b) are only for writing test cases. Perhaps somewhere  
under twisted.trial would be more appropriate.

James




More information about the Twisted-Python mailing list