gh-91896: Revert some very noisy DeprecationWarnings for ByteString (#104424)

This commit is contained in:
Alex Waygood 2023-05-13 09:55:35 +01:00 committed by GitHub
parent 1be80ed107
commit c527eb1c2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 79 deletions

View file

@ -14,10 +14,7 @@
.. 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
__name__ = '<doctest>'

View file

@ -831,8 +831,8 @@ 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.
* :class:`typing.ByteString`, deprecated since Python 3.9, now causes a
:exc:`DeprecationWarning` to be emitted when it is used.
* Creating immutable types (:data:`Py_TPFLAGS_IMMUTABLETYPE`) with mutable
bases using the C API.