Disable cache support of LazyProxy.
Since Babel 1.0, there's a enable_cache keyword argument of LazyProxy, but we can't pass it directly.
This commit is contained in:
parent
874439bd80
commit
15c3461b1f
@ -53,9 +53,9 @@ class ReallyLazyProxy(LazyProxy):
|
|||||||
"""
|
"""
|
||||||
Like LazyProxy, except that it doesn't cache the value ;)
|
Like LazyProxy, except that it doesn't cache the value ;)
|
||||||
"""
|
"""
|
||||||
@property
|
def __init__(self, func, *args, **kwargs):
|
||||||
def value(self):
|
super(ReallyLazyProxy, self).__init__(func, *args, **kwargs)
|
||||||
return self._func(*self._args, **self._kwargs)
|
object.__setattr__(self, '_is_cache_enabled', False)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<%s for %s(%r, %r)>" % (
|
return "<%s for %s(%r, %r)>" % (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user