Skip to content

Commit 8ac79fb

Browse files
authored
Fix typos (dpkp#874)
2 parents 77591af + cd74c1f commit 8ac79fb

12 files changed

+18
-18
lines changed

CHANGES.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Consumers
123123
Producers
124124
* KAFKA-3388: Fix expiration of batches sitting in the accumulator (dpkp PR 699)
125125
* KAFKA-3197: when max.in.flight.request.per.connection = 1, attempt to guarantee ordering (dpkp PR 698)
126-
* Dont use soon-to-be-reserved keyword await as function name (FutureProduceResult) (dpkp PR 697)
126+
* Don't use soon-to-be-reserved keyword await as function name (FutureProduceResult) (dpkp PR 697)
127127

128128
Clients
129129
* Fix socket leaks in KafkaClient (dpkp PR 696)
@@ -241,7 +241,7 @@ Documentation
241241
* Migrate load_example.py to KafkaProducer / KafkaConsumer
242242

243243
Internals
244-
* Dont override system rcvbuf or sndbuf unless configured explicitly (dpkp PR 557)
244+
* Don't override system rcvbuf or sndbuf unless configured explicitly (dpkp PR 557)
245245
* Some attributes may not exist in __del__ if we failed assertions
246246
* Break up some circular references and close client wake pipes on __del__ (aisch PR 554)
247247

build_integration.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ -z "$SCALA_VERSION" ]; then
99
fi
1010

1111
# On travis CI, empty KAFKA_VERSION means skip integration tests
12-
# so we dont try to get binaries
12+
# so we don't try to get binaries
1313
# Otherwise it means test all official releases, so we get all of them!
1414
if [ -z "$KAFKA_VERSION" -a -z "$TRAVIS" ]; then
1515
KAFKA_VERSION=$OFFICIAL_RELEASES

docs/changelog.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Producers
148148
---------
149149
* KAFKA-3388: Fix expiration of batches sitting in the accumulator (dpkp PR 699)
150150
* KAFKA-3197: when max.in.flight.request.per.connection = 1, attempt to guarantee ordering (dpkp PR 698)
151-
* Dont use soon-to-be-reserved keyword await as function name (FutureProduceResult) (dpkp PR 697)
151+
* Don't use soon-to-be-reserved keyword await as function name (FutureProduceResult) (dpkp PR 697)
152152

153153
Clients
154154
-------
@@ -292,7 +292,7 @@ Documentation
292292

293293
Internals
294294
---------
295-
* Dont override system rcvbuf or sndbuf unless configured explicitly (dpkp PR 557)
295+
* Don't override system rcvbuf or sndbuf unless configured explicitly (dpkp PR 557)
296296
* Some attributes may not exist in __del__ if we failed assertions
297297
* Break up some circular references and close client wake pipes on __del__ (aisch PR 554)
298298

docs/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ KafkaConsumer
2020
message.offset, message.key,
2121
message.value))
2222
23-
# consume earliest available messages, dont commit offsets
23+
# consume earliest available messages, don't commit offsets
2424
KafkaConsumer(auto_offset_reset='earliest', enable_auto_commit=False)
2525
2626
# consume json messages

kafka/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def load_metadata_for_topics(self, *topics, **kwargs):
576576
if leader in self.brokers:
577577
self.topics_to_brokers[topic_part] = self.brokers[leader]
578578

