Skip to content

Commit 9016c02

Browse files
authored
Remove unused kafka.protocol.message bits (#2705)
1 parent f6fc5ef commit 9016c02

3 files changed

Lines changed: 4 additions & 416 deletions

File tree

kafka/protocol/message.py

Lines changed: 0 additions & 214 deletions
This file was deleted.

kafka/util.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@
77
from kafka.errors import KafkaTimeoutError
88

99

10-
MAX_INT = 2 ** 31
11-
TO_SIGNED = 2 ** 32
12-
13-
def crc32(data):
14-
crc = binascii.crc32(data)
15-
# CRC is encoded as a signed int in kafka protocol
16-
# so we'll convert the unsigned result to signed
17-
if crc >= MAX_INT:
18-
crc -= TO_SIGNED
19-
return crc
20-
21-
2210
class Timer:
2311
__slots__ = ('_start_at', '_expire_at', '_timeout_ms', '_error_message')
2412

0 commit comments

Comments
 (0)