summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-08-08 17:26:30 +0800
committerGitHub <noreply@github.com>2021-08-08 12:26:30 +0300
commit8c4fc802ed03cbebeb15686755e792bc179750e7 (patch)
tree45d6e139a6fd96096473baa556018be4010b52c4
parentba30d027a9a55a2ffd44dc8ca01d526b8705ab03 (diff)
downloadredis-py-8c4fc802ed03cbebeb15686755e792bc179750e7.tar.gz
Fix some typos. (#1496)
-rw-r--r--CHANGES6
-rwxr-xr-xredis/client.py12
-rw-r--r--redis/sentinel.py4
3 files changed, 11 insertions, 11 deletions
diff --git a/CHANGES b/CHANGES
index f4974b8..4c2ba40 100644
--- a/CHANGES
+++ b/CHANGES
@@ -400,7 +400,7 @@
* 2.10.2
* Added support for Hiredis's new bytearray support. Thanks
https://github.com/tzickel
- * POSSIBLE BACKWARDS INCOMPATBLE CHANGE: Fixed a possible race condition
+ * POSSIBLE BACKWARDS INCOMPATIBLE CHANGE: Fixed a possible race condition
when multiple threads share the same Lock instance with a timeout. Lock
tokens are now stored in thread local storage by default. If you have
code that acquires a lock in one thread and passes that lock instance to
@@ -455,12 +455,12 @@
* Fixed Sentinel state parsing on Python 3.
* Added support for SENTINEL MONITOR, SENTINEL REMOVE, and SENTINEL SET
commands. Thanks Greg Murphy.
- * INFO ouput that doesn't follow the "key:value" format will now be
+ * INFO output that doesn't follow the "key:value" format will now be
appended to a key named "__raw__" in the INFO dictionary. Thanks Pedro
Larroy.
* The "vagrant" directory contains a complete vagrant environment for
redis-py developers. The environment runs a Redis master, a Redis slave,
- and 3 Sentinels. Future iterations of the test sutie will incorporate
+ and 3 Sentinels. Future iterations of the test suite will incorporate
more integration style tests, ensuring things like failover happen
correctly.
* It's now possible to create connection pool instances from a URL.
diff --git a/redis/client.py b/redis/client.py
index 019ff4f..5d1cd2c 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -469,7 +469,7 @@ def parse_georadius_generic(response, **options):
'withhash': int
}
- # zip all output results with each casting functino to get
+ # zip all output results with each casting function to get
# the properly native Python value.
f = [lambda x: x]
f += [cast[o] for o in ['withdist', 'withhash', 'withcoord'] if options[o]]
@@ -541,7 +541,7 @@ def parse_client_info(value):
key, value = info.split("=")
client_info[key] = value
- # Those fields are definded as int in networking.c
+ # Those fields are defined as int in networking.c
for int_key in {"id", "age", "idle", "db", "sub", "psub",
"multi", "qbuf", "qbuf-free", "obl",
"argv-mem", "oll", "omem", "tot-mem"}:
@@ -1592,7 +1592,7 @@ class Redis:
def bitcount(self, key, start=None, end=None):
"""
Returns the count of set bits in the value of ``key``. Optional
- ``start`` and ``end`` paramaters indicate which bytes to consider
+ ``start`` and ``end`` parameters indicate which bytes to consider
"""
params = [key]
if start is not None and end is not None:
@@ -1620,7 +1620,7 @@ class Redis:
def bitpos(self, key, bit, start=None, end=None):
"""
Return the position of the first bit set to 1 or 0 in a string.
- ``start`` and ``end`` difines search range. The range is interpreted
+ ``start`` and ``end`` defines search range. The range is interpreted
as a range of bytes and not a range of bits, so start=0 and end=2
means to look at the first three bytes.
"""
@@ -2576,7 +2576,7 @@ class Redis:
Acknowledges the successful processing of one or more messages.
name: name of the stream.
groupname: name of the consumer group.
- *ids: message ids to acknowlege.
+ *ids: message ids to acknowledge.
"""
return self.execute_command('XACK', name, groupname, *ids)
@@ -4510,7 +4510,7 @@ class Script:
try:
return client.evalsha(self.sha, len(keys), *args)
except NoScriptError:
- # Maybe the client is pointed to a differnet server than the client
+ # Maybe the client is pointed to a different server than the client
# that created this instance?
# Overwrite the sha just in case there was a discrepancy.
self.sha = client.script_load(self.script)
diff --git a/redis/sentinel.py b/redis/sentinel.py
index b9d77f1..f39e2e7 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -245,7 +245,7 @@ class Sentinel:
Returns a redis client instance for the ``service_name`` master.
A :py:class:`~redis.sentinel.SentinelConnectionPool` class is
- used to retrive the master's address before establishing a new
+ used to retrieve the master's address before establishing a new
connection.
NOTE: If the master's address has changed, any cached connections to
@@ -274,7 +274,7 @@ class Sentinel:
"""
Returns redis client instance for the ``service_name`` slave(s).
- A SentinelConnectionPool class is used to retrive the slave's
+ A SentinelConnectionPool class is used to retrieve the slave's
address before establishing a new connection.
By default clients will be a :py:class:`~redis.Redis` instance.