Skip to content

Commit efc9106

Browse files
committed
pythongh-102500: Fixup some docs issues following ByteString deprecation
1 parent 45f5aa8 commit efc9106

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Doc/library/collections.abc.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414

1515
.. testsetup:: *
1616

17-
from collections.abc import *
17+
import warnings
18+
with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
19+
from collections.abc import *
1820
import itertools
1921
__name__ = '<doctest>'
2022

Doc/whatsnew/3.12.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ Pending Removal in Python 3.14
831831
For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`.
832832
(Contributed by Shantanu Jain in :gh:`91896`.)
833833

834+
* :class:`typing.ByteString`, deprecated since Python 3.9, now causes an
835+
:exc:`DeprecationWarning` to be emitted when it is used or accessed.
836+
834837
* Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
835838
bases using the C API.
836839

0 commit comments

Comments
 (0)