diff --git a/kazoo/client.py b/kazoo/client.py index 7ee4e836..3029d1c5 100644 --- a/kazoo/client.py +++ b/kazoo/client.py @@ -144,7 +144,7 @@ def __init__( Should be a dict of SASL options passed to the underlying `pure-sasl `_ library. - For example using the DIGEST-MD5 mechnism: + For example using the DIGEST-MD5 mechanism: .. code-block:: python @@ -1606,7 +1606,7 @@ def reconfig(self, joining, leaving, new_members, from_config=-1): :exc:`~kazoo.exceptions.NewConfigNoQuorumError` if no quorum of new config is connected and up-to-date with the leader of last - commmitted config - try invoking reconfiguration after new servers + committed config - try invoking reconfiguration after new servers are connected and synced. :exc:`~kazoo.exceptions.ReconfigInProcessError` if another diff --git a/kazoo/exceptions.py b/kazoo/exceptions.py index 9b450f8d..b24c697c 100644 --- a/kazoo/exceptions.py +++ b/kazoo/exceptions.py @@ -128,7 +128,7 @@ class UnknownSessionError(ZookeeperError): @_zookeeper_exception(-13) class NewConfigNoQuorumError(ZookeeperError): """No quorum of new config is connected and up-to-date with the leader of - last commmitted config - try invoking reconfiguration after new servers are + last committed config - try invoking reconfiguration after new servers are connected and synced. """ diff --git a/kazoo/protocol/connection.py b/kazoo/protocol/connection.py index ba30b84e..d12d6eba 100644 --- a/kazoo/protocol/connection.py +++ b/kazoo/protocol/connection.py @@ -797,7 +797,7 @@ def _authenticate_with_sasl(self, host, timeout): host=host, **self.sasl_options ) - # Inititalize the process with an empty challenge token + # Initialize the process with an empty challenge token challenge = None xid = 0 diff --git a/kazoo/recipe/lock.py b/kazoo/recipe/lock.py index 8a490394..1f524702 100644 --- a/kazoo/recipe/lock.py +++ b/kazoo/recipe/lock.py @@ -171,7 +171,7 @@ def acquire(self, blocking=True, timeout=None, ephemeral=True): retry.deadline = timeout # Ensure we are locked so that we avoid multiple threads in - # this acquistion routine at the same time... + # this acquisition routine at the same time... method_locked = self._acquire_method_lock.acquire( blocking=blocking, timeout=timeout if timeout is not None else -1 ) diff --git a/kazoo/testing/common.py b/kazoo/testing/common.py index 61716385..4f702e42 100644 --- a/kazoo/testing/common.py +++ b/kazoo/testing/common.py @@ -49,7 +49,7 @@ def debug(sig, frame): d.update(frame.f_locals) i = code.InteractiveConsole(d) - message = "Signal recieved : entering python shell.\nTraceback:\n" + message = "Signal received : entering python shell.\nTraceback:\n" message += "".join(traceback.format_stack(frame)) i.interact(message) diff --git a/kazoo/tests/test_eventlet_handler.py b/kazoo/tests/test_eventlet_handler.py index 2a201a8c..ff2649d9 100644 --- a/kazoo/tests/test_eventlet_handler.py +++ b/kazoo/tests/test_eventlet_handler.py @@ -141,7 +141,7 @@ def test_huge_file_descriptor(self): try: resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096)) except (ValueError, resource.error): - self.skipTest("couldnt raise fd limit high enough") + self.skipTest("couldn't raise fd limit high enough") fd = 0 socks = [] while fd < 4000: diff --git a/kazoo/tests/test_gevent_handler.py b/kazoo/tests/test_gevent_handler.py index fb37238d..28dd46b0 100644 --- a/kazoo/tests/test_gevent_handler.py +++ b/kazoo/tests/test_gevent_handler.py @@ -153,7 +153,7 @@ def test_huge_file_descriptor(self): try: resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096)) except (ValueError, resource.error): - self.skipTest("couldnt raise fd limit high enough") + self.skipTest("couldn't raise fd limit high enough") fd = 0 socks = [] while fd < 4000: diff --git a/kazoo/tests/test_retry.py b/kazoo/tests/test_retry.py index c26d3997..acbe5bd9 100644 --- a/kazoo/tests/test_retry.py +++ b/kazoo/tests/test_retry.py @@ -60,13 +60,13 @@ def test_maximum_delay(): retry = _make_retry(delay=10, max_tries=100, max_jitter=0) func = _make_try_func(times=2) retry(func) - assert func.call_count == 3, "Called 3 times, 2 failed _attemps" + assert func.call_count == 3, "Called 3 times, 2 failed _attempts" assert retry._cur_delay == 10 * 2**2, "Normal exponential backoff" retry.reset() func = _make_try_func(times=10) retry(func) - assert func.call_count == 11, "Called 11 times, 10 failed _attemps" - assert retry._cur_delay == 60, "Delay capped by maximun" + assert func.call_count == 11, "Called 11 times, 10 failed _attempts" + assert retry._cur_delay == 60, "Delay capped by maximum" # gevent's sleep function is picky about the type assert isinstance(retry._cur_delay, float) diff --git a/kazoo/tests/test_threading_handler.py b/kazoo/tests/test_threading_handler.py index 77997876..eac4ea9f 100644 --- a/kazoo/tests/test_threading_handler.py +++ b/kazoo/tests/test_threading_handler.py @@ -55,7 +55,7 @@ def test_huge_file_descriptor(self): try: resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096)) except (ValueError, resource.error): - self.skipTest("couldnt raise fd limit high enough") + self.skipTest("couldn't raise fd limit high enough") fd = 0 socks = [] while fd < 4000: @@ -106,7 +106,7 @@ def test_set_exception(self): mock_handler.completion_queue = Mock() async_result = self._makeOne(mock_handler) async_result.rawlink(lambda a: a) - async_result.set_exception(ImportError("Error occured")) + async_result.set_exception(ImportError("Error occurred")) assert isinstance(async_result.exception, ImportError) assert mock_handler.completion_queue.put.called