Skip to content

Commit 567a205

Browse files
authored
[kafka-python] Update to 2.3.2 (#15864)
Add a few additional annotations
1 parent 0ffff97 commit 567a205

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

stubs/kafka-python/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "2.3.*"
1+
version = "2.3.2"
22
upstream-repository = "https://github.com/dpkp/kafka-python"

stubs/kafka-python/kafka/errors.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class KafkaProtocolError(KafkaError):
2626
class CorrelationIdError(KafkaProtocolError):
2727
retriable: bool
2828

29+
class InvalidReceiveError(KafkaProtocolError): ...
30+
2931
class KafkaTimeoutError(KafkaError):
3032
retriable: bool
3133

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
from _typeshed import Incomplete
2+
from collections import deque
3+
from logging import Logger
24

3-
log: Incomplete
5+
log: Logger
46

57
class KafkaProtocol:
6-
in_flight_requests: Incomplete
7-
bytes_to_send: Incomplete
8-
def __init__(self, client_id=None, api_version=None) -> None: ...
9-
def send_request(self, request, correlation_id=None): ...
10-
def send_bytes(self): ...
11-
def receive_bytes(self, data): ...
8+
in_flight_requests: deque[tuple[int, Incomplete]]
9+
bytes_to_send: list[bytes]
10+
def __init__(
11+
self, client_id: str | None = None, api_version: tuple[int, int, int] | None = None, max_frame_size: int = 100000000
12+
) -> None: ...
13+
def send_request(self, request, correlation_id: int | None = None) -> int: ...
14+
def send_bytes(self) -> bytes: ...
15+
def receive_bytes(self, data: bytes) -> list[Incomplete]: ...

0 commit comments

Comments
 (0)