openapi-core/openapi_core/_python27_patch.py

14 lines
346 B
Python

import functools
try:
from functools import lru_cache
except ImportError:
from backports.functools_lru_cache import lru_cache
functools.lru_cache = lru_cache
try:
from functools import partialmethod
except ImportError:
from backports.functools_partialmethod import partialmethod
functools.partialmethod = partialmethod