@@ -9,14 +9,27 @@ Pending removal in Python 3.17
9
9
3.17. Users should use documented introspection helpers like :func: `typing.get_origin `
10
10
and :func: `typing.get_args ` instead of relying on private implementation details.
11
11
- :class: `typing.ByteString `, deprecated since Python 3.9, is scheduled for removal in
12
- Python 3.17. Prefer :class: `~collections.abc.Sequence ` or
13
- :class: `~collections.abc.Buffer `. For use in type annotations, prefer a union, like
14
- ``bytes | bytearray ``, or :class: `collections.abc.Buffer `.
12
+ Python 3.17.
13
+
14
+ ``ByteString `` was originally intended to be an abstract type that would serve as a
15
+ supertype of both :class: `bytes ` and :class: `bytearray `, but its semantics were never
16
+ clearly specified, and it was never understood properly by type checkers. See
17
+ :pep: `PEP 688 <688#current-options >` for more details.
18
+
19
+ Prefer :class: `~collections.abc.Sequence ` or :class: `~collections.abc.Buffer `. For
20
+ use in type annotations, prefer a union, like ``bytes | bytearray ``, or
21
+ :class: `collections.abc.Buffer `.
15
22
(Contributed by Shantanu Jain in :gh: `91896 `.)
16
23
17
24
* :mod: `collections.abc `:
18
25
19
- - :class: `collections.abc.ByteString ` is scheduled for removal in Python 3.17. Prefer
20
- :class: `~collections.abc.Sequence ` or :class: `~collections.abc.Buffer `. For use in
21
- type annotations, prefer a union, like ``bytes | bytearray ``, or
26
+ - :class: `collections.abc.ByteString ` is scheduled for removal in Python 3.17.
27
+
28
+ ``ByteString `` was originally intended to be an abstract type that would serve as a
29
+ supertype of both :class: `bytes ` and :class: `bytearray `, but its semantics were never
30
+ clearly specified, and it was never understood properly by type checkers. See
31
+ :pep: `PEP 688 <688#current-options >` for more details.
32
+
33
+ Prefer :class: `~collections.abc.Sequence ` or :class: `~collections.abc.Buffer `. For
34
+ use in type annotations, prefer a union, like ``bytes | bytearray ``, or
22
35
:class: `collections.abc.Buffer `. (Contributed by Shantanu Jain in :gh: `91896 `.)
0 commit comments