579-
# If Unknown Broker, fake BrokerMetadata so we dont lose the id
579+
# If Unknown Broker, fake BrokerMetadata so we don't lose the id
580580
# (not sure how this could happen. server could be in bad state)
581581
else:
582582
self.topics_to_brokers[topic_part] = BrokerMetadata(

kafka/client_async.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def close(self, node_id=None):
362362
return
363363

364364
def is_disconnected(self, node_id):
365-
"""Check whether the node connection has been disconnected failed.
365+
"""Check whether the node connection has been disconnected or failed.
366366
367367
A disconnected node has either been closed or has failed. Connection
368368
failures are usually transient and can be resumed in the next ready()
@@ -497,7 +497,7 @@ def poll(self, timeout_ms=None, future=None, sleep=True):
497497
else:
498498
task_future.success(result)
499499

500-
# If we got a future that is already done, dont block in _poll
500+
# If we got a future that is already done, don't block in _poll
501501
if future and future.is_done:
502502
timeout = 0
503503
else:

kafka/conn.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self, host, port, afi, **configs):
140140
api_version_auto_timeout_ms (int): number of milliseconds to throw a
141141
timeout exception from the constructor when checking the broker
142142
api version. Only applies if api_version is None
143-
state_chance_callback (callable): function to be called when the
143+
state_change_callback (callable): function to be called when the
144144
connection state changes from CONNECTING to CONNECTED etc.
145145
metrics (kafka.metrics.Metrics): Optionally provide a metrics
146146
instance for capturing network IO stats. Default: None.
@@ -291,7 +291,7 @@ def connect(self):
291291
' Disconnecting.', self, ret)
292292
self.close()
293293

294-
# Connection timedout
294+
# Connection timed out
295295
elif time.time() > request_timeout + self.last_attempt:
296296
log.error('Connection attempt to %s timed out', self)
297297
self.close() # error=TimeoutError ?

kafka/consumer/group.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class KafkaConsumer(six.Iterator):
8484
auto_offset_reset (str): A policy for resetting offsets on
8585
OffsetOutOfRange errors: 'earliest' will move to the oldest
8686
available message, 'latest' will move to the most recent. Any
87-
ofther value will raise the exception. Default: 'latest'.
87+
other value will raise the exception. Default: 'latest'.
8888
enable_auto_commit (bool): If true the consumer's offset will be
8989
periodically committed in the background. Default: True.
9090
auto_commit_interval_ms (int): milliseconds between automatic
@@ -194,7 +194,7 @@ class KafkaConsumer(six.Iterator):
194194
sasl_plain_username (str): username for sasl PLAIN authentication.
195195
Default: None
196196
sasl_plain_password (str): password for sasl PLAIN authentication.
197-
Defualt: None
197+
Default: None
198198
199199
Note:
200200
Configuration parameters are described in more detail at
@@ -596,7 +596,7 @@ def highwater(self, partition):
596596
one greater than the newest available message.
597597
598598
Highwater offsets are returned in FetchResponse messages, so will
599-
not be available if not FetchRequests have been sent for this partition
599+
not be available if no FetchRequests have been sent for this partition
600600
yet.
601601
602602
Arguments:

kafka/producer/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _send_upstream(queue, client, codec, batch_time, batch_size,
104104
msgset = defaultdict(list)
105105

106106
# Merging messages will require a bit more work to manage correctly
107-
# for now, dont look for new batches if we have old ones to retry
107+
# for now, don't look for new batches if we have old ones to retry
108108
if request_tries:
109109
count = 0
110110
log.debug('Skipping new batch collection to handle retries')

test/test_failover_integration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_switch_leader(self):
7070
# kill leader for partition
7171
self._kill_leader(topic, partition)
7272

73-
# expect failure, but dont wait more than 60 secs to recover
73+
# expect failure, but don't wait more than 60 secs to recover
7474
recovered = False
7575
started = time.time()
7676
timeout = 60

test/test_partitioner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ def test_murmur2_java_compatibility():
6565

6666

6767
def test_murmur2_not_ascii():
68-
# Verify no regression of murmur2() bug encoding py2 bytes that dont ascii encode
68+
# Verify no regression of murmur2() bug encoding py2 bytes that don't ascii encode
6969
murmur2(b'\xa4')
7070
murmur2(b'\x81' * 1000)

test/test_producer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_end_to_end(kafka_broker, compression):
3131
# LZ4 requires 0.8.2
3232
if version() < (0, 8, 2):
3333
return
34-
# LZ4 python libs dont work on python2.6
34+
# LZ4 python libs don't work on python2.6
3535
elif sys.version_info < (2, 7):
3636
return
3737

0 commit comments

Comments
 (0)