Skip to content

gh-91896: Fixup some docs issues following ByteString deprecation #104422

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

.. testsetup:: *

from collections.abc import *
import warnings
with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
from collections.abc import *
import itertools
__name__ = '<doctest>'

Expand Down
3 changes: 3 additions & 0 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,9 @@ Pending Removal in Python 3.14
For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`.
(Contributed by Shantanu Jain in :gh:`91896`.)

* :class:`typing.ByteString`, deprecated since Python 3.9, now causes an
:exc:`DeprecationWarning` to be emitted when it is used or accessed.

* Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
bases using the C API.

Expand Down