[Web-SIG] WSGI Open Space @ PyCon.

Jean-Paul Calderone exarkun at divmod.com
Mon Mar 30 02:11:46 CEST 2009

On Sun, 29 Mar 2009 16:21:36 -0700, Robert Brewer <fumanchu at aminus.org> wrote:
>We had a smaller third meeting and answered more issues.

Hi all,

First, thanks for writing up these reports.

> [snip]
>Asynchronous WSGI support
>Mostly non-existent. Fix it? Fork it? Drop it? Glyph seemed to think
>we're really close if we fix wsgi.input.

Those who were present know that I couldn't understand Glyph's proposed
solution.  After the meeting we worked on some details and wrote some
code (completely non-working, not even syntactically correct).

The result looks something like this:

    def application(environ):
        yield "foo"
        yield "bar"
        folders = yield imapFolders()
        for folder in folders:
            yield "Folder:", folder

Where `asyncApp` and `imapFolders` are two functions provided by the
async WSGI container (maybe they're generalizable and can be shared
between different async WSGI containers, or maybe not, I'm not sure

In Twisted's case, `asyncApp` ends up as about 20 lines, which doesn't
seem too bad (I can share it if anyone is interested in the specifics,
it's mostly just gross generator/Deferred mangling stuff).


More information about the Web-SIG mailing list