openapi-core/openapi_core/compat.py

13 lines
340 B
Python
Raw Permalink Normal View History

2018-07-28 22:51:36 +00:00
"""OpenAPI core python 2.7 compatibility module"""
try:
from functools import lru_cache
except ImportError:
from backports.functools_lru_cache import lru_cache
try:
from functools import partialmethod
except ImportError:
from backports.functools_partialmethod import partialmethod
2018-07-28 22:51:36 +00:00
__all__ = ['lru_cache', 'partialmethod']