Skip to content

Commit

Permalink
fix: coroutine anext introduced for python versions lower than 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosschroh committed Jan 23, 2024
1 parent bb3b518 commit da88cf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kstreams/streams.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import asyncio
import inspect
import logging
import sys
import uuid
from functools import update_wrapper
from typing import (
Any,
AsyncGenerator,
Awaitable,
Callable,
Dict,
Expand Down Expand Up @@ -32,6 +34,12 @@
StreamFunc = Callable


if sys.version_info < (3, 10):

async def anext(async_gen: AsyncGenerator):
return await async_gen.__anext__()


class Stream:
"""
Attributes:
Expand Down

0 comments on commit da88cf3

Please sign in to comment.