Skip to content

Commit

Permalink
remove timestamp/timestamp_type from cython DefaultRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
dimastbk committed Apr 25, 2024
1 parent e0d1b4b commit 9875343
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
6 changes: 2 additions & 4 deletions aiokafka/record/_crecords/default_records.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ from aiokafka.record._types import (
@final
class DefaultRecord(DefaultRecordProtocol):
offset: int
timestamp: int
timestamp_type: int
key: bytes | None
value: bytes | None
headers: list[tuple[str, bytes | None]]
Expand All @@ -35,10 +37,6 @@ class DefaultRecord(DefaultRecordProtocol):
value: bytes | None,
headers: list[tuple[str, bytes | None]],
) -> None: ...
@property
def timestamp(self) -> int | None: ...
@property
def timestamp_type(self) -> int | None: ...

@final
class DefaultRecordBatch(DefaultRecordBatchProtocol):
Expand Down
14 changes: 0 additions & 14 deletions aiokafka/record/_crecords/default_records.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -448,20 +448,6 @@ cdef class DefaultRecord:
record.headers = headers
return record

@property
def timestamp(self):
if self.timestamp != -1:
return self.timestamp
else:
return None

@property
def timestamp_type(self):
if self.timestamp != -1:
return self.timestamp_type
else:
return None

def __repr__(self):
return (
"DefaultRecord(offset={!r}, timestamp={!r}, timestamp_type={!r},"
Expand Down

0 comments on commit 9875343

Please sign in to comment.