mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 21:10:13 +03:00
Added a fix for Python 3.2 which has an lru_cache that doesn't support typing.
This commit is contained in:
parent
3e69ed171d
commit
67edf86660
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user