diff options
author | Victor Stinner <vstinner@python.org> | 2020-04-23 01:03:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 01:03:24 (GMT) |
commit | 1def7754b7a41fe57efafaf5eff24cfa15353444 (patch) | |
tree | 8fd9f9ddeaf9a66f92d1916b86901573afce0ccb /Python/initconfig.c | |
parent | a25f3c4c8f7d4878918ce1d3d67db40ae255ccc6 (diff) | |
download | cpython-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 'Python/initconfig.c')
-rw-r--r-- | Python/initconfig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c index 7662d61..58cca56 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -635,7 +635,7 @@ _PyConfig_InitCompatConfig(PyConfig *config) #ifdef MS_WINDOWS config->legacy_windows_stdio = -1; #endif - config->use_peg = 1; + config->_use_peg_parser = 1; } @@ -793,7 +793,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2) COPY_ATTR(isolated); COPY_ATTR(use_environment); COPY_ATTR(dev_mode); - COPY_ATTR(use_peg); + COPY_ATTR(_use_peg_parser); COPY_ATTR(install_signal_handlers); COPY_ATTR(use_hash_seed); COPY_ATTR(hash_seed); @@ -897,7 +897,7 @@ config_as_dict(const PyConfig *config) SET_ITEM_INT(isolated); SET_ITEM_INT(use_environment); SET_ITEM_INT(dev_mode); - SET_ITEM_INT(use_peg); + SET_ITEM_INT(_use_peg_parser); SET_ITEM_INT(install_signal_handlers); SET_ITEM_INT(use_hash_seed); SET_ITEM_UINT(hash_seed); @@ -1434,7 +1434,7 @@ config_read_complex_options(PyConfig *config) if (config_get_env(config, "PYTHONOLDPARSER") || config_get_xoption(config, L"oldparser")) { - config->use_peg = 0; + config->_use_peg_parser = 0; } PyStatus status; @@ -2516,7 +2516,7 @@ PyConfig_Read(PyConfig *config) assert(config->isolated >= 0); assert(config->use_environment >= 0); assert(config->dev_mode >= 0); - assert(config->use_peg >= 0); + assert(config->_use_peg_parser >= 0); assert(config->install_signal_handlers >= 0); assert(config->use_hash_seed >= 0); assert(config->faulthandler >= 0); |