[fix] add module for backward compatibility

cache_property has been added in py3.8 [1]

To support cache_property in py3.7 the implementation from 3.8 has been
copied to compat.py.  This code can be cleanup with EOL of py3.7.

[1] https://docs.python.org/3/library/functools.html#functools.cached_property

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2022-03-12 15:37:45 +01:00
parent 8751940169
commit 59100e8525
2 changed files with 71 additions and 1 deletions

View file

@ -23,7 +23,6 @@ __all__ = ['InfoPage', 'MistletoePage', 'InfoPageSet']
import os.path
import logging
from functools import cached_property
import typing
import urllib.parse
@ -32,6 +31,7 @@ from flask.helpers import url_for
import mistletoe
from .. import get_setting
from ..compat import cached_property
from ..version import GIT_URL
logger = logging.getLogger('doc')