summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyramid/testing.py2
-rw-r--r--pyramid/view.py9
2 files changed, 2 insertions, 9 deletions
diff --git a/pyramid/testing.py b/pyramid/testing.py
index 14432b01f..3cb5d17b9 100644
--- a/pyramid/testing.py
+++ b/pyramid/testing.py
@@ -41,6 +41,7 @@ from pyramid.i18n import LocalizerRequestMixin
from pyramid.request import CallbackMethodsMixin
from pyramid.url import URLMethodsMixin
from pyramid.util import InstancePropertyMixin
+from pyramid.view import ViewMethodsMixin
_marker = object()
@@ -293,6 +294,7 @@ class DummyRequest(
LocalizerRequestMixin,
AuthenticationAPIMixin,
AuthorizationAPIMixin,
+ ViewMethodsMixin,
):
""" A DummyRequest object (incompletely) imitates a :term:`request` object.
diff --git a/pyramid/view.py b/pyramid/view.py
index 2966b0a50..822fb29d6 100644
--- a/pyramid/view.py
+++ b/pyramid/view.py
@@ -602,15 +602,6 @@ class ViewMethodsMixin(object):
context_iface = providedBy(exc_info[0])
view_name = attrs.get('view_name', '')
- # WARNING: do not assign the result of sys.exc_info() to a local
- # var here, doing so will cause a leak. We used to actually
- # explicitly delete both "exception" and "exc_info" from ``attrs``
- # in a ``finally:`` clause below, but now we do not because these
- # attributes are useful to upstream tweens. This actually still
- # apparently causes a reference cycle, but it is broken
- # successfully by the garbage collector (see
- # https://github.com/Pylons/pyramid/issues/1223).
-
# clear old generated request.response, if any; it may
# have been mutated by the view, and its state is not
# sane (e.g. caching headers)