summaryrefslogtreecommitdiff
path: root/astroid/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'astroid/decorators.py')
-rw-r--r--astroid/decorators.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/astroid/decorators.py b/astroid/decorators.py
index 1aaf14b1..48f64058 100644
--- a/astroid/decorators.py
+++ b/astroid/decorators.py
@@ -27,8 +27,7 @@ _R = TypeVar("_R")
_P = ParamSpec("_P")
-# TODO: Remove when support for 3.7 is dropped
-# TODO: astroid 3.0 -> move class behind sys.version_info < (3, 8) guard
+# TODO: Remove for astroid 3.0
class cachedproperty:
"""Provides a cached property equivalent to the stacking of
@cached and @property, but more efficient.
@@ -47,13 +46,12 @@ class cachedproperty:
__slots__ = ("wrapped",)
def __init__(self, wrapped):
- if sys.version_info >= (3, 8):
- warnings.warn(
- "cachedproperty has been deprecated and will be removed in astroid 3.0 for Python 3.8+. "
- "Use functools.cached_property instead.",
- DeprecationWarning,
- stacklevel=2,
- )
+ warnings.warn(
+ "cachedproperty has been deprecated and will be removed in astroid 3.0"
+ "Use functools.cached_property instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
try:
wrapped.__name__ # noqa[B018]
except AttributeError as exc: