diff --git a/.travis.yml b/.travis.yml index 5a6a976..6ab41b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,9 @@ sudo: false python: - 2.7 - - 3.5 + - 3.6 + - 3.7 + - 3.8 env: - DJANGO=1.8 @@ -12,11 +14,20 @@ env: - DJANGO=1.10 - DJANGO=1.11 - DJANGO=2.0 + - DJANGO=2.1 + - DJANGO=2.2 + - DJANGO=3.0 matrix: exclude: - python: 2.7 env: DJANGO=2.0 + - python: 2.7 + env: DJANGO=2.1 + - python: 2.7 + env: DJANGO=2.2 + - python: 2.7 + env: DJANGO=3.0 - python: 3.5 env: DJANGO=1.6 - python: 3.5 @@ -41,5 +52,6 @@ deploy: secure: Wb3ow0qdnjFsdIoC2Lvke0Rp6h40WNDkp4Fuyltd0ex2MQMglNo1qHZYlhQvJ/5q7pHEAO7pIqOMzOQ1mls9Za1/AoolEl3zm9b3oW86bAR8AVS/UdCUkkCmPaO+0VsYCt63McaLFA0xQnWxA7kZUkfEeS7RBhT63f+diPqg2fU= on: tags: true + python: 3.7 distributions: sdist bdist_wheel repo: azavea/django-queryset-csv diff --git a/dev_requirements.txt b/dev_requirements.txt index b1657b6..d7231f6 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,5 +1,6 @@ coveralls==0.3 -coverage==3.6 -flake8==2.5.1 +coverage==5.0.4 +flake8==3.7.9 django>=1.5 +six==1.14.0 unicodecsv>=0.14.1 diff --git a/djqscsv/djqscsv.py b/djqscsv/djqscsv.py index d6e67da..c530fc1 100644 --- a/djqscsv/djqscsv.py +++ b/djqscsv/djqscsv.py @@ -6,7 +6,7 @@ from django.utils.text import slugify from django.http import HttpResponse, StreamingHttpResponse -from django.utils import six +import six """ A simple python package for turning django models into csvs """ diff --git a/test_app/djqscsv_tests/models.py b/test_app/djqscsv_tests/models.py index 49d3499..14ef452 100644 --- a/test_app/djqscsv_tests/models.py +++ b/test_app/djqscsv_tests/models.py @@ -1,7 +1,7 @@ +from six import python_2_unicode_compatible from django.db import models from django.utils.translation import ugettext as _ -from django.utils.encoding import python_2_unicode_compatible from datetime import datetime SOME_TIME = datetime(2001, 1, 1, 1, 1) diff --git a/test_app/djqscsv_tests/tests/test_csv_creation.py b/test_app/djqscsv_tests/tests/test_csv_creation.py index 6b97732..6f1ba19 100644 --- a/test_app/djqscsv_tests/tests/test_csv_creation.py +++ b/test_app/djqscsv_tests/tests/test_csv_creation.py @@ -13,9 +13,12 @@ from djqscsv_tests.util import create_people_and_get_queryset try: - from django.utils.six.moves import zip_longest + from six.moves import zip_longest except ImportError: - from itertools import izip_longest as zip_longest + try: + from itertools import izip_longest as zip_longest + except ImportError: + from itertools import zip_longest class CSVTestCase(TestCase):