Skip to content

Conversation

@bmerry
Copy link
Contributor

@bmerry bmerry commented Apr 14, 2024

bmerry and others added 2 commits April 14, 2024 10:30
- Make use of ReadableBuffer to generalise the arguments accepted
  (implementing the suggestion made in a comment).
- Support a tuple of separators in Python 3.13, as implemented in
  python/cpython#16429 and python/cpython#117723.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and congratulations on getting that PR merged after only short five years. :) On issue below.

# Can be any buffer that supports len(); consider changing to a Protocol if PEP 688 is accepted
async def readuntil(self, separator: bytes | bytearray | memoryview = b"\n") -> bytes: ...
if sys.version_info >= (3, 13):
async def readuntil(self, separator: _ReaduntilBuffer | tuple[_ReaduntilBuffer] = b"\n") -> bytes: ...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
async def readuntil(self, separator: _ReaduntilBuffer | tuple[_ReaduntilBuffer] = b"\n") -> bytes: ...
async def readuntil(self, separator: _ReaduntilBuffer | tuple[_ReaduntilBuffer, ...] = b"\n") -> bytes: ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'm always making that mistake with tuples. Fixed now.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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