> This is great news!  I was basically waiting on this to move forward with
> trying some Identity replacement stuff. (Hard to throw a 401 "exception"
> when exception handling is borked :)

Sure, WebOb Response objects are new style classes, so they can't be
used as exceptions on python 2.4.

WebOb has long had a .exception property on all the "exceptions" which
generates a 2.4 style HTTPException, so we could use that for
backwards compatibility.  The HTTPException had a wsgi_response object
in it that was the original exception, and it proxied __call__ to the
wsgi_response's __call__ so that you could call the exception like any
other WSGI app.   But it was missing all of the properties that one
would expect from a Response object (headers, and all that stuff).
Basically I suggested to ian that we throw some __getattr__ and
__setattr__ magic on the HTTPException object so that it would proxy
through to ALL of the wsgi_response object's properties.

The means you can now always call HTTPFound().exception  and get back
a WSGI callable with the full Response object API.

You can't count on the Exception granularity that we could if we just
used the 2.5 exception classes directly, everything comes back as an
HTTPException, but that's been good enough to get everything workin so
far, particularly because you can poke at the Response object's
properties and handle different response codes differently...

--Mark Ramm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to