From 83d570fdee57d0ae5f56bffef3ce4bd808febeb9 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 26 Mar 2021 08:58:00 +0000 Subject: [PATCH] Revert "pick deque instead of list (#7849)" This reverts commit ebcb8d53108f1ebe56b9a7aa78bbe09b1079953c. --- rest_framework/throttling.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py index 1374d4492..0ba2ba66b 100644 --- a/rest_framework/throttling.py +++ b/rest_framework/throttling.py @@ -2,7 +2,6 @@ Provides various throttling policies. """ import time -from collections import deque from django.core.cache import cache as default_cache from django.core.exceptions import ImproperlyConfigured @@ -121,7 +120,7 @@ class SimpleRateThrottle(BaseThrottle): if self.key is None: return True - self.history = self.cache.get(self.key, deque()) + self.history = self.cache.get(self.key, []) self.now = self.timer() # Drop any requests from the history which have now passed the