From c3ea41e9bf100a5396b851488c3efe208e5e2179 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 26 Aug 2019 10:13:19 +0300 Subject: bpo-36917: Add default implementation of ast.NodeVisitor.visit_Constant(). (GH-15490) It emits a deprecation warning and calls corresponding method visit_Num(), visit_Str(), etc. --- Doc/whatsnew/3.8.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Doc/whatsnew/3.8.rst') diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 0294e9a083..cd31cf6db6 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -1360,6 +1360,13 @@ Deprecated versions. :class:`~ast.Constant` should be used instead. (Contributed by Serhiy Storchaka in :issue:`32892`.) +* :class:`ast.NodeVisitor` methods ``visit_Num()``, ``visit_Str()``, + ``visit_Bytes()``, ``visit_NameConstant()`` and ``visit_Ellipsis()`` are + deprecated now and will not be called in future Python versions. + Add the :meth:`~ast.NodeVisitor.visit_Constant` method to handle all + constant nodes. + (Contributed by Serhiy Storchaka in :issue:`36917`.) + * The following functions and methods are deprecated in the :mod:`gettext` module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`, :func:`~gettext.lngettext` and :func:`~gettext.ldngettext`. -- cgit v1.2.1