From 1646770c4eee27f37e53dcb50f8a271d5c278abf Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Oct 2009 23:07:48 +0000 Subject: - The ``repoze.bfg.request.Request`` class, which is a subclass of ``webob.Request`` now defines its own ``__setattr__``, ``__getattr__`` and ``__delattr__`` methods, which override the default WebOb behavior. The default WebOb behavior stores attributes of the request in ``self.environ['webob.adhoc_attrs']``, and retrieves them from that dictionary during a ``__getattr__``. This behavior was undesirable for speed and "expectation" reasons. Now attributes of the ``request`` are stored in ``request.__dict__`` (as you otherwise might expect from an object that did not override these methods). - The router no longer calls ``repoze.bfg.traversal._traverse`` and does its work "inline" (speed). --- repoze/bfg/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'repoze/bfg/view.py') diff --git a/repoze/bfg/view.py b/repoze/bfg/view.py index 603992551..09a434f7e 100644 --- a/repoze/bfg/view.py +++ b/repoze/bfg/view.py @@ -531,7 +531,7 @@ def rendered_response(renderer, response, view, context,request, renderer_name): 'context':context, 'request':request}) response_factory = queryUtility(IResponseFactory, default=Response) response = response_factory(result) - attrs = request.environ.get('webob.adhoc_attrs', {}) + attrs = request.__dict__ content_type = attrs.get('response_content_type', None) if content_type is not None: response.content_type = content_type -- cgit v1.2.3