[Web-SIG] PEP222 and python on the server?

Ian Bicking ianb at colorstudy.com
Wed Jun 8 17:26:47 CEST 2005

Iwan Vosloo wrote:
> I see that PEP222 has status of deferred.  Is anyone still interested
> in getting this done, or working on it?
> The naive summary of PEP222 is that it adds standardised Request and
> Response objects to the standard Python library.
> I think this is an extremely dire need since every web framework in
> Python is currently rolling their own (I'm doing a study of 40 such
> beasts in Python and another 40 in Java).  The really bad news IMO
> regarding this lack is not the fact that each Python framework rolls
> their own, but that, if they want to integrate with one another, they
> have to provide kludging mappings between their respective
> project-specific Request and Response types.

I think this is made obsolete by WSGI -- even though it doesn't call 
them request and response, WSGI does create those objects.  The request 
is a dictionary, well specified in the spec, and the response is a 
protocol (start_response(status, headers) -> return body).

I believe as long as the WSGI dictionary can be extracted from framework 
request objects, and that creation of framework request objects is 
deferred as long as possible during the processing of a request, that 
the WSGI dictionary is a reasonable standard object.

Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org

More information about the Web-SIG mailing list