WebOb BaseRequest

0 views
Skip to first unread message

Ian Bicking

unread,
Nov 3, 2009, 3:28:07 PM11/3/09
to Paste Users, Chris McDonough
(Mostly for Sergey, since he's moving stuff around...)

I pulled Chris McDonough's change to have a BaseRequest/Request class
distinction, with BaseRequest just pulling out __getattr__/__setattr__
from Request. I mentioned before that I'd rather not have lots of
classes, but in this case there's a performance argument for pulling
out this functionality, and it's not easy to resolve except with a
class hierarchy. If that setattr stuff wasn't as annoying an
unperformant as it is, I probably would have been much more stubborn
about it. The other part of WebOb that might be
complicated-in-a-way-that-can-bite is how req.POST (and req.body, etc)
are handled. There's not a naive approach that I'm particularly happy
about, but I'm open to suggestions (where BaseRequest would use a very
naive approach, and Request would use the current approach which tries
to keep the body in tact for a bunch of situations).

--
Ian Bicking | http://blog.ianbicking.org | http://topplabs.org/civichacker

Reply all
Reply to author
Forward
0 new messages