[Web-SIG] [python-tulip] Re: [Python-Dev] wsgi validator with asynchronous handlers/servers

PJ Eby pje at telecommunity.com
Sun Apr 28 00:21:31 CEST 2013


On Sat, Apr 27, 2013 at 1:24 AM, Graham Dumpleton
<graham.dumpleton at gmail.com> wrote:
> I described a different way of doing WSGI which would better cope with post
> response hooks at the Python Web Summit at PyCon in 2012. It made use of the
> context manager abstraction so it wouldn't screw with the returned iterable.
>
> http://www.slideshare.net/GrahamDumpleton/pycon-us-2012-state-of-wsgi-2-14808297

Also, wsgi_lite provides a way of registering resources to be closed
post-response, that works within WSGI 1.0, also without altering the
returned iterable:

  https://bitbucket.org/pje/wsgi_lite#close-and-resource-cleanups

Although wsgi_lite provides programmatic support for this, it's
internally implemented as a stock WSGI extension key
('wsgi_lite.closing') in the environ, and can be offered today by
servers or middleware in a 1.0 environment.  I just haven't gotten
around to knocking out a PEP for it.


More information about the Web-SIG mailing list