11Pending removal in Python 3.17
22------------------------------
33
4+ * :mod: `collections.abc `:
5+
6+ - :class: `collections.abc.ByteString ` is scheduled for removal in Python 3.17.
7+
8+ ``ByteString `` was originally intended to be an abstract type that would serve as a
9+ supertype of both :class: `bytes ` and :class: `bytearray `, but its semantics were never
10+ clearly specified, and it was never understood properly by type checkers. See
11+ :pep: `PEP 688 <688#current-options >` for more details.
12+
13+ Prefer :class: `~collections.abc.Sequence ` or :class: `~collections.abc.Buffer `. For
14+ use in type annotations, prefer a union, like ``bytes | bytearray ``, or
15+ :class: `collections.abc.Buffer `. (Contributed by Shantanu Jain in :gh: `91896 `.)
16+
417* :mod: `typing `:
518
619 - Before Python 3.14, old-style unions were implemented using the private class
@@ -20,16 +33,3 @@ Pending removal in Python 3.17
2033 use in type annotations, prefer a union, like ``bytes | bytearray ``, or
2134 :class: `collections.abc.Buffer `.
2235 (Contributed by Shantanu Jain in :gh: `91896 `.)
23-
24- * :mod: `collections.abc `:
25-
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
35- :class: `collections.abc.Buffer `. (Contributed by Shantanu Jain in :gh: `91896 `.)
0 commit comments