Pending removal in Python 3.17¶
-
strptime()calls using a format string containing%e(day of month) without a year. This has been deprecated since Python 3.15. (Contributed by Stan Ulbrych in gh-70647.)
-
collections.abc.ByteStringis scheduled for removal in Python 3.17.実行時に
objが バッファプロトコル を実装しているか調べるには、isinstance(obj, collections.abc.Buffer)を使ってください。 型アノテーションにはBufferを使うか、コードが対応する型を明示したユニオン (例えばbytes | bytearray | memoryview) を使ってください。ByteStringは当初、bytesとbytearrayの両方の上位型となる抽象クラスとして意図されていました。 しかし、この ABC はメソッドを一つも持たないため、あるオブジェクトがByteStringのインスタンスだと分かっても、そのオブジェクトに関する有用な情報は何も得られませんでした。memoryviewなど、他の一般的なバッファ型も、実行時にも静的型チェッカーによってもByteStringのサブタイプとして認識されることはありませんでした。See PEP 688 for more details. (Contributed by Shantanu Jain in gh-91896.)
-
Passing non-ascii encoding names to
encodings.normalize_encoding()is deprecated and scheduled for removal in Python 3.17. (Contributed by Stan Ulbrych in gh-136702.)
-
The
profilemodule is deprecated and will be removed in Python 3.17. Useprofiling.tracinginstead, which provides a compatible API. See PEP 799 for details. (Contributed by Pablo Galindo and László Kiss Kollár in gh-138122.)
-
webbrowser.MacOSXOSAScriptis deprecated in favour ofwebbrowser.MacOS. (gh-137586)
-
Before Python 3.14, old-style unions were implemented using the private class
typing._UnionGenericAlias. This class is no longer needed for the implementation, but it has been retained for backward compatibility, with removal scheduled for Python 3.17. Users should use documented introspection helpers liketyping.get_origin()andtyping.get_args()instead of relying on private implementation details.typing.ByteString, deprecated since Python 3.9, is scheduled for removal in Python 3.17.実行時に
objが バッファプロトコル を実装しているか調べるには、isinstance(obj, collections.abc.Buffer)を使ってください。 型アノテーションにはBufferを使うか、コードが対応する型を明示したユニオン (例えばbytes | bytearray | memoryview) を使ってください。ByteStringは当初、bytesとbytearrayの両方の上位型となる抽象クラスとして意図されていました。 しかし、この ABC はメソッドを一つも持たないため、あるオブジェクトがByteStringのインスタンスだと分かっても、そのオブジェクトに関する有用な情報は何も得られませんでした。memoryviewなど、他の一般的なバッファ型も、実行時にも静的型チェッカーによってもByteStringのサブタイプとして認識されることはありませんでした。See PEP 688 for more details. (Contributed by Shantanu Jain in gh-91896.)
-
The
tkinter.Variablemethodstrace_variable(),trace()(an alias oftrace_variable()),trace_vdelete()andtrace_vinfo(), deprecated since Python 3.14, are scheduled for removal in Python 3.17. Usetrace_add(),trace_remove()andtrace_info()instead. (Contributed by Serhiy Storchaka in gh-120220.)