Pending removal in Python 3.20¶
Calling the
__new__()method ofstruct.Structwithout the format argument is deprecated and will be removed in Python 3.20. Calling__init__()method on initializedStructobjects is deprecated and will be removed in Python 3.20.(Contributed by Sergey B Kirpichev and Serhiy Storchaka in gh-143715.)
The
__version__,versionandVERSIONattributes have been deprecated in these standard library modules and will be removed in Python 3.20. Usesys.version_infoinstead.ctypes.macholiblogging(__date__也已被弃用)xml.sax.expatreader
(由 Hugo van Kemenade 和 Stan Ulbrych 在 gh-76007 中贡献。)
由 PEP 829 定义的弃用:
为在
name.pth文件中找到的import行产生警告。name.pth文件将不再以默认语言区域编码格式解码。 它们 必须 使用utf-8-sig编码。
(由 Barry Warsaw 在 gh-148641 中贡献。)
ast:创建抽象 AST 节点 (如
ast.AST或ast.expr) 的做法已被弃用并将在 Python 3.20 中引发错误。