switch to six for django3 compatibility (#24)

* switch to six for django3 compatibility

* update travis matrix for django3

* fix excludes

* exclude legacy py versions for django3

* python-slugify dependency  supports 2.7 and 3.5 and above only
This commit is contained in:
slei99 2019-12-04 16:54:27 +01:00 committed by Val Neekman
parent f0842f0534
commit d1ae1e8b42
4 changed files with 24 additions and 9 deletions

7
.gitignore vendored
View file

@ -55,3 +55,10 @@ docs/_build/
# PyBuilder
target/
# VSCode
/.vscode/
# Pipenv
Pipfile
Pipfile.lock

View file

@ -3,8 +3,7 @@ language: python
python:
- "3.5"
- "3.4"
- "3.3"
- "3.7"
- "2.7"
- pypy
@ -12,6 +11,7 @@ env:
- DJANGO="django==1.10.6"
- DJANGO="django==1.9.12"
- DJANGO="django==1.8.17"
- DJANGO="django==3.0"
install:
- pip install $DJANGO
@ -27,12 +27,19 @@ before_script:
matrix:
exclude:
- python: "3.3"
env: DJANGO="django==1.10.6"
- python: "3.3"
env: DJANGO="django==1.9.12"
- python: "3.7"
env: DJANGO="django==1.10.6"
- python: "3.7"
env: DJANGO="django==1.9.12"
- python: "2.7"
env: DJANGO="django==3.0"
- python: "3.3"
env: DJANGO="django==3.0"
- python: "3.5"
env: DJANGO="django==3.0"
- python: pypy
env: DJANGO="django==3.0"
script: coverage run --source=uuslug manage.py test
after_success:
coveralls
after_success: coveralls

View file

@ -1,2 +1,3 @@
Django>=1.8
python-slugify>=1.2.1
six>=1.13.0

View file

@ -1,6 +1,6 @@
from django.db.models.base import ModelBase
from slugify import slugify as pyslugify
from django.utils import six
import six
if six.PY3:
from django.utils.encoding import smart_str
else: