summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMads Jensen <mje@inducks.org>2022-01-30 13:34:54 +0100
committerGitHub <noreply@github.com>2022-01-30 18:34:54 +0600
commit31a84d5b3d871fc59c38281127cd178b7ddd150e (patch)
tree60295a6589f93f565c5050a92942d8a9d0da3a84
parent3ec6dc0fd1e9af32bddd058dda105d97804cdbdd (diff)
downloadkombu-31a84d5b3d871fc59c38281127cd178b7ddd150e.tar.gz
Some small updates (#1486)
* Some small updates * Update QpidException super-call to Python 3 syntax.
-rw-r--r--docs/userguide/simple.rst2
-rw-r--r--kombu/asynchronous/aws/sqs/queue.py2
-rw-r--r--kombu/asynchronous/http/base.py2
-rw-r--r--kombu/asynchronous/semaphore.py9
-rw-r--r--t/unit/transport/test_qpid.py2
5 files changed, 7 insertions, 10 deletions
diff --git a/docs/userguide/simple.rst b/docs/userguide/simple.rst
index 8d86711c..41daae52 100644
--- a/docs/userguide/simple.rst
+++ b/docs/userguide/simple.rst
@@ -61,7 +61,7 @@ to produce and consume logging messages:
from kombu import Connection
- class Logger(object):
+ class Logger:
def __init__(self, connection, queue_name='log_queue',
serializer='json', compression=None):
diff --git a/kombu/asynchronous/aws/sqs/queue.py b/kombu/asynchronous/aws/sqs/queue.py
index 50b0be55..facd9588 100644
--- a/kombu/asynchronous/aws/sqs/queue.py
+++ b/kombu/asynchronous/aws/sqs/queue.py
@@ -12,7 +12,7 @@ def list_first(rs):
return rs[0] if len(rs) == 1 else None
-class AsyncQueue():
+class AsyncQueue:
"""Async SQS Queue."""
def __init__(self, connection=None, url=None, message_class=AsyncMessage):
diff --git a/kombu/asynchronous/http/base.py b/kombu/asynchronous/http/base.py
index e8d5043b..2bd28076 100644
--- a/kombu/asynchronous/http/base.py
+++ b/kombu/asynchronous/http/base.py
@@ -61,7 +61,7 @@ class Request:
auth_password (str): Password for HTTP authentication.
auth_mode (str): Type of HTTP authentication (``basic`` or ``digest``).
user_agent (str): Custom user agent for this request.
- network_interace (str): Network interface to use for this request.
+ network_interface (str): Network interface to use for this request.
on_ready (Callable): Callback to be called when the response has been
received. Must accept single ``response`` argument.
on_stream (Callable): Optional callback to be called every time body
diff --git a/kombu/asynchronous/semaphore.py b/kombu/asynchronous/semaphore.py
index 9fe34a04..4af1e7f0 100644
--- a/kombu/asynchronous/semaphore.py
+++ b/kombu/asynchronous/semaphore.py
@@ -12,18 +12,15 @@ class LaxBoundedSemaphore:
range even if released more times than it was acquired.
Example:
- >>> from future import print_statement as printf
- # ^ ignore: just fooling stupid pyflakes
-
>>> x = LaxBoundedSemaphore(2)
- >>> x.acquire(printf, 'HELLO 1')
+ >>> x.acquire(print, 'HELLO 1')
HELLO 1
- >>> x.acquire(printf, 'HELLO 2')
+ >>> x.acquire(print, 'HELLO 2')
HELLO 2
- >>> x.acquire(printf, 'HELLO 3')
+ >>> x.acquire(print, 'HELLO 3')
>>> x._waiters # private, do not access directly
[print, ('HELLO 3',)]
diff --git a/t/unit/transport/test_qpid.py b/t/unit/transport/test_qpid.py
index 351a929b..d3866364 100644
--- a/t/unit/transport/test_qpid.py
+++ b/t/unit/transport/test_qpid.py
@@ -33,7 +33,7 @@ class QpidException(Exception):
"""
def __init__(self, code=None, text=None):
- super(Exception, self).__init__(self)
+ super().__init__(self)
self.code = code
self.text = text