summaryrefslogtreecommitdiff
path: root/Doc/library/parser.rst
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-07-30 12:04:01 +0100
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-07-30 04:04:01 -0700
commit9211e2fd81fe1db6f73ded70752b144cc9691ab6 (patch)
tree7be7a7109e9e2ca793f8b0a26a7b7c2c350b9479 /Doc/library/parser.rst
parentf35c51d2eadd297bcf06d4f7c536bd1d8682b724 (diff)
downloadcpython-git-9211e2fd81fe1db6f73ded70752b144cc9691ab6.tar.gz
bpo-37268: Add deprecation notice and a DeprecationWarning for the parser module (GH-15017)
Deprecate the parser module and add a deprecation warning triggered on import and a warning block in the documentation. https://bugs.python.org/issue37268 Automerge-Triggered-By: @pablogsal
Diffstat (limited to 'Doc/library/parser.rst')
-rw-r--r--Doc/library/parser.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/parser.rst b/Doc/library/parser.rst
index a302681eca..c55cd653b3 100644
--- a/Doc/library/parser.rst
+++ b/Doc/library/parser.rst
@@ -25,11 +25,11 @@ from this. This is better than trying to parse and modify an arbitrary Python
code fragment as a string because parsing is performed in a manner identical to
the code forming the application. It is also faster.
-.. note::
+.. warning::
- From Python 2.5 onward, it's much more convenient to cut in at the Abstract
- Syntax Tree (AST) generation and compilation stage, using the :mod:`ast`
- module.
+ The parser module is deprecated and will be removed in future versions of
+ Python. For the majority of use cases you can leverage the Abstract Syntax
+ Tree (AST) generation and compilation stage, using the :mod:`ast` module.
There are a few things to note about this module which are important to making
use of the data structures created. This is not a tutorial on editing the parse