[Python-Dev] [Web-SIG] Adding wsgiref to stdlib

Ian Bicking ianb at colorstudy.com
Fri Apr 28 23:04:28 CEST 2006


Phillip J. Eby wrote:
> At 01:19 PM 4/28/2006 -0700, Guido van Rossum wrote:
> 
>> It still looks like an application of WSGI, not part of a reference
>> implementation. Multiple apps looks like an advanced topic to me; more
>> something that the infrastructure (Apache server or whatever) ought to
>> take care of.
> 
> 
> I'm fine with a super-simple implementation that emphasizes the concept, 
> not feature-richness.  A simple dict-based implementation showcases both 
> the wsgiref function for path shifting, and the idea of composing an 
> application out of mini-applications.  (The point is to demonstrate how 
> people can compose WSGI applications *without* needing a framework.)
> 
> But I don't think that this demo should be a prefix mapper; people doing 
> more sophisticated routing can use Paste or Routes.

I don't see why not to use prefix matching.  It is more consistent with 
the handling of the default application ('', instead of a method that 
needs to be overridden), and more general, and the algorithm is only 
barely more complex and not what I'd call sophisticated.  The default 
application handling in particular means that AppMap isn't really useful 
without subclassing or assigning to .default.

Prefix matching wouldn't show off anything else in wsgiref, because 
there's nothing else to use; paste.urlmap doesn't use any other part of 
Paste either (except one unimportant exception) because there's just no 
need.


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


More information about the Python-Dev mailing list