| 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:`email`: Deprecated the *isdst* parameter in :func:`email.utils.localtime`. |
| 42 |
(Contributed by Alan Williams in :gh:`72346`.) |
| 43 |
|
| 44 |
* :mod:`importlib.abc` deprecated classes: |
| 45 |
|
| 46 |
* :class:`!importlib.abc.ResourceReader` |
| 47 |
* :class:`!importlib.abc.Traversable` |
| 48 |
* :class:`!importlib.abc.TraversableResources` |
| 49 |
|
| 50 |
Use :mod:`importlib.resources.abc` classes instead: |
| 51 |
|
| 52 |
* :class:`importlib.resources.abc.Traversable` |
| 53 |
* :class:`importlib.resources.abc.TraversableResources` |
| 54 |
|
| 55 |
(Contributed by Jason R. Coombs and Hugo van Kemenade in :gh:`93963`.) |
| 56 |
|
| 57 |
* :mod:`itertools` had undocumented, inefficient, historically buggy, |
| 58 |
and inconsistent support for copy, deepcopy, and pickle operations. |
| 59 |
This will be removed in 3.14 for a significant reduction in code |
| 60 |
volume and maintenance burden. |
| 61 |
(Contributed by Raymond Hettinger in :gh:`101588`.) |
| 62 |
|
| 63 |
* :mod:`multiprocessing`: The default start method will change to a safer one on |
| 64 |
Linux, BSDs, and other non-macOS POSIX platforms where ``'fork'`` is currently |
| 65 |
the default (:gh:`84559`). Adding a runtime warning about this was deemed too |
| 66 |
disruptive as the majority of code is not expected to care. Use the |
| 67 |
:func:`~multiprocessing.get_context` or |
| 68 |
:func:`~multiprocessing.set_start_method` APIs to explicitly specify when |
| 69 |
your code *requires* ``'fork'``. See :ref:`multiprocessing-start-methods`. |
| 70 |
|
| 71 |
* :mod:`pathlib`: :meth:`~pathlib.PurePath.is_relative_to` and |
| 72 |
:meth:`~pathlib.PurePath.relative_to`: passing additional arguments is |
| 73 |
deprecated. |
| 74 |
|
| 75 |
* :mod:`pkgutil`: :func:`!pkgutil.find_loader` and :func:`!pkgutil.get_loader` |
| 76 |
now raise :exc:`DeprecationWarning`; |
| 77 |
use :func:`importlib.util.find_spec` instead. |
| 78 |
(Contributed by Nikita Sobolev in :gh:`97850`.) |
| 79 |
|
| 80 |
* :mod:`pty`: |
| 81 |
|
| 82 |
* ``master_open()``: use :func:`pty.openpty`. |
| 83 |
* ``slave_open()``: use :func:`pty.openpty`. |
| 84 |
|
| 85 |
* :mod:`sqlite3`: |
| 86 |
|
| 87 |
* :data:`!version` and :data:`!version_info`. |
| 88 |
|
| 89 |
* :meth:`~sqlite3.Cursor.execute` and :meth:`~sqlite3.Cursor.executemany` |
| 90 |
if :ref:`named placeholders <sqlite3-placeholders>` are used and |
| 91 |
*parameters* is a sequence instead of a :class:`dict`. |
| 92 |
|
| 93 |
* :mod:`urllib`: |
| 94 |
:class:`!urllib.parse.Quoter` is deprecated: it was not intended to be a |
| 95 |
public API. |
| 96 |
(Contributed by Gregory P. Smith in :gh:`88168`.) |