Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
language: python
python:
- "2.7"
- "3.8"
env:
- TOXENV=py34-1.7
- TOXENV=py34-1.6
- TOXENV=py34-1.5
- TOXENV=py33-1.7
- TOXENV=py27-1.7
- TOXENV=py33-1.6
- TOXENV=py27-1.6
- TOXENV=py33-1.5
- TOXENV=py27-1.5
- TOXENV=py27-1.4
- TOXENV=py26-1.4
- TOXENV=py27-1.3
- TOXENV=py26-1.3
- TOXENV=py36-2.2
- TOXENV=py36-3.0
- TOXENV=py36-3.1
- TOXENV=py37-2.2
- TOXENV=py37-3.0
- TOXENV=py37-3.1
- TOXENV=py38-2.2
- TOXENV=py38-3.0
- TOXENV=py38-3.1
install:
- pip install -q --use-mirrors tox==1.4.2
- pip install -q --use-mirrors tox==3.19.0
script:
- tox
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Sator documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 15 14:11:21 2012.
Expand All @@ -11,7 +10,8 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys, os
import sys
import os

extensions = ['autodoc']

Expand Down
5 changes: 1 addition & 4 deletions example/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
try:
from django.conf.urls import patterns, include, url
except ImportError:
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView

from example import views
Expand Down
6 changes: 3 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Django==1.7
Sphinx==1.2.3
tox==1.7.2
Django>=2.2
Sphinx==3.2.1
tox==3.19.0
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ def read_file(filename):
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries :: Python Modules',
'Development Status :: 4 - Beta',
'Operating System :: OS Independent',
Expand Down
2 changes: 0 additions & 2 deletions template_debug/templatetags/debug_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Template tags that aid in common debugging scenarios.
"""

from __future__ import unicode_literals

from pprint import pprint

from django.conf import settings
Expand Down
7 changes: 0 additions & 7 deletions template_debug/tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
from template_debug.templatetags.debug_tags import require_template_debug


try:
from django.utils.six import PY3
except ImportError:
range = xrange
PY3 = False


@require_template_debug
def test_func():
return 'test string'
Expand Down
7 changes: 0 additions & 7 deletions template_debug/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
is_valid_in_template, get_attributes)


try:
from django.utils.six import PY3
except ImportError:
range = xrange
PY3 = False


class FlattenTestCase(TemplateDebugTestCase):
"""TestCase for _flatten"""

Expand Down
11 changes: 1 addition & 10 deletions template_debug/utils.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
from __future__ import unicode_literals
from functools import partial
from collections import Iterable
from inspect import getargspec, isroutine


try:
from django.utils.six import PY3, string_types
except ImportError:
# Django < 1.5. No Python 3 support
PY3 = False
string_types = basestring


def _flatten(iterable):
"""
Given an iterable with nested iterables, generate a flat iterable
"""
for i in iterable:
if isinstance(i, Iterable) and not isinstance(i, string_types):
if isinstance(i, Iterable) and not isinstance(i, str):
for sub_i in _flatten(i):
yield sub_i
else:
Expand Down
72 changes: 28 additions & 44 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,61 +1,45 @@
[tox]
downloadcache = {toxworkdir}/_download/
envlist = py34-1.7,py34-1.6,py34-1.5,py33-1.7,py27-1.7,py33-1.6,py27-1.6,py33-1.5,py27-1.5,py27-1.4,py26-1.4,py27-1.3,py26-1.3
envlist = py36-2.2,py36-3.0,py36-3.1,py37-2.2,py37-3.0,py37-3.1,py38-2.2,py38-3.0,py38-3.1

[testenv]
commands = {envpython} runtests.py

[testenv:py34-1.7]
basepython = python3.4
deps = django>=1.7,<1.8
[testenv:py36-2.2]
basepython = python3.6
deps = django>=2.2,<3.0

[testenv:py34-1.6]
basepython = python3.4
deps = django>=1.6,<1.7
[testenv:py36-3.0]
basepython = python3.6
deps = django>=3.0,<3.1

[testenv:py34-1.5]
basepython = python3.4
deps = django>=1.5,<1.6
[testenv:py36-3.1]
basepython = python3.6
deps = django>=3.1,<3.2

[testenv:py33-1.7]
basepython = python3.3
deps = django>=1.7,<1.8
[testenv:py37-2.2]
basepython = python3.7
deps = django>=2.2,<3.0

[testenv:py33-1.6]
basepython = python3.3
deps = django>=1.6,<1.7
[testenv:py37-3.0]
basepython = python3.7
deps = django>=3.0,<3.1

[testenv:py33-1.5]
basepython = python3.3
deps = django>=1.5,<1.6
[testenv:py37-3.1]
basepython = python3.7
deps = django>=3.1,<3.2

[testenv:py27-1.7]
basepython = python2.7
deps = django>=1.7,<1.8
[testenv:py38-2.2]
basepython = python3.8
deps = django>=2.2,<3.0

[testenv:py27-1.6]
basepython = python2.7
deps = django>=1.6,<1.7
[testenv:py38-3.0]
basepython = python3.8
deps = django>=3.0,<3.1

[testenv:py27-1.5]
basepython = python2.7
deps = django>=1.5,<1.6

[testenv:py27-1.4]
basepython = python2.7
deps = django>=1.4,<1.5

[testenv:py27-1.3]
basepython = python2.7
deps = django>=1.3,<1.4

[testenv:py26-1.4]
basepython = python2.6
deps = django>=1.4,<1.5

[testenv:py26-1.3]
basepython = python2.6
deps = django>=1.3,<1.4
[testenv:py38-3.1]
basepython = python3.8
deps = django>=3.1,<3.2

#[testenv:docs]
#basepython = python2.6
Expand Down