[Web-SIG] reorg of web-related modules for Python 3K
Ian Bicking
ianb at colorstudy.com
Mon Feb 4 18:07:08 CET 2008
Bill Janssen wrote:
>> I think WSGI is a better interface than any of these. BaseHTTPServer is
>> a reasonable basis for building a server (wsgiref.simple_server and
>> other's use it), but the subclasses are a little funky IMHO. Giving
>> them the name http.server makes them seem like the Right Solution, and I
>> don't think they are. They're more like server-building tools.
>
> Yes, these classes are quite old, and have been updated only patchily
> over the years. I don't use them, either. But I guess the question
> is whether wsgiref.* is a better _implementation_ than any of these.
> We don't really have interfaces in Python.
wsgiref.simple_server actually uses BaseHTTPServer, so the
implementations are tied. wsgiref.simple_server is a much better API
than BaseHTTPServer. Even then, wsgiref.simple_server isn't the only
server based on BaseHTTPServer, so it's not without some use as an
abstract base class for servers. It's just not a useful base class for
applications.
Ian
More information about the Web-SIG
mailing list