mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
gh-91896: Fixup some docs issues following ByteString deprecation (#104422)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
a052be4c0d
commit
ce4eecf989
2 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,9 @@
|
|||
|
||||
.. testsetup:: *
|
||||
|
||||
import warnings
|
||||
# Ignore warning when ByteString is imported
|
||||
with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
|
||||
from collections.abc import *
|
||||
import itertools
|
||||
__name__ = '<doctest>'
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue