8000 [3.13] gh-122085: Use include files for `whatsnew/3.12.rst` deprecati… · python/cpython@bde9df8 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bde9df8

Browse files
authored
[3.13] gh-122085: Use include files for whatsnew/3.12.rst deprecations (GH-122093) (#122223)
1 parent ba3aa5a commit bde9df8

File tree

4 files changed

+77
-146
lines changed

4 files changed

+77
-146
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
Pending Removal in Python 3.13
2+
------------------------------
3+
4+
Modules (see :pep:`594`):
5+
6+
* :mod:`!aifc`
7+
* :mod:`!audioop`
8+
* :mod:`!cgi`
9+
* :mod:`!cgitb`
10+
* :mod:`!chunk`
11+
* :mod:`!crypt`
12+
* :mod:`!imghdr`
13+
* :mod:`!mailcap`
14+
* :mod:`!msilib`
15+
* :mod:`!nis`
16+
* :mod:`!nntplib`
17+
* :mod:`!ossaudiodev`
18+
* :mod:`!pipes`
19+
* :mod:`!sndhdr`
20+
* :mod:`!spwd`
21+
* :mod:`!sunau`
22+
* :mod:`!telnetlib`
23+
* :mod:`!uu`
24+
* :mod:`!xdrlib`
25+
26+
Other modules:
27+
28+
* :mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)
29+
30+
APIs:
31+
32+
* :class:`!configparser.LegacyInterpolation` (:gh:`90765`)
33+
* ``locale.resetlocale()`` (:gh:`90817`)
34+
* :meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)
35+
* :func:`!unittest.findTestCases` (:gh:`50096`)
36+
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
37+
* :func:`!unittest.makeSuite` (:gh:`50096`)
38+
* :meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)
39+
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
40+
* :class:`classmethod` descriptor chaining (:gh:`89519`)
41+
* :mod:`importlib.resources` deprecated methods:
42+
43+
* ``contents()``
44+
* ``is_resource()``
45+
* ``open_binary()``
46+
* ``open_text()``
47+
* ``path()``
48+
* ``read_binary()``
49+
* ``read_text()``
50+
51+
Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
52+
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ Pending Removal in Python 3.14
1919
Use :class:`ast.Constant` instead.
2020
(Contributed by Serhiy Storchaka in :gh:`90953`.)
2121

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+
2241
* :mod:`collections.abc`: Deprecated :class:`~collections.abc.ByteString`.
2342
Prefer :class:`!Sequence` or :class:`~collections.abc.Buffer`.
2443
For use in typing, prefer a union, like ``bytes | bytearray``,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ although there is currently no date scheduled for their removal.
77
* :mod:`argparse`: Nesting argument groups and nesting mutually exclusive
88
groups are deprecated.
99

10+
* :mod:`array`'s ``'u'`` format code (:gh:`57281`)
11+
1012
* :mod:`builtins`:
1113

1214
* ``~bool``, bitwise inversion on bool.

Doc/whatsnew/3.12.rst

Lines changed: 4 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,155 +1330,13 @@ Deprecated
13301330
therefore it will be removed in 3.14.
13311331
(Contributed by Nikita Sobolev in :gh:`101866`.)
13321332

