Commits

Sergey Schetinin committed e56e9f2

do not set resp.request in req.get_response(app), warn when passing request to Response(..)

Comments (0)

Files changed (2)

             status, headers, app_iter = self.call_application(
                 application, catch_exc_info=False)
         return self.ResponseClass(
-            status=status, headerlist=list(headers), app_iter=app_iter,
-            request=self)
+            status=status,
+            headerlist=list(headers),
+            app_iter=app_iter
+        )
 
     @classmethod
     def blank(cls, path, environ=None, base_url=None,

webob/response.py

             self._headerlist = headerlist
         self._headers = None
         if request is not None:
+            _warn_req()
             if hasattr(request, 'environ'):
                 self._environ = request.environ
                 self._request = request