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

Use SyncByteStream instead of ByteStream #298

Merged
merged 3 commits into from
Jan 5, 2025

Conversation

seowalex
Copy link
Contributor

@seowalex seowalex commented Jan 1, 2025

The synchronous version of AsyncByteStream is actually SyncByteStream, not ByteStream:

class ByteStream(AsyncByteStream, SyncByteStream):
    def __init__(self, stream: bytes) -> None:
        ...

    def __iter__(self) -> Iterator[bytes]:
        ...

    async def __aiter__(self) -> AsyncIterator[bytes]:
        ...
class SyncByteStream:
    def __iter__(self) -> Iterator[bytes]:
        ...

    def close(self) -> None:
        ...

@karpetrosyan
Copy link
Owner

Thanks for the PR 🙏 right, we should use SyncByteStream not the ByteStream...
Can we also have a changelog please?

@seowalex
Copy link
Contributor Author

seowalex commented Jan 1, 2025

Done!

@karpetrosyan
Copy link
Owner

Thank you! Greate job 👍

@karpetrosyan karpetrosyan merged commit f97d66b into karpetrosyan:master Jan 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants