Skip to content

Commit 8297267

Browse files
committed
cached_property can be provided by stdlib
1 parent b724d9d commit 8297267

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

mkdocstrings/handlers/crystal/items.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
import re
77
from typing import Any, Generic, Iterator, Mapping, Optional, Sequence, TypeVar, Union
88

9-
from cached_property import cached_property
9+
try:
10+
from functools import cached_property
11+
except ImportError:
12+
from cached_property import cached_property
1013
from mkdocstrings.handlers.base import CollectionError
1114

1215
from . import crystal_html

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mkdocstrings = ">=0.15.0"
2020
markdown-callouts = ">=0.1.0"
2121
mkdocs-autorefs = ">=0.2.0"
2222
markupsafe = ">=1.1.1, <3.0"
23-
cached-property = "^1.5.2"
23+
cached-property = "^1.5.2; python_version<'3.8'"
2424
Jinja2 = ">=2.11.2, <4.0"
2525

2626
[tool.poetry.dev-dependencies]

0 commit comments

Comments
 (0)