Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce4eecf

Browse files
gh-91896: Fixup some docs issues following ByteString deprecation (#104422)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parenta052be4 commitce4eecf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

‎Doc/library/collections.abc.rst

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

1515
..testsetup::*
1616

17-
from collections.abc import *
17+
import warnings
18+
# Ignore warning when ByteString is imported
19+
with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
20+
from collections.abc import *
1821
import itertools
1922
__name__ = '<doctest>'
2023

‎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)

[8]ページ先頭

©2009-2025 Movatter.jp