Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kazoo/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def __init__(
Should be a dict of SASL options passed to the underlying
`pure-sasl <https://pypi.org/project/pure-sasl>`_ library.

For example using the DIGEST-MD5 mechnism:
For example using the DIGEST-MD5 mechanism:

.. code-block:: python

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kazoo/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""

Expand Down
2 changes: 1 addition & 1 deletion kazoo/protocol/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion kazoo/recipe/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion kazoo/testing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion kazoo/tests/test_eventlet_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion kazoo/tests/test_gevent_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions kazoo/tests/test_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions kazoo/tests/test_threading_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down