1333-
Pending Removal in Python 3.13
1334-
------------------------------
1335-
1336-
The following modules and APIs have been deprecated in earlier Python releases,
1337-
and will be removed in Python 3.13.
1338-
1339-
Modules (see :pep:`594`):
1340-
1341-
* :mod:`!aifc`
1342-
* :mod:`!audioop`
1343-
* :mod:`!cgi`
1344-
* :mod:`!cgitb`
1345-
* :mod:`!chunk`
1346-
* :mod:`!crypt`
1347-
* :mod:`!imghdr`
1348-
* :mod:`!mailcap`
1349-
* :mod:`!msilib`
1350-
* :mod:`!nis`
1351-
* :mod:`!nntplib`
1352-
* :mod:`!ossaudiodev`
1353-
* :mod:`!pipes`
1354-
* :mod:`!sndhdr`
1355-
* :mod:`!spwd`
1356-
* :mod:`!sunau`
1357-
* :mod:`!telnetlib`
1358-
* :mod:`!uu`
1359-
* :mod:`!xdrlib`
1360-
1361-
Other modules:
1362-
1363-
* :mod:`!lib2to3`, and the :program:`2to3` program (:gh:`84540`)
1364-
1365-
APIs:
1366-
1367-
* :class:`!configparser.LegacyInterpolation` (:gh:`90765`)
1368-
* ``locale.resetlocale()`` (:gh:`90817`)
1369-
* :meth:`!turtle.RawTurtle.settiltangle` (:gh:`50096`)
1370-
* :func:`!unittest.findTestCases` (:gh:`50096`)
1371-
* :func:`!unittest.getTestCaseNames` (:gh:`50096`)
1372-
* :func:`!unittest.makeSuite` (:gh:`50096`)
1373-
* :meth:`!unittest.TestProgram.usageExit` (:gh:`67048`)
1374-
* :class:`!webbrowser.MacOSX` (:gh:`86421`)
1375-
* :class:`classmethod` descriptor chaining (:gh:`89519`)
1376-
* :mod:`importlib.resources` deprecated methods:
1377-
1378-
* ``contents()``
1379-
* ``is_resource()``
1380-
* ``open_binary()``
1381-
* ``open_text()``
1382-
* ``path()``
1383-
* ``read_binary()``
1384-
* ``read_text()``
1385-
1386-
Use :func:`importlib.resources.files()` instead. Refer to `importlib-resources: Migrating from Legacy
1387-
<https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_ (:gh:`106531`)
1388-
1389-
Pending Removal in Python 3.14
1390-
------------------------------
1391-
1392-
The following APIs have been deprecated
1393-
and will be removed in Python 3.14.
1394-
1395-
* :mod:`argparse`: The *type*, *choices*, and *metavar* parameters
1396-
of :class:`!argparse.BooleanOptionalAction`
10000 1397-
1398-
* :mod:`ast`:
1399-
1400-
* :class:`!ast.Num`
1401-
* :class:`!ast.Str`
1402-
* :class:`!ast.Bytes`
1403-
* :class:`!ast.NameConstant`
1404-
* :class:`!ast.Ellipsis`
1405-
1406-
* :mod:`asyncio`:
1407-
1408-
* :class:`!asyncio.MultiLoopChildWatcher`
1409-
* :class:`!asyncio.FastChildWatcher`
1410-
* :class:`!asyncio.AbstractChildWatcher`
1411-
* :class:`!asyncio.SafeChildWatcher`
1412-
* :func:`!asyncio.set_child_watcher`
1413-
* :func:`!asyncio.get_child_watcher`,
1414-
* :meth:`!asyncio.AbstractEventLoopPolicy.set_child_watcher`
1415-
* :meth:`!asyncio.AbstractEventLoopPolicy.get_child_watcher`
1416-
1417-
* :mod:`collections.abc`: :class:`!collections.abc.ByteString`.
1418-
1419-
* :mod:`email`: the *isdst* parameter in :func:`email.utils.localtime`.
1420-
1421-
* :mod:`importlib.abc`:
1422-
1423-
* :class:`!importlib.abc.ResourceReader`
1424-
* :class:`!importlib.abc.Traversable`
1425-
* :class:`!importlib.abc.TraversableResources`
1426-
1427-
* :mod:`itertools`: Support for copy, deepcopy, and pickle operations.
1428-
1429-
* :mod:`pkgutil`:
1430-
1431-
* :func:`!pkgutil.find_loader`
1432-
* :func:`!pkgutil.get_loader`.
1433-
1434-
* :mod:`pty`:
1435-
1436-
* :func:`!pty.master_open`
1437-
* :func:`!pty.slave_open`
1438-
1439-
* :mod:`shutil`: The *onerror* argument of :func:`shutil.rmtree`
1440-
1441-
* :mod:`typing`: :class:`!typing.ByteString`
1442-
1443-
* The ``__package__`` and ``__cached__`` attributes on module objects.
1444-
1445-
* The :attr:`~codeobject.co_lnotab` attribute of code objects.
1446-
1447-
Pending Removal in Python 3.15
1448-
------------------------------
1449-
1450-
The following APIs have been deprecated
1451-
and will be removed in Python 3.15.
1452-
1453-
APIs:
1454-
1455-
* :func:`locale.getdefaultlocale` (:gh:`90817`)
1456-
1457-
1458-
Pending Removal in Future Versions
1459-
----------------------------------
1460-
1461-
The following APIs were deprecated in earlier Python versions and will be removed,
1462-
although there is currently no date scheduled for their removal.
1463-
1464-
* :mod:`array`'s ``'u'`` format code (:gh:`57281`)
1465-
1466-
* :class:`typing.Text` (:gh:`92332`)
1333+
.. include:: ../deprecations/pending-removal-in-3.13.rst
14671334

1468-
* :mod:`xml.etree.ElementTree`: Testing the truth value of an
1469-
:class:`xml.etree.ElementTree.Element` is deprecated. In a future release it
1470-
will always return True. Prefer explicit ``len(elem)`` or
1471-
``elem is not None`` tests instead.
1335+
.. include:: ../deprecations/pending-removal-in-3.14.rst
14721336

1473-
* Currently Python accepts numeric literals immediately followed by keywords,
1474-
for example ``0in x``, ``1or x``, ``0if 1else 2``. It allows confusing
1475-
and ambiguous expressions like ``[0x1for x in y]`` (which can be
1476-
interpreted as ``[0x1 for x in y]`` or ``[0x1f or x in y]``).
1477-
A syntax warning is raised if the numeric literal is
1478-
immediately followed by one of keywords :keyword:`and`, :keyword:`else`,
1479-
:keyword:`for`, :keyword:`if`, :keyword:`in`, :keyword:`is` and :keyword:`or`.
1480-
In a future release it will be changed to a syntax error. (:gh:`87999`)
1337+
.. include:: ../deprecations/pending-removal-in-3.15.rst
14811338

1339+
.. include:: ../deprecations/pending-removal-in-future.rst
14821340

14831341
Removed
14841342
=======

0 commit comments

Comments
 (0)
0