Merge pull request #247 from benjaoming/rm-future-dep

Remove unused dependency `future`
This commit is contained in:
Ilan Steemers
2017-07-10 11:52:46 +02:00
committed by GitHub
8 changed files with 21 additions and 8 deletions
+2 -6
View File
@@ -4,12 +4,6 @@ from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import range
from future import standard_library
standard_library.install_aliases()
# Standard
import importlib
import signal
@@ -30,6 +24,7 @@ from django import db
import signing
import tasks
from django_q.compat import range
from django_q.conf import Conf, logger, psutil, get_ppid, rollbar
from django_q.models import Task, Success, Schedule
from django_q.status import Stat, Status
@@ -37,6 +32,7 @@ from django_q.brokers import get_broker
from django_q.signals import pre_execute
class Cluster(object):
def __init__(self, broker=None):
self.broker = broker or get_broker()
+14
View File
@@ -0,0 +1,14 @@
from __future__ import absolute_import
"""
Compatibility layer.
Intentionally replaces use of python-future
"""
# https://github.com/Koed00/django-q/issues/4
try:
range = xrange
except NameError:
range = range
+1
View File
@@ -5,6 +5,7 @@ import pytest
import redis
from django_q.brokers import get_broker, Broker
from django_q.compat import range
from django_q.conf import Conf
from django_q.humanhash import uuid
+1
View File
@@ -3,6 +3,7 @@ from multiprocessing import Event, Queue, Value
import pytest
from django_q.cluster import pusher, worker, monitor
from django_q.compat import range
from django_q.conf import Conf
from django_q.tasks import async, result, fetch, count_group, result_group, fetch_group, delete_group, delete_cached, \
async_iter, Chain, async_chain, Iter, Async
+1
View File
@@ -11,6 +11,7 @@ myPath = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, myPath + '/../')
from django_q.cluster import Cluster, Sentinel, pusher, worker, monitor, save_task
from django_q.compat import range
from django_q.humanhash import DEFAULT_WORDLIST, uuid
from django_q.tasks import fetch, fetch_group, async, result, result_group, count_group, delete_group, queue_size
from django_q.models import Task, Success
+1
View File
@@ -3,6 +3,7 @@ import pytest
from django_q.tasks import async
from django_q.brokers import get_broker
from django_q.cluster import Cluster
from django_q.compat import range
from django_q.monitor import monitor, info
from django_q.status import Stat
from django_q.conf import Conf
-1
View File
@@ -1,7 +1,6 @@
arrow
blessed
django-picklefield
future
hiredis
redis
psutil
+1 -1
View File
@@ -36,7 +36,7 @@ setup(
license='MIT',
description='A multiprocessing distributed task queue for Django',
long_description=README,
install_requires=['django>=1.8', 'django-picklefield', 'blessed', 'arrow', 'future'],
install_requires=['django>=1.8', 'django-picklefield', 'blessed', 'arrow'],
test_requires=['pytest', 'pytest-django', ],
cmdclass={'test': PyTest},
classifiers=[