[3/4] requirements: Test older versions of DRF (v2)

Submitted by Stephen Finucane on April 4, 2017, 9:38 p.m.

Details

Message ID 20170404213820.13350-3-stephen@that.guru
State Accepted
Headers show

Commit Message

Stephen Finucane April 4, 2017, 9:38 p.m.
In commit febad055fb6609369f1a465a5eec323549c5c065, we attempted to
start testing older versions of Django REST Framework for use with older
versions of Django. This work was later reverted in commit
6f2ddab6e60aac91dac782aeccd2ecd35416c271 due to perceived issues with
django-filter versions.

There are additional reasons for validating older versions of DRF, such
as supporting the versions provide as part of distributions. It turns
out that those issues aren't such a big deal and can be handled with a
shim. All in all, this means we can and should support these older
versions of Django REST Framework, and that is what we'll do.

Note that the minimum version supported in requirements.txt is not
bumped as it's good practive to use the latest available version.
However, that doesn't make it any less supported.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Cc: Daniel Axtens <dja@axtens.net>
---
 README.md                 | 9 +++++++++
 patchwork/settings/dev.py | 3 +--
 tox.ini                   | 4 ++++
 3 files changed, 14 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/README.md b/README.md
index 488dad4..a3c66bf 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,15 @@  subsystems of the Linux kernel. Although Patchwork has been developed with the
 kernel workflow in mind, the aim is to be flexible enough to suit the majority
 of community projects.
 
+# Requirements
+
+- Python (2.7, 3.3 - 3.5)
+- Django (1.6 - 1.10)
+- Django REST Framework (3.2 - 3.6) (\*)
+- Django Filters (0.11 - 1.0) (\*\*)
+
+Note that various dependencies have their own requirements
+
 # Development Installation
 
 [Docker][ref-docker] is the recommended installation methods for a Patchwork
diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py
index ee5b203..86b0f1b 100644
--- a/patchwork/settings/dev.py
+++ b/patchwork/settings/dev.py
@@ -92,5 +92,4 @@  if django.VERSION >= (1, 8):
 
 ENABLE_XMLRPC = True
 
-if django.VERSION >= (1, 8):
-    ENABLE_REST_API = True
+ENABLE_REST_API = True
diff --git a/tox.ini b/tox.ini
index bf38f8f..8cf23f6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,7 +7,11 @@  skipsdist = True
 deps =
     -r{toxinidir}/requirements-test.txt
     django16: django>=1.6,<1.7
+    django16: djangorestframework>=3.2,<3.3
+    django16: django-filter>=0.11,<0.12
     django17: django>=1.7,<1.8
+    django17: djangorestframework>=3.3,<3.4
+    django17: django-filter>=0.11,<0.12
     django18: django>=1.8,<1.9
     django19: django>=1.9,<1.10
     django110: django>=1.10,<1.11