diff --git a/.travis.yml b/.travis.yml index b48b7a31..883d8f0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,19 +50,6 @@ matrix: - python: 2.7 env: TOXENV=py27-dj111-drf36-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf31-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf32-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf33-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf34-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf35-codecov - - python: 3.3 - env: TOXENV=py33-dj18-drf36-codecov - - python: 3.4 env: TOXENV=py34-dj18-drf31-codecov - python: 3.4 @@ -130,6 +117,17 @@ matrix: env: TOXENV=py36-dj111-drf35-codecov - python: 3.6 env: TOXENV=py36-dj111-drf36-codecov + - python: 3.6 + env: TOXENV=py36-dj111-drf37-codecov + - python: 3.6 + env: TOXENV=py36-dj111-drf38-codecov + + + - python: 3.6 + env: TOXENV=py36-dj20-drf37-codecov + - python: 3.6 + env: TOXENV=py36-dj20-drf38-codecov + install: - pip install tox diff --git a/README.rst b/README.rst index 627f71cf..03b53bf6 100644 --- a/README.rst +++ b/README.rst @@ -23,8 +23,10 @@ Requirements ------------ - Python (2.7, 3.3, 3.4, 3.5, 3.6) -- Django (1.8, 1.9, 1.10, 1.11) -- Django REST Framework (3.1, 3.2, 3.3, 3.4, 3.5, 3.6) +- Django (1.8, 1.9, 1.10, 1.11, 2.0\*) +- Django REST Framework (3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7\*, 3.8\*) + +\* Django 2.0 is tested only on Python 3.6 and Django REST Framework 3.7, 3.8 Installation ------------ diff --git a/docs/index.md b/docs/index.md index 0a476bb1..92f959ec 100644 --- a/docs/index.md +++ b/docs/index.md @@ -28,8 +28,10 @@ If you want to know more about JWT, check out the following resources: ## Requirements - Python (2.7, 3.3, 3.4, 3.5, 3.6) -- Django (1.8, 1.9, 1.10) -- Django REST Framework (3.0, 3.1, 3.2, 3.3, 3.4, 3.5) +- Django (1.8, 1.9, 1.10, 1.11, 2.0\*) +- Django REST Framework (3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7\*, 3.8\*) + +\* Django 2.0 is tested only on Python 3.6 and Django Rest Framework 3.7, 3.8 ## Security diff --git a/tests/test_serializers.py b/tests/test_serializers.py index 2e6c7e53..c64f8f49 100644 --- a/tests/test_serializers.py +++ b/tests/test_serializers.py @@ -15,6 +15,9 @@ drf2 = rest_framework.VERSION < StrictVersion('3.0.0') drf3 = rest_framework.VERSION >= StrictVersion('3.0.0') +django_strict_version = StrictVersion('%s.%s.%s' % django.VERSION[:3]) +django2 = django_strict_version > StrictVersion('1.10.0') + class JSONWebTokenSerializerTests(TestCase): def setUp(self): @@ -71,7 +74,7 @@ def test_invalid_credentials(self): self.assertEqual(serializer.errors, expected_error) @unittest.skipIf( - django.VERSION[1] >= 10, + django2, reason='The ModelBackend does not permit login when is_active is False.') def test_disabled_user(self): self.user.is_active = False @@ -88,7 +91,7 @@ def test_disabled_user(self): self.assertEqual(serializer.errors, expected_error) @unittest.skipUnless( - django.VERSION[1] >= 10, + django2, reason='The AllowAllUsersModelBackend permits login when is_active is False.') @override_settings(AUTHENTICATION_BACKENDS=[ 'django.contrib.auth.backends.AllowAllUsersModelBackend']) diff --git a/tox.ini b/tox.ini index ac54a1b6..1cde8877 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py27-{flake8,docs}, - {py27,py33,py34,py35,py36}-dj{18,19,110,111}-drf{31,32,33,34,35,36} + {py27,py33,py34,py35,py36}-dj{18,19,110,111,20}-drf{31,32,33,34,35,36,37,38,39} [testenv] commands = @@ -15,12 +15,15 @@ deps = dj19: Django<1.10 dj110: Django<1.11 dj111: Django<1.12 + dj20: Django<2.1 drf31: djangorestframework<3.2 drf32: djangorestframework<3.3 drf33: djangorestframework<3.4 drf34: djangorestframework<3.5 drf35: djangorestframework<3.6 drf36: djangorestframework<3.7 + drf37: djangorestframework<3.8 + drf38: djangorestframework<3.9 py27-dj{18,19}-drf{31,32,33,34}: djangorestframework-oauth==1.0.1 -rrequirements/testing.txt coverage: coverage