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

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Alex Waygood 2023-05-12 15:38:35 +01:00 committed by GitHub
parent a052be4c0d
commit ce4eecf989
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -14,6 +14,9 @@
.. testsetup:: * .. testsetup:: *
import warnings
# Ignore warning when ByteString is imported
with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
from collections.abc import * from collections.abc import *
import itertools import itertools
__name__ = '<doctest>' __name__ = '<doctest>'

View file

@ -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`. For use in typing, prefer a union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`.
(Contributed by Shantanu Jain in :gh:`91896`.) (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 * Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
bases using the C API. bases using the C API.