Skip to content

Commit f85cc6f

Browse files
committed
feat: add support for propcache v1.0.0
v1.0.0 moved the public api to propcache.api see aio-libs/propcache#21 see aio-libs/propcache#18 see aio-libs/propcache#19
1 parent d657b6d commit f85cc6f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/cached_ipaddress/_compat.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""Compat for external lib versions."""
2+
3+
try:
4+
from propcache.api import cached_property
5+
except ImportError:
6+
from propcache import cached_property
7+
8+
__all__ = ("cached_property",)

src/cached_ipaddress/ipaddress.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ipaddress import AddressValueError, IPv4Address, IPv6Address, NetmaskValueError
66
from typing import Any, Optional, Union
77

8-
from propcache import cached_property
8+
from ._compat import cached_property
99

1010
if sys.version_info < (3, 9):
1111
cache = lru_cache(maxsize=None)

0 commit comments

Comments
 (0)