summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-06-11 03:38:20 +0000
committerChris McDonough <chrism@agendaless.com>2009-06-11 03:38:20 +0000
commit412736e783651f21446e62d2406541c9dfc66342 (patch)
treefc0d10348f432a59d722e3df692218e16598efda
parentdfc2b65c1b6d2f938f68b7868a14d8f9a4faab9e (diff)
downloadpyramid-412736e783651f21446e62d2406541c9dfc66342.tar.gz
pyramid-412736e783651f21446e62d2406541c9dfc66342.tar.bz2
pyramid-412736e783651f21446e62d2406541c9dfc66342.zip
We control the horizontal and vertical of request generation now, so there's
no purpose in trying to account for non-Webob requests.
-rw-r--r--repoze/bfg/router.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/repoze/bfg/router.py b/repoze/bfg/router.py
index d8a55fe7b..c103d8426 100644
--- a/repoze/bfg/router.py
+++ b/repoze/bfg/router.py
@@ -1,6 +1,5 @@
from cgi import escape
import sys
-from webob import Request as WebObRequest
from webob import Response
from zope.component.event import dispatch
@@ -158,21 +157,12 @@ class Router(object):
tdict['traversed'], tdict['virtual_root'],
tdict['virtual_root_path'])
- if isinstance(request, WebObRequest):
- # webob.Request's __setattr__ (as of 0.9.5 and lower)
- # is a bottleneck; if we're sure we're using a
- # webob.Request, go around its back and set stuff into
- # the environ directly
- attrs = environ.setdefault('webob.adhoc_attrs', {})
- attrs.update(tdict)
- else:
- request.root = root
- request.context = context
- request.view_name = view_name
- request.subpath = subpath
- request.traversed = traversed
- request.virtual_root = vroot
- request.virtual_root_path = vroot_path
+ # webob.Request's __setattr__ (as of 0.9.5 and lower) is a
+ # bottleneck; since we're sure we're using a
+ # webob.Request, we can go around its back and set stuff
+ # into the environ directly
+ attrs = environ.setdefault('webob.adhoc_attrs', {})
+ attrs.update(tdict)
def respond(response, view_name):
registry.has_listeners and registry.notify(