Skip to content

Commit 9522dd8

Browse files
committed
chore: revert ServerSentEventIterator
1 parent c76c936 commit 9522dd8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

litestar/response/sse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
DEFAULT_SEPARATOR = "\r\n"
2020

2121

22-
class ServerSentEventIterator(AsyncIteratorWrapper[bytes, None]):
22+
class _ServerSentEventIterator(AsyncIteratorWrapper[bytes, None]):
2323
__slots__ = ("comment_message", "content_async_iterator", "event_id", "event_type", "retry_duration")
2424

2525
content_async_iterator: AsyncGenerator[SSEData]
@@ -164,7 +164,7 @@ def __init__(
164164
comment_message: A comment message. This value is ignored by clients and is used mostly for pinging.
165165
"""
166166
super().__init__(
167-
content=ServerSentEventIterator(
167+
content=_ServerSentEventIterator(
168168
content=content,
169169
event_type=event_type,
170170
event_id=event_id,

litestar/utils/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __call__(self, *args: P.args, **kwargs: P.kwargs) -> Awaitable[T]: # type:
6969
class AsyncIteratorWrapper(AsyncGenerator[T, S]):
7070
"""Asynchronous generator, wrapping an iterable or iterator."""
7171

72-
__slots__ = ("_original_iterator", "generator", "iterator")
72+
__slots__ = ("_original_generator", "generator", "iterator")
7373

7474
def __init__(self, iterable: Iterable[T]) -> None:
7575
"""Take a sync iterator or iterable and yields values from it asynchronously.

0 commit comments

Comments
 (0)