Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: coroutine anext introduced for python versions lower than 3.10 #161

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading