Commit ce5053f9 authored by Denis Bilenko's avatar Denis Bilenko

remove deprecated class lazy_property

parent 989f7643
# Copyright (c) 2009 Denis Bilenko. See LICENSE for details.
__all__ = ['wrap_errors', 'lazy_property']
__all__ = ['wrap_errors']
class wrap_errors(object):
......@@ -46,20 +46,3 @@ class wrap_errors(object):
def __getattr__(self, item):
return getattr(self.func, item)
# XXX no longer used anywhere, remove it
class lazy_property(object):
'''A decorator similar to :meth:`property` that only calls the *function* once.'''
def __init__(self, function):
import warnings
warnings.warn("gevent.util.lazy_propery is deprecated", DeprecationWarning, stacklevel=2)
self._calculate = function
def __get__(self, obj, _=None):
if obj is None:
return self
value = self._calculate(obj)
setattr(obj, self._calculate.func_name, value)
return value
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment