Initial python3 changes

Mostly just updating libraries, removing string encoding/decoding,
fixing some edge cases. No new functionality was added in this
commit.
This commit is contained in:
rembo10
2022-01-14 10:38:03 +05:30
parent 9a7006ad14
commit ab4dd18be4
813 changed files with 146338 additions and 65753 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ This module contains classes which help you work with Redis queues.
from logutils.queue import QueueHandler, QueueListener
try:
import cPickle as pickle
import pickle as pickle
except ImportError:
import pickle
@@ -25,7 +25,7 @@ class RedisQueueHandler(QueueHandler):
"""
def __init__(self, key='python.logging', redis=None, limit=0):
if redis is None:
from redis import Redis
from .redis import Redis
redis = Redis()
self.key = key
assert limit >= 0
@@ -51,7 +51,7 @@ class RedisQueueListener(QueueListener):
def __init__(self, *handlers, **kwargs):
redis = kwargs.get('redis')
if redis is None:
from redis import Redis
from .redis import Redis
redis = Redis()
self.key = kwargs.get('key', 'python.logging')
QueueListener.__init__(self, redis, *handlers)