Commit d3f4105d authored by Denis Bilenko's avatar Denis Bilenko

add deprecation warning to lazy_property

- it's no longer used by gevent itself
parent ab084386
...@@ -47,10 +47,13 @@ class wrap_errors(object): ...@@ -47,10 +47,13 @@ class wrap_errors(object):
return getattr(self.func, item) return getattr(self.func, item)
# XXX no longer used anywhere, remove it
class lazy_property(object): class lazy_property(object):
'''A decorator similar to :meth:`property` that only calls the *function* once.''' '''A decorator similar to :meth:`property` that only calls the *function* once.'''
def __init__(self, function): def __init__(self, function):
import warnings
warnings.warn("gevent.util.lazy_propery is deprecated", DeprecationWarning, stacklevel=2)
self._calculate = function self._calculate = function
def __get__(self, obj, _=None): def __get__(self, obj, _=None):
......
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