Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-19 Thread Chris McDonough
On Thu, 2010-09-16 at 05:29 +0200, Roberto De Ioris wrote: About the *.file_wrapper removal, i suggest a PSGI-like approach where 'body' can contains a File Object. def file_app(environ): fd = open('/tmp/pippo.txt', 'r') status = b'200 OK' headers = [(b'Content-type',

Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-19 Thread Ian Bicking
On Sun, Sep 19, 2010 at 11:32 AM, Chris McDonough chr...@plope.com wrote: I propose to write in the PEP that a middleware should provide an app attribute to get the wrapped application or middleware. It seems to be the most common name used out there. We can't really mandate this because

Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-19 Thread Chris McDonough
On Sun, 2010-09-19 at 21:52 -0400, Chris McDonough wrote: I'm -0 on the server trying to guess the Content-Length header. It just doesn't seem like much of a burden to place on an application and it's easier to specify that an application must do this than it is to specify how a server