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
what's new, removed
  • Loading branch information
hauntsaninja committed Mar 9, 2023
commit dc22a743d89f6f3211ccd3b37336345a2d3986b1
2 changes: 1 addition & 1 deletion Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Collections Abstract Base Classes -- Detailed Descriptions
The index() method added support for *stop* and *start*
arguments.

.. deprecated:: 3.12
.. deprecated-removed:: 3.12 3.14
The :class:`ByteString` ABC has been deprecated.
For use in typing, prefer a union, like ``bytes | bytearray``, or
:class:`collections.abc.Buffer`.
Expand Down
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ Deprecated
* :class:`typing.Hashable` and :class:`typing.Sized` aliases for :class:`collections.abc.Hashable`
and :class:`collections.abc.Sized`. (:gh:`94309`.)

* :class:`collections.abc.ByteString`, prefer :class:`Sequence` or :class:`collections.abc.Buffer`.
For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`.
(Contributed by Shantanu Jain in :gh:`102096`.)

* The :mod:`sqlite3` :ref:`default adapters and converters
<sqlite3-default-converters>` are now deprecated.
Instead, use the :ref:`sqlite3-adapter-converter-recipes`
Expand Down
0