Pending removal in Python 3.14
-
argparse: The type, choices, and metavar parameters of!argparse.BooleanOptionalActionare deprecated and will be removed in 3.14. (Contributed by Nikita Sobolev in92248.) -
ast: The following features have been deprecated in documentation since Python 3.8, now cause aDeprecationWarningto be emitted at runtime when they are accessed or used, and will be removed in Python 3.14:!ast.Num!ast.Str!ast.Bytes!ast.NameConstant!ast.Ellipsis
Use
ast.Constantinstead. (Contributed by Serhiy Storchaka in90953.) -
asyncio:- The child watcher classes
!asyncio.MultiLoopChildWatcher,!asyncio.FastChildWatcher,!asyncio.AbstractChildWatcherand!asyncio.SafeChildWatcherare deprecated and will be removed in Python 3.14. (Contributed by Kumar Aditya in94597.) !asyncio.set_child_watcher,!asyncio.get_child_watcher,!asyncio.AbstractEventLoopPolicy.set_child_watcherand!asyncio.AbstractEventLoopPolicy.get_child_watcherare deprecated and will be removed in Python 3.14. (Contributed by Kumar Aditya in94597.)- The
~asyncio.get_event_loopmethod of the default event loop policy now emits aDeprecationWarningif there is no current event loop set and it decides to create one. (Contributed by Serhiy Storchaka and Guido van Rossum in100160.)
- The child watcher classes
-
email: Deprecated the isdst parameter inemail.utils.localtime. (Contributed by Alan Williams in72346.) -
importlib.abcdeprecated classes:!importlib.abc.ResourceReader!importlib.abc.Traversable!importlib.abc.TraversableResources
Use
importlib.resources.abcclasses instead:importlib.resources.abc.Traversableimportlib.resources.abc.TraversableResources
(Contributed by Jason R. Coombs and Hugo van Kemenade in
93963.) -
itertoolshad undocumented, inefficient, historically buggy, and inconsistent support for copy, deepcopy, and pickle operations. This will be removed in 3.14 for a significant reduction in code volume and maintenance burden. (Contributed by Raymond Hettinger in101588.) -
multiprocessing: The default start method will change to a safer one on Linux, BSDs, and other non-macOS POSIX platforms where'fork'is currently the default (84559). Adding a runtime warning about this was deemed too disruptive as the majority of code is not expected to care. Use the~multiprocessing.get_contextor~multiprocessing.set_start_methodAPIs to explicitly specify when your code requires'fork'. Seemultiprocessing-start-methods. -
pathlib:~pathlib.PurePath.is_relative_toand~pathlib.PurePath.relative_to: passing additional arguments is deprecated. -
pkgutil:!pkgutil.find_loaderand!pkgutil.get_loadernow raiseDeprecationWarning; useimportlib.util.find_specinstead. (Contributed by Nikita Sobolev in97850.) -
pty:master_open(): usepty.openpty.slave_open(): usepty.openpty.
-
sqlite3:!versionand!version_info.~sqlite3.Cursor.executeand~sqlite3.Cursor.executemanyifnamed placeholders <sqlite3-placeholders>are used and parameters is a sequence instead of adict.
-
urllib:!urllib.parse.Quoteris deprecated: it was not intended to be a public API. (Contributed by Gregory P. Smith in88168.)
谢谢你的反馈!