From b8c71872da3867eb43cfb191ff33853ccc13f16f Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Tue, 18 Aug 2015 12:44:17 +0300 Subject: [PATCH] Fixed python 2.6 compatibility. --- rest_framework/compat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index ef1c0d0b3..52fcca359 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -189,9 +189,9 @@ except ImportError: def _make_key(args, kwds, typed, kwd_mark = (object(),), - fasttypes = {int, str, frozenset, type(None)}, + fasttypes = set((int, str, frozenset, type(None))), sorted=sorted, tuple=tuple, type=type, len=len): - 'Make a cache key from optionally typed positional and keyword arguments' + """Make a cache key from optionally typed positional and keyword arguments""" key = args if kwds: sorted_items = sorted(kwds.items())