计划在 Python 3.13 中移除
模块 (参见 PEP 594 [https://peps.python.org/pep-0594/]):
aifc
audioop
cgi
cgitb
chunk
crypt
imghdr
mailcap
msilib
nis
nntplib
ossaudiodev
pipes
sndhdr
spwd
sunau
telnetlib
uu
xdrlib
其他模块:
lib2to3
,以及 2to3 程序 (gh-84540 [https://github.com/python/cpython/issues/84540])
API:
configparser.LegacyInterpolation
(gh-90765 [https://github.com/python/cpython/issues/90765])locale.resetlocale()
(gh-90817 [https://github.com/python/cpython/issues/90817])turtle.RawTurtle.settiltangle()
(gh-50096 [https://github.com/python/cpython/issues/50096])unittest.findTestCases()
(gh-50096 [https://github.com/python/cpython/issues/50096])unittest.getTestCaseNames()
(gh-50096 [https://github.com/python/cpython/issues/50096])unittest.makeSuite()
(gh-50096 [https://github.com/python/cpython/issues/50096])unittest.TestProgram.usageExit()
(gh-67048 [https://github.com/python/cpython/issues/67048])webbrowser.MacOSX
(gh-86421 [https://github.com/python/cpython/issues/86421])classmethod
描述器串联 (gh-89519 [https://github.com/python/cpython/issues/89519])importlib.resources
中已弃用的方法:contents()
is_resource()
open_binary()
open_text()
path()
read_binary()
read_text()
改用 importlib.resources.files()
。 参见 importlib-resources: Migrating from Legacy [https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy] (gh-106531 [https://github.com/python/cpython/issues/106531])