From 9dc5702932a0031bc4fb5473f2cdccffc61dbe30 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 18 Mar 2013 11:22:43 +0100 Subject: Fixed #19456 -- Avoid infinite recursion when tracing LazyObject.__init__. Thanks blaze33 for the patch. --- django/utils/functional.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'django') diff --git a/django/utils/functional.py b/django/utils/functional.py index f19a46aa3a..13aec9cb82 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -222,6 +222,10 @@ class LazyObject(object): By subclassing, you have the opportunity to intercept and alter the instantiation. If you don't need to do that, use SimpleLazyObject. """ + + # Avoid infinite recursion when tracing __init__ (#19456). + _wrapped = None + def __init__(self): self._wrapped = empty -- cgit v1.3