Skip to content

Commit

Permalink
Adjust Django version support.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Oct 4, 2019
1 parent 781dc77 commit 09eb76a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
29 changes: 19 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,47 @@ matrix:
env: TOXENV=py27-1.11
- python: 3.4
env: TOXENV=py34-1.11
- python: 3.4
env: TOXENV=py34-2.0
- python: 3.5
env: TOXENV=py35-1.11
- python: 3.5
env: TOXENV=py35-2.0
- python: 3.5
env: TOXENV=py35-2.1
- python: 3.5
env: TOXENV=py35-master
env: TOXENV=py35-2.2
dist: xenial
sudo: true
- python: 3.6
env: TOXENV=py36-1.11
- python: 3.6
env: TOXENV=py36-2.0
- python: 3.6
env: TOXENV=py36-2.1
- python: 3.6
env: TOXENV=py36-2.2
dist: xenial
sudo: true
- python: 3.6
env: TOXENV=py36-3.0
dist: xenial
sudo: true
- python: 3.6
env: TOXENV=py36-master
- python: 3.7
env: TOXENV=py37-2.0
dist: xenial
sudo: true
- python: 3.7
env: TOXENV=py37-2.1
dist: xenial
sudo: true
- python: 3.7
env: TOXENV=py37-2.2
dist: xenial
sudo: true
- python: 3.7
env: TOXENV=py37-3.0
dist: xenial
sudo: true
- python: 3.7
env: TOXENV=py37-master
dist: xenial
sudo: true
allow_failures:
- env: TOXENV=py35-master
- env: TOXENV=py36-master
- env: TOXENV=py37-master
install:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
Expand Down
7 changes: 6 additions & 1 deletion tests/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from __future__ import unicode_literals

from django.db import models
from django.utils.encoding import python_2_unicode_compatible

try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
def python_2_unicode_compatible(cls):
return cls


@python_2_unicode_compatible
Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ args_are_paths = false
envlist =
flake8,
isort,
py27-1.11,
py34-{1.11,2.0},
py35-{1.11,2.0,2.1,master},
py36-{1.11,2.0,2.1,master},
py37-{1.11,2.0,2.1,master}
py{27,34}-1.11,
py35-{1.11,2.1,2.2},
py36-{1.11,2.1,2.2,3.0,master},
py37-{1.11,2.1,2.2,3.0,master}

[testenv]
basepython =
Expand All @@ -24,8 +23,9 @@ commands =
deps =
coverage
1.11: Django>=1.11,<2.0
2.0: Django>=2.0,<2.1
2.1: Django>=2.1,<2.2
2.2: Django>=2.2,<3.0
3.0: Django>=3.0a1,<3.1
master: https://github.com/django/django/archive/master.tar.gz

[testenv:flake8]
Expand Down

0 comments on commit 09eb76a

Please sign in to comment.