summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-26 07:13:19 (GMT)
committerGitHub <noreply@github.com>2019-08-26 07:13:19 (GMT)
commitc3ea41e9bf100a5396b851488c3efe208e5e2179 (patch)
tree5e30febe4e132ed33968e96ca81aeb043e33387a /Doc/whatsnew
parent44cd86bbdddb1f7b05deba2c1986a1e98f992429 (diff)
downloadcpython-c3ea41e9bf100a5396b851488c3efe208e5e2179.zip
cpython-c3ea41e9bf100a5396b851488c3efe208e5e2179.tar.gz
cpython-c3ea41e9bf100a5396b851488c3efe208e5e2179.tar.bz2
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.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.8.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 0294e9a..cd31cf6 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`.