Skip to content

Commit

Permalink
pythongh-91896: Fixup some docs issues following ByteString deprecati…
Browse files Browse the repository at this point in the history
…on (python#104422)

Co-authored-by: Jelle Zijlstra <[email protected]>
  • Loading branch information
AlexWaygood and JelleZijlstra authored May 12, 2023
1 parent a052be4 commit ce4eecf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Doc/library/collections.abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

.. testsetup:: *

from collections.abc import *
import warnings
# Ignore warning when ByteString is imported
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

0 comments on commit ce4eecf

Please sign in to comment.