[cleanup] Remove python2 artifacts

This commit is contained in:
Bastien Vallet
2020-06-10 11:48:31 +02:00
parent 142af91fbe
commit 68d95a2924
10 changed files with 15 additions and 21 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from django.core.cache import caches, InvalidCacheBackendError
from django_q.conf import Conf from django_q.conf import Conf
class Broker(object): class Broker:
def __init__(self, list_key=Conf.PREFIX): def __init__(self, list_key=Conf.PREFIX):
self.connection = self.get_connection(list_key) self.connection = self.get_connection(list_key)
self.list_key = list_key self.list_key = list_key
+2 -8
View File
@@ -1,9 +1,3 @@
# Future
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import ast import ast
# Standard # Standard
@@ -36,7 +30,7 @@ from django_q.signing import SignedPackage, BadSignature
from django_q.status import Stat, Status from django_q.status import Stat, Status
class Cluster(object): class Cluster:
def __init__(self, broker=None): def __init__(self, broker=None):
self.broker = broker or get_broker() self.broker = broker or get_broker()
self.sentinel = None self.sentinel = None
@@ -120,7 +114,7 @@ class Cluster(object):
return self.start_event is None and self.stop_event is None and self.sentinel return self.start_event is None and self.stop_event is None and self.sentinel
class Sentinel(object): class Sentinel:
def __init__( def __init__(
self, self,
stop_event, stop_event,
+2 -2
View File
@@ -22,7 +22,7 @@ except ImportError:
psutil = None psutil = None
class Conf(object): class Conf:
""" """
Configuration class Configuration class
""" """
@@ -195,7 +195,7 @@ if not logger.handlers:
# Error Reporting Interface # Error Reporting Interface
class ErrorReporter(object): class ErrorReporter:
# initialize with iterator of reporters (better name, targets?) # initialize with iterator of reporters (better name, targets?)
def __init__(self, reporters): def __init__(self, reporters):
+1 -1
View File
@@ -50,7 +50,7 @@ DEFAULT_WORDLIST = (
'zulu') 'zulu')
class HumanHasher(object): class HumanHasher:
""" """
Transforms hex digests to human-readable strings. Transforms hex digests to human-readable strings.
+1 -1
View File
@@ -7,7 +7,7 @@ import multiprocessing
import multiprocessing.queues import multiprocessing.queues
class SharedCounter(object): class SharedCounter:
""" A synchronized shared counter. """ A synchronized shared counter.
The locking done by multiprocessing.Value ensures that only a single The locking done by multiprocessing.Value ensures that only a single
+2 -2
View File
@@ -11,7 +11,7 @@ from django_q.conf import Conf
BadSignature = signing.BadSignature BadSignature = signing.BadSignature
class SignedPackage(object): class SignedPackage:
"""Wraps Django's signing module with custom Pickle serializer.""" """Wraps Django's signing module with custom Pickle serializer."""
@@ -31,7 +31,7 @@ class SignedPackage(object):
serializer=PickleSerializer) serializer=PickleSerializer)
class PickleSerializer(object): class PickleSerializer:
"""Simple wrapper around Pickle for signing.dumps and signing.loads.""" """Simple wrapper around Pickle for signing.dumps and signing.loads."""
+1 -1
View File
@@ -5,7 +5,7 @@ from django_q.conf import Conf, logger
from django_q.signing import SignedPackage, BadSignature from django_q.signing import SignedPackage, BadSignature
class Status(object): class Status:
"""Cluster status base class.""" """Cluster status base class."""
def __init__(self, pid, cluster_id): def __init__(self, pid, cluster_id):
+3 -3
View File
@@ -480,7 +480,7 @@ def async_chain(chain, group=None, cached=Conf.CACHED, sync=Conf.SYNC, broker=No
return group return group
class Iter(object): class Iter:
""" """
An async task with iterable arguments An async task with iterable arguments
""" """
@@ -550,7 +550,7 @@ class Iter(object):
return len(self.args) return len(self.args)
class Chain(object): class Chain:
""" """
A sequential chain of tasks A sequential chain of tasks
""" """
@@ -634,7 +634,7 @@ class Chain(object):
return len(self.chain) return len(self.chain)
class AsyncTask(object): class AsyncTask:
""" """
an async task an async task
""" """
+1 -1
View File
@@ -22,7 +22,7 @@ from django_q.tests.tasks import multiply, TaskError
from django_q.queues import Queue from django_q.queues import Queue
class WordClass(object): class WordClass:
def __init__(self): def __init__(self):
self.word_list = DEFAULT_WORDLIST self.word_list = DEFAULT_WORDLIST
+1 -1
View File
@@ -3384,7 +3384,7 @@ import sys
import base64 import base64
import zlib import zlib
class DictImporter(object): class DictImporter:
def __init__(self, sources): def __init__(self, sources):
self.sources = sources self.sources = sources