Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 013469f

Browse filesBrowse files
hauntsaninjajbower-fb
authored andcommitted
pythongh-102500: Remove mention of bytes shorthand (python#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 (python#91896) and has different semantics (python#102092)
1 parent 2745006 commit 013469f
Copy full SHA for 013469f

File tree

1 file changed

+3
-6
lines changed
Filter options

1 file changed

+3
-6
lines changed

‎Doc/library/typing.rst

Copy file name to clipboardExpand all lines: Doc/library/typing.rst
+3-6Lines changed: 3 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.