wsgistraw 0.1.1 Released

2007-08-16 at 18:00 | Posted in devel, lang:en, update | Leave a comment

I’ve released wsgistraw 0.1.1. I’ve added app_proxy, fixed a couple of inconsistencies with PEP 333. Here is the summary of changes:

  • (+) Added public app_proxy class (former _app_proxy, thanks to Ian Bicking)
  • (-) If an app uses write() then app_proxy invokes response.close() after iterating over it
  • (-) If an app hasn’t invoked start_resposnse() before returning then app_proxy forces this invocation by calling response.next()

And that’s how the new app_proxy class works:

class lowercase(object):
    def __init__(self, app):
        self.app = app
    def __call__(self, environ, start_response):
        proxy = wsgistraw.app_proxy(self.app)
        status, headers, response = proxy(environ)
        start_response(status, headers)
        return (s.lower() for s in response)

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: