Skip to content

Commit 1f56795

Browse files
authored
gh-102500: Remove mention of bytes shorthand (#104281)
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 (#91896) and has different semantics (#102092)
1 parent c2683fc commit 1f56795

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Doc/library/typing.rst

+3-6
Original file line numberDiff line numberDiff line change
@@ -2130,15 +2130,10 @@ 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-
2141-
.. deprecated:: 3.9
2136+
.. deprecated-removed:: 3.9 3.14
21422137
Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray | memoryview``.
21432138

21442139
.. class:: Collection(Sized, Iterable[T_co], Container[T_co])
@@ -2977,6 +2972,8 @@ convenience. This is subject to change, and not all deprecations are listed.
29772972
| ``typing`` versions of standard | 3.9 | Undecided | :pep:`585` |
29782973
| collections | | | |
29792974
+----------------------------------+---------------+-------------------+----------------+
2975+
| ``typing.ByteString`` | 3.9 | 3.14 | :gh:`91896` |
2976+
+----------------------------------+---------------+-------------------+----------------+
29802977
| ``typing.Text`` | 3.11 | Undecided | :gh:`92332` |
29812978
+----------------------------------+---------------+-------------------+----------------+
29822979
| ``typing.Hashable`` and | 3.12 | Undecided | :gh:`94309` |

0 commit comments

Comments
 (0)