8000 gh-91896: Deprecate collections.abc.ByteString by hauntsaninja · Pull Request #102096 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91896: Deprecate collections.abc.ByteString #102096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 4, 2023
Prev Previous commit
Next Next commit
pep 688 docs
  • Loading branch information
hauntsaninja committed Mar 8, 2023
commit 46404a0165b02439200dc787895874e75828d2c9
5 changes: 3 additions & 2 deletions Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,9 @@ Collections Abstract Base Classes -- Detailed Descriptions

.. deprecated:: 3.12
The :class:`ByteString` ABC has been deprecated.
For use in typing, prefer a union, like ``bytes | bytearray``.
For use as an ABC, prefer :class:`Sequence`.
For use in typing, prefer a union, like ``bytes | bytearray``, or
:class:`collections.abc.Buffer`.
For use as an ABC, prefer :class:`Sequence` or :class:`collections.abc.Buffer`.

.. class:: Set
MutableSet
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ Corresponding to collections in :mod:`collections.abc`
annotate arguments of any of the types mentioned above.

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

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

Expand Down
0