Debian Codegraph @

Doc/deprecations/pending-removal-in-3.14.rst

raw
1 Pending Removal in Python 3.14
2 ------------------------------
3
4 * :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
5 of :class:`!argparse.BooleanOptionalAction` are deprecated
6 and will be removed in 3.14.
7 (Contributed by Nikita Sobolev in :gh:`92248`.)
8
9 * :mod:`ast`: The following features have been deprecated in documentation
10 since Python 3.8, now cause a :exc:`DeprecationWarning` to be emitted at
11 runtime when they are accessed or used, and will be removed in Python 3.14:
12
13 * :class:`!ast.Num`
14 * :class:`!ast.Str`
15 * :class:`!ast.Bytes`
16 * :class:`!ast.NameConstant`
17 * :class:`!ast.Ellipsis`
18
19 Use :class:`ast.Constant` instead.
20 (Contributed by Serhiy Storchaka in :gh:`90953`.)
21
22 * :mod:`asyncio`:
23
24 * The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`,
25 :class:`~asyncio.FastChildWatcher`, :class:`~asyncio.AbstractChildWatcher`
26 and :class:`~asyncio.SafeChildWatcher` are deprecated and
27 will be removed in Python 3.14.
28 (Contributed by Kumar Aditya in :gh:`94597`.)
29
30 * :func:`asyncio.set_child_watcher`, :func:`asyncio.get_child_watcher`,
31 :meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` and
32 :meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` are deprecated
33 and will be removed in Python 3.14.
34 (Contributed by Kumar Aditya in :gh:`94597`.)
35
36 * The :meth:`~asyncio.get_event_loop` method of the
37 default event loop policy now emits a :exc:`DeprecationWarning` if there
38 is no current event loop set and it decides to create one.
39 (Contributed by Serhiy Storchaka and Guido van Rossum in :gh:`100160`.)
40
41 * :mod:`builtins`: ``bool(NotImplemented)`` now emits a :exc:`DeprecationWarning`
42 and will raise a :exc:`TypeError` in Python 3.14.
43 (Contributed by Jelle Zijlstra in :gh:`118767`.)
44
45 * :mod:`email`: Deprecated the *isdst* parameter in :func:`email.utils.localtime`.
46 (Contributed by Alan Williams in :gh:`72346`.)
47
48 * :mod:`importlib.abc` deprecated classes:
49
50 * :class:`!importlib.abc.ResourceReader`
51 * :class:`!importlib.abc.Traversable`
52 * :class:`!importlib.abc.TraversableResources`
53
54 Use :mod:`importlib.resources.abc` classes instead:
55
56 * :class:`importlib.resources.abc.Traversable`
57 * :class:`importlib.resources.abc.TraversableResources`
58
59 (Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.)
60
61 * :mod:`itertools` had undocumented, inefficient, historically buggy,
62 and inconsistent support for copy, deepcopy, and pickle operations.
63 This will be removed in 3.14 for a significant reduction in code
64 volume and maintenance burden.
65 (Contributed by Raymond Hettinger in :gh:`101588`.)
66
67 * :mod:`multiprocessing`: The default start method will change to a safer one on
68 Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is currently
69 the default (:gh:`84559`). Adding a runtime warning about this was deemed too
70 disruptive as the majority of code is not expected to care. Use the
71 :func:`~multiprocessing.get_context` or
72 :func:`~multiprocessing.set_start_method` APIs to explicitly specify when
73 your code *requires* ``'fork'``. See :ref:`multiprocessing-start-methods`.
74
75 * :mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and
76 :meth:`~pathlib.PurePath.relative_to`: passing additional arguments is
77 deprecated.
78
79 * :mod:`pkgutil`: :func:`~pkgutil.find_loader` and :func:`~pkgutil.get_loader`
80 now raise :exc:`DeprecationWarning`;
81 use :func:`importlib.util.find_spec` instead.
82 (Contributed by Nikita Sobolev in :gh:`97850`.)
83
84 * :mod:`pty`:
85
86 * ``master_open()``: use :func:`pty.openpty`.
87 * ``slave_open()``: use :func:`pty.openpty`.
88
89 * :mod:`sqlite3`:
90
91 * :data:`~sqlite3.version` and :data:`~sqlite3.version_info`.
92
93 * :meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany`
94 if :ref:`named placeholders <sqlite3-placeholders>` are used and
95 *parameters* is a sequence instead of a :class:`dict`.
96
97 * :mod:`urllib`:
98 :class:`!urllib.parse.Quoter` is deprecated: it was not intended to be a
99 public API.
100 (Contributed by Gregory P. Smith in :gh:`88168`.)