From 51f3e11e5b6f2ab15b392f154af0413869ee248e Mon Sep 17 00:00:00 2001 From: Tomas Date: Tue, 24 Sep 2019 11:55:17 +0200 Subject: [PATCH] Remove python2.6 and 3.3 and fix flake8 errors --- .travis.yml | 25 -------- example/app/views.py | 3 +- example/example/urls.py | 7 ++- tox.ini | 128 +--------------------------------------- 4 files changed, 8 insertions(+), 155 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41e573e..43eb824 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,7 @@ language: python python: - - "2.6" - "2.7" - - "3.3" - "3.4" - "3.5" - "3.6" @@ -21,31 +19,8 @@ env: - DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz' matrix: exclude: - - python: "2.6" - env: DJANGO_VERSION='Django>=1.7,<1.8' - - python: "2.6" - env: DJANGO_VERSION='Django>=1.8,<1.9' - - python: "2.6" - env: DJANGO_VERSION='Django>=1.9,<1.10' - - python: "2.6" - env: DJANGO_VERSION='Django>=1.10,<1.11' - - python: "2.6" - env: DJANGO_VERSION='Django>=1.11,<2.0' - - python: "2.6" - env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz' - python: "2.7" env: DJANGO_VERSION='https://github.com/django/django/archive/master.tar.gz' - - python: "3.3" - env: DJANGO_VERSION='Django>=1.4,<1.5' - - python: "3.3" - env: DJANGO_VERSION='Django>=1.5,<1.6' - - python: "3.3" - env: DJANGO_VERSION='Django>=1.9,<1.10' - - python: "3.3" - env: DJANGO_VERSION='Django>=1.10,<1.11' - - python: "3.3" - env: DJANGO_VERSION='Django>=1.11,<2.0' - - python: "3.3" env: DJANGO_VERSION='Django>=2.0,<2.1' - python: "2.7" env: DJANGO_VERSION='Django>=2.1,<2.2' diff --git a/example/app/views.py b/example/app/views.py index 5feb26f..0078662 100644 --- a/example/app/views.py +++ b/example/app/views.py @@ -18,12 +18,13 @@ from django import VERSION from django.conf import settings from django.contrib.auth import login from django.contrib.auth import get_user_model +from django.http import HttpResponseRedirect if VERSION >= (2, 0): from django.urls import reverse else: from django.core.urlresolvers import reverse -from django.http import HttpResponseRedirect + def app_index(request): diff --git a/example/example/urls.py b/example/example/urls.py index baee4c1..434007f 100644 --- a/example/example/urls.py +++ b/example/example/urls.py @@ -16,8 +16,13 @@ from django import VERSION from django.conf import settings +from django.contrib import admin +from django.views.static import serve + + try: from django.conf.urls import include, url + # Compatibility for Django > 1.8 def patterns(prefix, *args): if VERSION < (1, 9): @@ -34,8 +39,6 @@ except ImportError: # Django < 1.4 from django.conf.urls.defaults import include, patterns, url else: from django.urls import include, url -from django.contrib import admin -from django.views.static import serve admin.autodiscover() diff --git a/tox.ini b/tox.ini index fecc625..9d221da 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{26,27,33,34,35,36}-dj{14,15,16,16,17,18,19,110,111},py{34,35,36,37}-dj{14,15,16,16,17,18,19,110,111,20},py{35,36,37}-dj{21,22}, +envlist = py{27,34,35,36}-dj{14,15,16,16,17,18,19,110,111},py{34,35,36,37}-dj{14,15,16,16,17,18,19,110,111,20},py{35,36,37}-dj{21,22}, [testenv] usedevelop = True @@ -12,78 +12,6 @@ commands = install_command = pip install {opts} {packages} -[testenv:py26-dj14] -basepython = python2.6 -deps = - django==1.4.22 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj15] -basepython = python2.6 -deps = - django==1.5.12 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj16] -basepython = python2.6 -deps = - django==1.6.11 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj17] -basepython = python2.6 -deps = - django==1.7.11 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj18] -basepython = python2.6 -deps = - django==1.8.17 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj19] -basepython = python2.6 -deps = - django==1.9.12 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj110] -basepython = python2.6 -deps = - django==1.10.4 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py26-dj111] -basepython = python2.6 -deps = - django==1.11.15 - pillow==1.7.8 - PyYAML==3.13 - coveralls==0.3 - flake8 - [testenv:py27-dj14] basepython = python2.7 deps = @@ -156,60 +84,6 @@ deps = coveralls==0.3 flake8 -[testenv:py33-dj16] -basepython = python3.3 -deps = - django==1.6.11 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py33-dj17] -basepython = python3.3 -deps = - django==1.7.11 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py33-dj18] -basepython = python3.3 -deps = - django==1.8.17 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py33-dj19] -basepython = python3.3 -deps = - django==1.9.12 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py33-dj110] -basepython = python3.3 -deps = - django==1.10.4 - pillow==1.7.8 - PyYAML==3.10 - coveralls==0.3 - flake8 - -[testenv:py33-dj111] -basepython = python3.3 -deps = - django==1.11.15 - pillow==1.7.8 - PyYAML==3.13 - coveralls==0.3 - flake8 - [testenv:py34-dj111] basepython = python3.4 deps =