From b82ec540ad447dcf703a9b21e9e94976109fd175 Mon Sep 17 00:00:00 2001 From: Dmitry Dygalo Date: Sat, 24 Sep 2016 00:03:02 +0200 Subject: [PATCH 1/2] Remove code for old Django versions (#4513) --- rest_framework/views.py | 1 - rest_framework/viewsets.py | 4 ---- 2 files changed, 5 deletions(-) diff --git a/rest_framework/views.py b/rest_framework/views.py index 15d8c6cde..e178a209f 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -126,7 +126,6 @@ class APIView(View): 'Use `.all()` or call `.get_queryset()` instead.' ) cls.queryset._fetch_all = force_evaluation - cls.queryset._result_iter = force_evaluation # Django <= 1.5 view = super(APIView, cls).as_view(**initkwargs) view.cls = cls diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py index bd8333504..a9dc632ff 100644 --- a/rest_framework/viewsets.py +++ b/rest_framework/viewsets.py @@ -79,10 +79,6 @@ class ViewSetMixin(object): handler = getattr(self, action) setattr(self, method, handler) - # Patch this in as it's otherwise only present from 1.5 onwards - if hasattr(self, 'get') and not hasattr(self, 'head'): - self.head = self.get - # And continue as usual return self.dispatch(request, *args, **kwargs) From 38aa0ac28131f6c32cc3359efcf734012fb435d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Wed, 28 Sep 2016 00:05:22 -0400 Subject: [PATCH 2/2] Update Django security releases 1.9.10 and 1.8.15 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 1e8a7e5c4..8c20faa2b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,8 @@ setenv = PYTHONDONTWRITEBYTECODE=1 PYTHONWARNINGS=once deps = - django18: Django==1.8.14 - django19: Django==1.9.9 + django18: Django==1.8.15 + django19: Django==1.9.10 django110: Django==1.10 djangomaster: https://github.com/django/django/archive/master.tar.gz -rrequirements/requirements-testing.txt