[twill] Twill and Django incompatibility?

Titus Brown titus at caltech.edu
Tue Dec 4 01:31:25 PST 2007


Antti -- fixed in twill-latest.  I was double-calling the iterator in
certain situations.

thank you!

cheers,
--titus

Kumar, this is a bug in wsgi_intercept: code should look like this:

271c271,273
<                 for data in self.result:
---
>
>                 while 1:
>                     data = self.result.next()
272a275
>

On Tue, Dec 04, 2007 at 12:34:47AM +0200, Antti Kaihola wrote:
-> I tried old versions of twill, and it seemed to work correctly in 0.8.4, 
-> but version 0.8.5 introduced this duplicating behavior. I can see that 
-> the application result reading mechanism was heavily modified at that point.
-> 
-> Here are relevant snippets of the source for your convenience.
-> 
-> twill 0.8.4: wsgi_intercept.wsgi_fake_socket.makefile()
-> http://dpaste.com/hold/26661/
-> 
-> twill 0.8.5: wsgi_intercept.wsgi_fake_socket.makefile()
-> http://dpaste.com/hold/26662/
-> 
-> diff between the two:
-> http://dpaste.com/hold/26663/
-> 
-> 
-> Antti Kaihola wrote a moment ago:
-> >Hi,
-> >
-> >
-> >I'm desperately trying to get twill to work together with Django using
-> >twill's WSGI intercepting.
-> >
-> >The problem is, I always get the content of the page concatenated
-> >twice together. I've debugged and narrowed down the problem so it must
-> >be either in twill.wsgi_intercept.wsgi_fake_socket.makefile() or
-> >django.core.handlers.wsgi.WSGIHandler.__call__(). I just don't
-> >understand WSGI well enough to tell which one is misbehaving.



More information about the twill mailing list