Skip to content

Commit

Permalink
Merge pull request #649 from jorenham/main
Browse files Browse the repository at this point in the history
prefer `functools.cached_property` for python >= 3.8
  • Loading branch information
bashtage committed May 10, 2023
2 parents 778e203 + d027688 commit 8665365
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions arch/vendor/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
try:
# Prefer system installed version if available
from property_cached import cached_property
except ImportError:
from arch.vendor.property_cached import cached_property
import sys

if sys.version_info >= (3, 8):
from functools import cached_property
else:
try:
# Prefer system installed version if available
from property_cached import cached_property
except ImportError:
from arch.vendor.property_cached import cached_property


__all__ = ["cached_property"]

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ numpy>=1.17
scipy>=1.3
pandas>=1.0
statsmodels>=0.11
property_cached>=1.6.4

0 comments on commit 8665365

Please sign in to comment.