Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Attempt to clarify the ByteString situation
See python/cpython#102092

This makes the behaviour of typing.ByteString better match its
documentation.

I also remove collections.abc.ByteString. There is no legitimate use
case for it. Let me know if you think there's a case where it would help
users to have this around.
  • Loading branch information
hauntsaninja committed Feb 20, 2023
commit 4ad291f42fd9624cd187f596748cc9df47f2e35f
1 change: 0 additions & 1 deletion stdlib/_collections_abc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ from typing import ( # noqa: Y022,Y038
AsyncIterable as AsyncIterable,
AsyncIterator as AsyncIterator,
Awaitable as Awaitable,
ByteString as ByteString,
Callable as Callable,
Collection as Collection,
Container as Container,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ class TextIO(IO[str]):
@abstractmethod
def __enter__(self) -> TextIO: ...

class ByteString(Sequence[int], metaclass=ABCMeta): ...
ByteString = bytes | bytearray | memoryview

# Functions

Expand Down