mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +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')
|
||||
return klass
|
||||
|
||||
try:
|
||||
|
||||
import sys
|
||||
if sys.version_info >= (3, 3):
|
||||
from functools import lru_cache
|
||||
except ImportError:
|
||||
else:
|
||||
try:
|
||||
from backports.functools_lru_cache import lru_cache
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue
Block a user