Re: [Paste] WebOb, exceptions and 2.4

Top Page
Author: Ian Bicking
Date:  
To: Mark Ramm
CC: paste-users
Subject: Re: [Paste] WebOb, exceptions and 2.4
Sorry I haven't gotten back to you about this stuff earlier; my computer
went down and I'm just now getting back up.

Mark Ramm wrote:
> I made a very small change to HTTPException that helped me get nearly
> all the pylons tests running on trunk. Obviously this isn't the
> right way to solve the larger problem, but I think it does point us in
> the right direction. Basically I added these two lines to
> HTTPException's __init__ method:
>
> self.headers = self.wsgi_response.headers
> self.set_cookie=self.wsgi_response.set_cookie
>
> That way when Pylons tries to set the headers or throw some cookie
> information on the HTTPException instance, it just works.
>
> Seems like a little bit of __getattr__ trickery and we can expose
> pretty much all of the expected API.


Yeah, I was thinking about that too. That could certainly go in WebOb.

I gave a first run at it in the trunk just now (r7196). But I don't
have a Python 2.4 test rig currently, so I only know it doesn't break
Python 2.5 (though actually everything is basically commented out for
Python 2.5, so "not breaking" doesn't say much).

Can you test this out?

   Ian

_______________________________________________
Paste-users mailing list
Paste-users@???
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users