Skip to content

Commit e807bce

Browse files
committed
pythongh-102500: Remove mention of bytes shorthand
The bytes shorthand was removed in PEP 688: https://peps.python.org/pep-0688/#no-special-meaning-for-bytes I also remove the reference to `collections.abc.ByteString`, since that object is deprecated (python#91896) and has different semantics (python#102092) I think it would be good to backport this since the changes in the type system are immediate and apply to all versions of Python.
1 parent 01cc9c1 commit e807bce

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Doc/library/typing.rst

-5
Original file line numberDiff line numberDiff line change
@@ -2130,14 +2130,9 @@ Corresponding to collections in :mod:`collections.abc`
21302130

21312131
.. class:: ByteString(Sequence[int])
21322132

2133-
A generic version of :class:`collections.abc.ByteString`.
2134-
21352133
This type represents the types :class:`bytes`, :class:`bytearray`,
21362134
and :class:`memoryview` of byte sequences.
21372135

2138-
As a shorthand for this type, :class:`bytes` can be used to
2139-
annotate arguments of any of the types mentioned above.
2140-
21412136
.. deprecated:: 3.9
21422137
Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray | memoryview``.
21432138

0 commit comments

Comments
 (0)