[3.11] gh-102500: Remove mention of bytes shorthand (#104281) (#104288) · python/cpython@499b79d

GitHub

Original file line numberDiff line numberDiff line change@@ -2090,17 +2090,11 @@ Corresponding to collections in :mod:`collections.abc`

2090209020912091.. class:: ByteString(Sequence[int])

209220922093- A generic version of :class:`collections.abc.ByteString`.

2094-20952093 This type represents the types :class:`bytes`, :class:`bytearray`,

20962094 and :class:`memoryview` of byte sequences.

209720952098- As a shorthand for this type, :class:`bytes` can be used to

2099- annotate arguments of any of the types mentioned above.

2100-2101- .. deprecated:: 3.9

2102-:class:`collections.abc.ByteString` now supports subscripting (``[]``).

2103- See :pep:`585` and :ref:`types-genericalias`.

2096+ .. deprecated-removed:: 3.9 3.14

2097+ Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray | memoryview``.

2104209821052099.. class:: Collection(Sized, Iterable[T_co], Container[T_co])

21062100@@ -2892,5 +2886,7 @@ convenience. This is subject to change, and not all deprecations are listed.

28922886| ``typing`` versions of standard | 3.9 | Undecided |:pep:`585` |

28932887| collections ||||

28942888+----------------------------------+---------------+-------------------+----------------+

2889+| ``typing.ByteString`` | 3.9 | 3.14 |:gh:`91896` |

2890++----------------------------------+---------------+-------------------+----------------+

28952891| ``typing.Text`` | 3.11 | Undecided |:gh:`92332` |

28962892+----------------------------------+---------------+-------------------+----------------+