summaryrefslogtreecommitdiff
path: root/Doc/whatsnew/3.8.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-26 10:13:19 +0300
committerGitHub <noreply@github.com>2019-08-26 10:13:19 +0300
commitc3ea41e9bf100a5396b851488c3efe208e5e2179 (patch)
tree5e30febe4e132ed33968e96ca81aeb043e33387a /Doc/whatsnew/3.8.rst
parent44cd86bbdddb1f7b05deba2c1986a1e98f992429 (diff)
downloadcpython-git-c3ea41e9bf100a5396b851488c3efe208e5e2179.tar.gz
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/3.8.rst')
-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 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`.