From 457bef787a16d791b31df081f4a370237202a5af Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 12 Aug 2015 05:59:22 +0200 Subject: [PATCH] Cleanup and mptt update to support Django 1.8. --- CHANGELOG | 7 ++++++- requirements.txt | 4 ++-- runtests.py | 14 +++++++++----- setup.py | 2 +- tox.ini | 20 ++++++++------------ 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5eeead8..83e352b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,15 @@ Changelog ========= + + 2.9 (DEV) ---------------- -* Fully Django 1.7 support +* Full Django 1.7 support +* Full Django 1.8 support +* New Django migrations, with fallback to South migrations if South is + installed. * Added i18n support and several languages * More settings can be overrridden, like the jQuery URL, site name and wether you want to enable Gthub Gist. diff --git a/requirements.txt b/requirements.txt index f01f697..ebf2719 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,8 +5,8 @@ # ----------------------------------------------------------------------------- # Project dependencies -django==1.7.1 -django-mptt==0.6.1 +django==1.8.3 +django-mptt==0.7.4 pygments==2.0.1 requests==2.5.1 diff --git a/runtests.py b/runtests.py index 908cb85..4ab82e3 100644 --- a/runtests.py +++ b/runtests.py @@ -5,7 +5,7 @@ from django.conf import settings if not settings.configured: settings.configure( - DATABASES = { + DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'dev.db', @@ -17,7 +17,7 @@ if not settings.configured: 'mptt', 'dpaste', ], - MIDDLEWARE_CLASSES = ( + MIDDLEWARE_CLASSES=( 'django.contrib.sessions.middleware.SessionMiddleware', ), STATIC_ROOT='/tmp/dpaste_test_static/', @@ -26,8 +26,6 @@ if not settings.configured: ) def runtests(*test_args): - from django.test.simple import DjangoTestSuiteRunner - # New Django 1.7 app registry try: from django import setup @@ -35,7 +33,13 @@ def runtests(*test_args): except ImportError: pass - test_runner = DjangoTestSuiteRunner(verbosity=1) + # New Django 1.8 test runner + try: + from django.test.runner import DiscoverRunner as TestRunner + except ImportError: + from django.test.simple import DjangoTestSuiteRunner as TestRunner + + test_runner = TestRunner(verbosity=1) failures = test_runner.run_tests(['dpaste', ]) if failures: sys.exit(failures) diff --git a/setup.py b/setup.py index 3ba7b57..8acdd01 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ setup( include_package_data=True, install_requires=[ 'django>=1.4', - 'django-mptt>=0.6.0', + 'django-mptt>=0.7.4', 'pygments>=1.6', 'requests>=2.0.0', ], diff --git a/tox.ini b/tox.ini index 10abc5f..2e4ddf2 100644 --- a/tox.ini +++ b/tox.ini @@ -2,26 +2,22 @@ toxworkdir=/tmp/tox/dpaste envlist= py27-django-1.4, - py27-django-1.6, py27-django-1.7, - py33-django-1.7, - py34-django-1.7, + py27-django-latest, + py34-django-latest [testenv] commands= python runtests.py [testenv:py27-django-1.4] -deps=django==1.4.16 - -[testenv:py27-django-1.6] -deps=django==1.6.8 +deps=django==1.4.21 [testenv:py27-django-1.7] -deps=django==1.7.1 +deps=django==1.7.9 -[testenv:py33-django-1.7] -deps=django==1.7.1 +[testenv:py27-django-latest] +deps=django==1.8.3 -[testenv:py34-django-1.7] -deps=django==1.7.1 +[testenv:py34-django-latest] +deps=django==1.8.3