summaryrefslogtreecommitdiff
path: root/Lib/test/test_embed.py
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 /Lib/test/test_embed.py
parenta25f3c4c8f7d4878918ce1d3d67db40ae255ccc6 (diff)
downloadcpython-git-1def7754b7a41fe57efafaf5eff24cfa15353444.tar.gz
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 'Lib/test/test_embed.py')
-rw-r--r--Lib/test/test_embed.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 24ebc5ca9b..0bdfae1b7e 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -347,7 +347,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'isolated': 0,
'use_environment': 1,
'dev_mode': 0,
- 'use_peg': 1,
+ '_use_peg_parser': 1,
'install_signal_handlers': 1,
'use_hash_seed': 0,
@@ -729,7 +729,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'import_time': 1,
'show_ref_count': 1,
'malloc_stats': 1,
- 'use_peg': 0,
+ '_use_peg_parser': 0,
'stdio_encoding': 'iso8859-1',
'stdio_errors': 'replace',
@@ -792,6 +792,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'user_site_directory': 0,
'faulthandler': 1,
'warnoptions': ['EnvVar'],
+ '_use_peg_parser': 0,
}
self.check_all_configs("test_init_compat_env", config, preconfig,
api=API_COMPAT)
@@ -819,6 +820,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'user_site_directory': 0,
'faulthandler': 1,
'warnoptions': ['EnvVar'],
+ '_use_peg_parser': 0,
}
self.check_all_configs("test_init_python_env", config, preconfig,
api=API_PYTHON)