-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Django 3.0 support (Dropping Py2) (#35)
* Removes future/six imports * Updates tox to newer Python/Django/DRF versions * Updates django-test-plus for Django 3.0 support * Updates docs for newly-supported versions * Updates Readme with changes
- Loading branch information
1 parent
e7a43cd
commit f1883e4
Showing
18 changed files
with
43 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ dist: xenial | |
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
|
||
sudo: false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#! /usr/bin/env python | ||
from __future__ import print_function | ||
|
||
import pytest | ||
import sys | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
from __future__ import absolute_import | ||
|
||
from django.test import TestCase | ||
from hashids import Hashids | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
from __future__ import absolute_import | ||
|
||
from django.test import TestCase | ||
from rest_framework import serializers | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
[tox] | ||
envlist = | ||
py37-{flake8,codecov,docs}, | ||
{py27,py36}-django111-drf{37,38,39}, | ||
{py36,py37}-django{21,22}-drf{37,38,39} | ||
py38-{flake8,codecov,docs}, | ||
{py36,py37,py38}-django{21,22}-drf{38,39,310} | ||
{py36,py37,py38}-django{30}-drf{310} | ||
|
||
[testenv] | ||
passenv = CI TRAVIS TRAVIS_* | ||
setenv = | ||
PYTHONDONTWRITEBYTECODE=1 | ||
commands = ./runtests.py --fast {posargs} --coverage | ||
deps = | ||
django111: Django==1.11.8 | ||
django21: Django==2.1.8 | ||
django22: Django==2.2.0 | ||
drf37: djangorestframework==3.7.7 | ||
django21: Django==2.1.15 | ||
django22: Django==2.2.8 | ||
django30: Django==3.0.0 | ||
drf38: djangorestframework==3.8.2 | ||
drf39: djangorestframework==3.9.2 | ||
django-test-plus==1.1.1 | ||
drf39: djangorestframework==3.9.4 | ||
drf310: djangorestframework==3.10.3 | ||
django-test-plus==1.4.0 | ||
pytest==4.4.1 | ||
pytest-django==3.4.8 | ||
pytest-cov==2.6.1 | ||
hashids==1.1.0 | ||
mock==2.0.0 | ||
|
||
[testenv:py37-flake8] | ||
[testenv:py38-flake8] | ||
commands = ./runtests.py --lintonly | ||
deps = | ||
pytest==3.0.5 | ||
flake8==3.7.7 | ||
|
||
[testenv:py37-codecov] | ||
[testenv:py38-codecov] | ||
commands = | ||
{[testenv]commands} # Run the tests and generate coverage report | ||
codecov -e TOX_ENV # Post coverage stats to codecov.io | ||
deps = | ||
{[testenv]deps} | ||
Django==2.2.0 | ||
djangorestframework==3.9.2 | ||
Django==3.0.0 | ||
djangorestframework==3.10.3 | ||
codecov==2.0.15 | ||
|
||
[testenv:py37-docs] | ||
[testenv:py38-docs] | ||
commands = mkdocs build | ||
deps = | ||
mkdocs>=0.16.1 |