On Dec 4, 2007 3:31 AM, Titus Brown <[EMAIL PROTECTED]> wrote:
> 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

Ack, ok, thanks.  I just finished replying to the django list about this.

It kinda looks like the new version might have the result.next() code
in it.  Antti, can you try installing the wsgi_intercept standalone
module to see if the error still happens?

easy_install wsgi_intercept should do it, but then I think you'll need
to obfuscate your local twill copy somehow (or move it aside
temporarily).  In case you find that certain methods or modules don't
exist, take a look at the usage examples:
http://code.google.com/p/wsgi-intercept/

-Kumar



> >
>
> 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.
>

_______________________________________________
twill mailing list
twill@lists.idyll.org
http://lists.idyll.org/listinfo/twill

Reply via email to