aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-23 03:03:24 +0200
committerGitHub <noreply@github.com>2020-04-23 03:03:24 +0200
commit1def7754b7a41fe57efafaf5eff24cfa15353444 (patch)
tree8fd9f9ddeaf9a66f92d1916b86901573afce0ccb /Programs
parentbpo-40334: Fix builds outside the source directory and regenerate autoconf fi... (diff)
downloadcpython-1def7754b7a41fe57efafaf5eff24cfa15353444.tar.gz
cpython-1def7754b7a41fe57efafaf5eff24cfa15353444.tar.bz2
cpython-1def7754b7a41fe57efafaf5eff24cfa15353444.zip
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 8165aa74df1..2cf0d71b470 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");
}