Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored and auvipy committed Nov 6, 2021
1 parent fa4c4bb commit c1fe574
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Changelog
Expand Up @@ -167,7 +167,7 @@ Code Cleanups & Improvements:
:release-by: Asif Saif Uddin

- Fix buffer overflow in frame_writer after frame_max is increased. `frame_writer`
allocates a `bytearray` on intialization with a length based on the `connection.frame_max`
allocates a `bytearray` on initialization with a length based on the `connection.frame_max`
value. If `connection.frame_max` is changed to a larger value, this causes an
error like `pack_into requires a buffer of at least 408736 bytes`.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -39,7 +39,7 @@ help:
@echo "readme - Regenerate README.rst file."
@echo "contrib - Regenerate CONTRIBUTING.rst file"
@echo "clean-dist --------- - Clean all distribution build artifacts."
@echo " clean-git-force - Remove all uncomitted files."
@echo " clean-git-force - Remove all uncommitted files."
@echo " clean ------------ - Non-destructive clean"
@echo " clean-pyc - Remove .pyc/__pycache__ files"
@echo " clean-docs - Remove documentation build artifacts."
Expand Down
2 changes: 1 addition & 1 deletion amqp/abstract_channel.py
Expand Up @@ -68,7 +68,7 @@ def send_method(self, sig,

def close(self):
"""Close this Channel or Connection."""
raise NotImplementedError('Must be overriden in subclass')
raise NotImplementedError('Must be overridden in subclass')

def wait(self, method, callback=None, timeout=None, returns_tuple=False):
p = ensure_promise(callback)
Expand Down
2 changes: 1 addition & 1 deletion amqp/channel.py
Expand Up @@ -1380,7 +1380,7 @@ def basic_ack(self, delivery_tag, multiple=False, argsig='Lb'):
False, the delivery tag refers to a single message.
If the multiple field is True, and the delivery tag
is zero, tells the server to acknowledge all
outstanding mesages.
outstanding messages.
RULE:
Expand Down
2 changes: 1 addition & 1 deletion amqp/connection.py
Expand Up @@ -104,7 +104,7 @@ class Connection(AbstractChannel):
When "confirm_publish" is set to True, the channel is put to
confirm mode. In this mode, each published message is
confirmed using Publisher confirms RabbitMQ extention.
confirmed using Publisher confirms RabbitMQ extension.
"""

Channel = Channel
Expand Down
4 changes: 2 additions & 2 deletions amqp/transport.py
Expand Up @@ -256,7 +256,7 @@ def _set_socket_options(self, socket_settings):

def _read(self, n, initial=False):
"""Read exactly n bytes from the peer."""
raise NotImplementedError('Must be overriden in subclass')
raise NotImplementedError('Must be overridden in subclass')

def _setup_transport(self):
"""Do any additional initialization of the class."""
Expand All @@ -268,7 +268,7 @@ def _shutdown_transport(self):

def _write(self, s):
"""Completely write a string to the peer."""
raise NotImplementedError('Must be overriden in subclass')
raise NotImplementedError('Must be overridden in subclass')

def close(self):
if self.sock is not None:
Expand Down
14 changes: 7 additions & 7 deletions t/integration/test_integration.py
Expand Up @@ -114,7 +114,7 @@ def build_frame_type_3(channel, body):

class DataComparator:
# Comparator used for asserting serialized data. It can be used
# in cases when direct comparision of bytestream cannot be used
# in cases when direct comparison of bytestream cannot be used
# (mainly cases of Table type where order of items can vary)
def __init__(self, argsig, items):
self.argsig = argsig
Expand Down Expand Up @@ -367,7 +367,7 @@ def test_connection_close(self):
@patch('amqp.Connection._on_blocked')
def test_connecion_ignore_methods_during_close(self, on_blocked_mock):
# Test checking that py-amqp will discard any received methods
# except Close and Close-OK after sending Connecion.Close method
# except Close and Close-OK after sending Connection.Close method
# to server.
frame_writer_cls_mock = Mock()
frame_writer_mock = frame_writer_cls_mock()
Expand Down Expand Up @@ -601,7 +601,7 @@ def test_channel_methods(self, method, callback):
callback_mock.assert_called_once()

def test_basic_publish(self):
# Test verifing publishing message.
# Test verifying publishing message.
frame_writer_cls_mock = Mock()
conn = Connection(frame_writer=frame_writer_cls_mock)
with patch.object(conn, 'Transport') as transport_mock:
Expand All @@ -621,7 +621,7 @@ def test_basic_publish(self):
)

def test_consume_no_consumer_tag(self):
# Test verifing starting consuming without specified consumer_tag
# Test verifying starting consuming without specified consumer_tag
callback_mock = Mock()
frame_writer_cls_mock = Mock()
conn = Connection(frame_writer=frame_writer_cls_mock)
Expand Down Expand Up @@ -652,7 +652,7 @@ def test_consume_no_consumer_tag(self):
assert ret == 'amq.ctag-PCmzXGkhCw_v0Zq7jXyvkg'

def test_consume_with_consumer_tag(self):
# Test verifing starting consuming with specified consumer_tag
# Test verifying starting consuming with specified consumer_tag
callback_mock = Mock()
frame_writer_cls_mock = Mock()
conn = Connection(frame_writer=frame_writer_cls_mock)
Expand Down Expand Up @@ -745,7 +745,7 @@ def test_queue_declare_error(self, reply_code, reply_text, exception):
assert excinfo.value.method_sig == spec.Exchange.Declare
# Client is sending to broker:
# 1. Exchange Declare
# 2. Connection.CloseOk as reply to received Connecton.Close
# 2. Connection.CloseOk as reply to received Connection.Close
frame_writer_calls = [
call(
1, 1, spec.Queue.Declare,
Expand Down Expand Up @@ -1024,7 +1024,7 @@ def test_exchange_declare_error(self, reply_code, reply_text, exception):
assert excinfo.value.method_sig == spec.Exchange.Declare
# Client is sending to broker:
# 1. Exchange Declare
# 2. Connection.CloseOk as reply to received Connecton.Close
# 2. Connection.CloseOk as reply to received Connection.Close
frame_writer_calls = [
call(
1, 1, spec.Exchange.Declare,
Expand Down

0 comments on commit c1fe574

Please sign in to comment.