Added a fix for Python 3.2 which has an lru_cache that doesn't support typing.

This commit is contained in:
Omer Katz 2014-10-02 17:50:17 +03:00
parent 3e69ed171d
commit 67edf86660

View File

@ -311,9 +311,11 @@ except ImportError:
klass.__str__ = lambda self: self.__unicode__().encode('utf-8') klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
return klass return klass
try:
import sys
if sys.version_info >= (3, 3):
from functools import lru_cache from functools import lru_cache
except ImportError: else:
try: try:
from backports.functools_lru_cache import lru_cache from backports.functools_lru_cache import lru_cache
except ImportError: except ImportError: