[Python-Dev] [Web-SIG] Adding wsgiref to stdlib
Phillip J. Eby
pje at telecommunity.com
Sat Apr 29 01:57:33 CEST 2006
At 04:34 PM 4/28/2006 -0700, Titus Brown wrote:
>Hi, Phillip,
>
>I'm getting this error when I run the tests, with both Python 2.3 and
>2.4:
>
>======================================================================
>FAIL: testHeaderFormats (wsgiref.tests.test_handlers.HandlerTests)
>----------------------------------------------------------------------
>Traceback (most recent call last):
> File "/disk/u/t/dev/misc/wsgiref/src/wsgiref/tests/test_handlers.py",
> line 205, in testHeaderFormats
> (stdpat%(version,sw), h.stdout.getvalue())
>AssertionError: ('HTTP/1.0 200 OK\\r\\nDate: \\w{3} \\w{3} [ 0123]\\d
>\\d\\d:\\d\\d:\\d\\d \\d{4}\\r\\nServer: FooBar/1.0\r\nContent-Length:
>0\\r\\n\\r\\n', 'HTTP/1.0 200 OK\r\nDate: Fri, 28 Apr 2006 23:28:11
>GMT\r\nServer: FooBar/1.0\r\nContent-Length: 0\r\n\r\n')
>
>----------------------------------------------------------------------
This is probably due to Guido's patch to make the Date: header more RFC
compliant. I'll take a look at it this weekend.
>On a separate note, what are you actually proposing to include? It'd be
>good to remove the TODO list, for example, unless those are things To Be
>Done before adding it into Python 2.5.
Well, it looks like the "validate" bit will be going in, and we're talking
about what to put in "router", so that'll take care of half the list right
there. :)
The other two items can wait, unless somebody wants to contribute them.
>Will it be added as 'wsgi' or 'wsgiref?
I assumed it would be wsgiref, which would allow compatibility with
existing code that uses it.
>I'd also personally suggest putting anything intended for common use
>directly under the top level, i.e.
>
> wsgiref.WSGIServer
>
>vs
>
> wsgiref.simple_server.WSGIServer
I'm against this, because it would force the handlers and simple_server
modules to be imported, even for programs not using them.
>And, finally, is there any documentation?
Only the docstrings. Contributions are more than welcome.
More information about the Python-Dev
mailing list