[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2013-12-17 Thread Tres Seaver
Tres Seaver added the comment: Released w/ 1.4. -- status: chatting -> resolved __ Repoze Bugs __ ___ Repoze-dev mailing list Repoze-dev@lists.

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Chris McDonough
Chris McDonough added the comment: Grr. Let's try that URL again. __ Repoze Bugs __ __

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Chris McDonough
Chris McDonough added the comment: https://github.com/repoze/repoze.profile/commit/8fa63f072de5b14a6b8e4ccf5f78e98 a62d6cfdc has the change. Does that work for you? __ Repoze Bugs __

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Chris McDonough
Chris McDonough added the comment: That's a good idea. I'll just take out the generator check entirely, and put in a knob. __ Repoze Bugs __ ___ Repoz

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Graham Dumpleton
Graham Dumpleton added the comment: Or have it check a WSGI environ flag to modify behaviour as to whether consume flatten iterable/generator. I would rather not have to modify code every time if you are going to make it so doesn't track iterable/generator and close() call. I can leave with

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Chris McDonough
Chris McDonough 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: yi

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Graham Dumpleton
Graham Dumpleton added the comment: I would say that using: def __iter__(self): for item in self.generator: yield item would be a fairly common recipe for implementing WSGI middleware wrappers wouldn't it. The generator which is wrapped by this could just as well be c

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-30 Thread Chris McDonough
Chris McDonough added the comment: Hi Graham, The intent here is to only unwind generators because they may be calling start_response() as a side effect of the first iteration. While other iterables might do that, I think they can lose, because this case is fairly uncommon, and the only s

[Repoze-dev] [issue179] respoze.profile doesn't handle WSGI iterables properly.

2011-09-19 Thread Graham Dumpleton
New submission from Graham Dumpleton : In: http://bugs.repoze.org/issue169 Tres said: """ Thanks for the report! I agree that your suggested solution is probably the correct one, with the exception that I would have it apply 'list()' only for results which were generators: hmm, how do I dete