From 1def7754b7a41fe57efafaf5eff24cfa15353444 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 23 Apr 2020 03:03:24 +0200 Subject: 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 --- Programs/_testembed.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Programs/_testembed.c') diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 8165aa74df..2cf0d71b47 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"); } -- cgit v1.2.1