summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-23 01:03:24 (GMT)
committerGitHub <noreply@github.com>2020-04-23 01:03:24 (GMT)
commit1def7754b7a41fe57efafaf5eff24cfa15353444 (patch)
tree8fd9f9ddeaf9a66f92d1916b86901573afce0ccb /Doc
parenta25f3c4c8f7d4878918ce1d3d67db40ae255ccc6 (diff)
downloadcpython-1def7754b7a41fe57efafaf5eff24cfa15353444.zip
cpython-1def7754b7a41fe57efafaf5eff24cfa15353444.tar.gz
cpython-1def7754b7a41fe57efafaf5eff24cfa15353444.tar.bz2
bpo-40334: Rename PyConfig.use_peg to _use_peg_parser (GH-19670)
* Rename PyConfig.use_peg to _use_peg_parser * Document PyConfig._use_peg_parser and mark it a deprecated * Mark -X oldparser option and PYTHONOLDPARSER env var as deprecated in the documentation. * Add use_old_parser() and skip_if_new_parser() to test.support * Remove sys.flags.use_peg: use_old_parser() uses _testinternalcapi.get_configs() instead. * Enhance test_embed tests * subprocess._args_from_interpreter_flags() copies -X oldparser
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/init_config.rst10
-rw-r--r--Doc/using/cmdline.rst12
2 files changed, 19 insertions, 3 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index a226814..49507c8 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -686,6 +686,16 @@ PyConfig
:data:`sys._xoptions`.
+ .. c:member:: int _use_peg_parser
+
+ Enable PEG parser? Default: 1.
+
+ Set to 0 by :option:`-X oldparser <-X>` and :envvar:`PYTHONOLDPARSER`.
+
+ See also :pep:`617`.
+
+ .. deprecated-removed:: 3.9 3.10
+
If ``parse_argv`` is non-zero, ``argv`` arguments are parsed the same
way the regular Python parses command line arguments, and Python
arguments are stripped from ``argv``: see :ref:`Command Line Arguments
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a815436..b091195 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -427,7 +427,7 @@ Miscellaneous options
* ``-X faulthandler`` to enable :mod:`faulthandler`;
* ``-X oldparser``: enable the traditional LL(1) parser. See also
- :envvar:`PYTHONOLDPARSER`.
+ :envvar:`PYTHONOLDPARSER` and :pep:`617`.
* ``-X showrefcount`` to output the total reference count and number of used
memory blocks when the program finishes or after each statement in the
interactive interpreter. This only works on debug builds.
@@ -480,6 +480,9 @@ Miscellaneous options
The ``-X showalloccount`` option has been removed.
+ .. deprecated-removed:: 3.9 3.10
+ The ``-X oldparser`` option.
+
Options you shouldn't use
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -578,8 +581,11 @@ conflict.
.. envvar:: PYTHONOLDPARSER
- If this is set it is equivalent to specifying the :option:`-X`
- ``oldparser`` option.
+ If this is set to a non-empty string, enable the traditional LL(1) parser.
+
+ See also the :option:`-X` ``oldparser`` option and :pep:`617`.
+
+ .. deprecated-removed:: 3.9 3.10
.. envvar:: PYTHONINSPECT