Skip to content

Commit dc5abf8

Browse files
committed
Doc: further document ast deprecations & removals
1 parent 7c57211 commit dc5abf8

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,14 @@ Pending removal in Python 3.20
2222
- :mod:`zlib`
2323

2424
(Contributed by Hugo van Kemenade and Stan Ulbrych in :gh:`76007`.)
25+
26+
* The ``__version__`` attribute has been deprecated in these standard library
27+
modules and will be removed in Python 3.20.
28+
29+
* :mod:`ast`:
30+
31+
* Classes ``slice``, ``Index`` and ``ExtSlice``, ``Suite``, ``Param``,
32+
``AugLoad`` and ``AugStore``, will be removed in Python 3.20. These types
33+
are not generated by the parser or accepted by the code generator.
34+
* The ``dims`` property of ``ast.Tuple`` will be removed in Python 3.20. Use
35+
the ``ast.Tuple.elts`` property instead.

Doc/whatsnew/3.15.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,16 @@ New deprecations
802802

803803
(Contributed by Nikita Sobolev in :gh:`136355`.)
804804

805+
* :mod:`ast`:
806+
807+
* Classes ``slice``, ``Index`` and ``ExtSlice``, ``Suite``, ``Param``,
808+
``AugLoad`` and ``AugStore``, deprecated since Python 3.9, are no longer
809+
imported by ``from ast import *`` and issue a deprecation warning on first
810+
use. The classes are slated for removal in Python 3.20.
811+
* The ``dims`` property of ``ast.Tuple`` objects, deprecated since Python
812+
3.9, now issues a deprecation warning on use. Thie property is slated for
813+
removal in 3.20. Use ``ast.Tuple.elts`` instead.
814+
805815
* :mod:`hashlib`:
806816

807817
* In hash function constructors such as :func:`~hashlib.new` or the

0 commit comments

Comments
 (0)