Skip to content

Commit 566ee22

Browse files
committed
Update ast docs to reflect the AST nodes removed in 3.14
1 parent 7812940 commit 566ee22

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

Doc/library/ast.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,11 @@ Node classes
139139
The :meth:`~object.__repr__` output of :class:`~ast.AST` nodes includes
140140
the values of the node fields.
141141

142-
.. deprecated:: 3.8
142+
.. versionchanged:: 3.14
143143

144-
Old classes :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`,
145-
:class:`!ast.NameConstant` and :class:`!ast.Ellipsis` are still available,
146-
but they will be removed in future Python releases. In the meantime,
147-
instantiating them will return an instance of a different class.
144+
The deprecated classes :class:`!ast.Num`, :class:`!ast.Str`, :class:`!ast.Bytes`,
145+
:class:`!ast.NameConstant` and :class:`!ast.Ellipsis` have been removed.
146+
Use :class:`ast.Constant` instead.
148147

149148
.. deprecated:: 3.9
150149

@@ -2411,12 +2410,11 @@ and classes for traversing abstract syntax trees:
24112410
during traversal. For this a special visitor exists
24122411
(:class:`NodeTransformer`) that allows modifications.
24132412

2414-
.. deprecated:: 3.8
2413+
.. versionchanged:: 3.14
24152414

2416-
Methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`,
2417-
:meth:`!visit_NameConstant` and :meth:`!visit_Ellipsis` are deprecated
2418-
now and will not be called in future Python versions. Add the
2419-
:meth:`visit_Constant` method to handle all constant nodes.
2415+
The methods :meth:`!visit_Num`, :meth:`!visit_Str`, :meth:`!visit_Bytes`,
2416+
:meth:`!visit_NameConstant` and :meth:`!visit_Ellipsis` are no longer called.
2417+
Add the :meth:`visit_Constant` method to handle all constant nodes.
24202418

24212419

24222420
.. class:: NodeTransformer()

0 commit comments

Comments
 (0)