summaryrefslogtreecommitdiffstats
path: root/Programs
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 /Programs
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 'Programs')
-rw-r--r--Programs/_testembed.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 8165aa7..2cf0d71 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -485,8 +485,8 @@ static int test_init_from_config(void)
config.install_signal_handlers = 0;
- putenv("PYTHONOLDPARSER=");
- config.use_peg = 0;
+ putenv("PYTHONOLDPARSER=1");
+ config._use_peg_parser = 0;
/* FIXME: test use_environment */
@@ -665,6 +665,7 @@ static void set_most_env_vars(void)
putenv("PYTHONNOUSERSITE=1");
putenv("PYTHONFAULTHANDLER=1");
putenv("PYTHONIOENCODING=iso8859-1:replace");
+ putenv("PYTHONOLDPARSER=1");
}