Skip to content

Commit f21585e

Browse files
committed
Remove lazy_property
1 parent 4c87c51 commit f21585e

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

src/odin/utils/__init__.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
from collections.abc import Iterable, Iterator, Sequence
33
from typing import Any, TypeVar
44

5-
from odin.compatibility import deprecated
6-
75
_CAMEL_CASE_RE = re.compile(r"[A-Z]")
86
_LOWER_UNDERSCORE_CASE_RE = re.compile(r"_([a-z])")
97
_LOWER_DASH_CASE_RE = re.compile(r"-([a-z])")
@@ -88,23 +86,6 @@ def __get__(self, instance, owner):
8886
return value
8987

9088

91-
@deprecated("Use the standard library functools.cached_property")
92-
class lazy_property: # noqa - Made to match the property builtin
93-
"""The bottle cached property, requires an alternate name so as not to
94-
clash with existing cached_property behaviour
95-
"""
96-
97-
def __init__(self, func):
98-
self.func = func
99-
self.__doc__ = func.__doc__
100-
101-
def __get__(self, instance, owner):
102-
if instance is None:
103-
return self
104-
value = instance.__dict__[self.func.__name__] = self.func(instance)
105-
return value
106-
107-
10889
EMPTY = []
10990

11091

0 commit comments

Comments
 (0)