diff --git a/.travis.yml b/.travis.yml index 4ce9626..29ec94b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,8 @@ python: - "3.4" env: - - DJANGO=1.9.6 + - DJANGO=1.10a1 + - DJANGO=1.9.7 - DJANGO=1.8.13 sudo: false diff --git a/README.rst b/README.rst index 7944e20..611a0ef 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ Requirements - `Arrow `__ - `Blessed `__ -Tested with: Python 2.7 & 3.5. Django 1.8.13 & 1.9.6 +Tested with: Python 2.7 & 3.5. Django 1.8.13, 1.9.7 and 1.10a1 Brokers ~~~~~~~ diff --git a/django_q/__init__.py b/django_q/__init__.py index b2453b9..da8f10e 100644 --- a/django_q/__init__.py +++ b/django_q/__init__.py @@ -5,13 +5,14 @@ from django import get_version myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) -VERSION = (0, 7, 16) +VERSION = (0, 7, 17) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules -if get_version().split('.')[1][0] != '9': +split_version = get_version().split('.') +if split_version[1][0] != '9' and split_version[1][:2]!='10': from .tasks import async, schedule, result, result_group, fetch, fetch_group, count_group, delete_group, queue_size from .models import Task, Schedule, Success, Failure from .cluster import Cluster diff --git a/django_q/management/commands/qcluster.py b/django_q/management/commands/qcluster.py index 14e312c..b40267b 100644 --- a/django_q/management/commands/qcluster.py +++ b/django_q/management/commands/qcluster.py @@ -1,5 +1,3 @@ -from optparse import make_option - from django.core.management.base import BaseCommand from django.utils.translation import ugettext as _ @@ -10,13 +8,14 @@ class Command(BaseCommand): # Translators: help text for qcluster management command help = _("Starts a Django Q Cluster.") - option_list = BaseCommand.option_list + ( - make_option('--run-once', - action='store_true', - dest='run_once', - default=False, - help='Run once and then stop.'), - ) + def add_arguments(self, parser): + parser.add_argument( + '--run-once', + action='store_true', + dest='run_once', + default=False, + help='Run once and then stop.', + ) def handle(self, *args, **options): q = Cluster() diff --git a/django_q/management/commands/qinfo.py b/django_q/management/commands/qinfo.py index 84068fa..6647f4f 100644 --- a/django_q/management/commands/qinfo.py +++ b/django_q/management/commands/qinfo.py @@ -1,7 +1,4 @@ -from optparse import make_option - from django.core.management.base import BaseCommand - from django.utils.translation import ugettext as _ from django_q import VERSION @@ -13,13 +10,14 @@ class Command(BaseCommand): # Translators: help text for qinfo management command help = _('General information over all clusters.') - option_list = BaseCommand.option_list + ( - make_option('--config', - action='store_true', - dest='config', - default=False, - help='Print current configuration.'), - ) + def add_arguments(self, parser): + parser.add_argument( + '--config', + action='store_true', + dest='config', + default=False, + help='Print current configuration.', + ) def handle(self, *args, **options): if options.get('config', False): diff --git a/django_q/management/commands/qmonitor.py b/django_q/management/commands/qmonitor.py index bef4bd1..706f58e 100644 --- a/django_q/management/commands/qmonitor.py +++ b/django_q/management/commands/qmonitor.py @@ -1,5 +1,3 @@ -from optparse import make_option - from django.core.management.base import BaseCommand from django.utils.translation import ugettext as _ @@ -10,13 +8,14 @@ class Command(BaseCommand): # Translators: help text for qmonitor management command help = _("Monitors Q Cluster activity") - option_list = BaseCommand.option_list + ( - make_option('--run-once', - action='store_true', - dest='run_once', - default=False, - help='Run once and then stop.'), - ) + def add_arguments(self, parser): + parser.add_argument( + '--run-once', + action='store_true', + dest='run_once', + default=False, + help='Run once and then stop.', + ) def handle(self, *args, **options): monitor(run_once=options.get('run_once', False)) diff --git a/docs/conf.py b/docs/conf.py index a2745d3..b7ca298 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -72,7 +72,7 @@ author = 'Ilan Steemers' # The short X.Y version. version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.7.16' +release = '0.7.17' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/index.rst b/docs/index.rst index aed785d..b79e9eb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -24,7 +24,7 @@ Features - Rollbar support -Django Q is tested with: Python 2.7 & 3.5. Django 1.8.13 & 1.9.6 +Django Q is tested with: Python 2.7 & 3.5. Django 1.8.13 & 1.9.7 Contents: diff --git a/docs/install.rst b/docs/install.rst index 36be0cd..9b13429 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -29,7 +29,7 @@ Django Q is tested for Python 2.7 and 3.5 - `Django `__ Django Q aims to use as much of Django's standard offerings as possible - The code is tested against Django version `1.8.13` and `1.9.6`. + The code is tested against Django version `1.8.13` and `1.9.7`. - `Django-picklefield `__ @@ -124,7 +124,7 @@ You can reference the `requirements