Chris McDonough <chr...@plope.com> added the comment:

The case this that eagerly unwinding the app_iter is trying to defend against 
is (as 
you probably know) this one:

    def someapp(environ, start_response):
         start_response('200 OK', [... headers ...])
         for item in listofbytes:
             yield item

The pattern of calling start_response during the first iteration is, IMO, 
insane and 
supporting is is only a courtesty/kindness.  Unwinding every iterator from 
every 
arbitrary downstream applications just in case someone does this, in my 
estimation at least, will cause more problems (resource exhaustion) for people 
who never do this more than not doing it will cause problems for people that 
use 
this pattern.   You're right that someone could return a generator that streams 
and 
exhaust RAM that way but if it's consistency we're after, I'll just rip it out 
instead.

__________________________________
Repoze Bugs <b...@bugs.repoze.org>
<http://bugs.repoze.org/issue179>
__________________________________
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to