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/pythonrun.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/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 6199f0c..e3fd3b2 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -185,7 +185,7 @@ PyRun_InteractiveOneObjectEx(FILE *fp, PyObject *filename, PyArena *arena; const char *ps1 = "", *ps2 = "", *enc = NULL; int errcode = 0; - int use_peg = _PyInterpreterState_GET()->config.use_peg; + int use_peg = _PyInterpreterState_GET()->config._use_peg_parser; _Py_IDENTIFIER(encoding); _Py_IDENTIFIER(__main__); @@ -1030,7 +1030,7 @@ PyRun_StringFlags(const char *str, int start, PyObject *globals, mod_ty mod; PyArena *arena; PyObject *filename; - int use_peg = _PyInterpreterState_GET()->config.use_peg; + int use_peg = _PyInterpreterState_GET()->config._use_peg_parser; filename = _PyUnicode_FromId(&PyId_string); /* borrowed */ if (filename == NULL) @@ -1061,7 +1061,7 @@ PyRun_FileExFlags(FILE *fp, const char *filename_str, int start, PyObject *globa mod_ty mod; PyArena *arena = NULL; PyObject *filename; - int use_peg = _PyInterpreterState_GET()->config.use_peg; + int use_peg = _PyInterpreterState_GET()->config._use_peg_parser; filename = PyUnicode_DecodeFSDefault(filename_str); if (filename == NULL) @@ -1222,7 +1222,7 @@ Py_CompileStringObject(const char *str, PyObject *filename, int start, { PyCodeObject *co; mod_ty mod; - int use_peg = _PyInterpreterState_GET()->config.use_peg; + int use_peg = _PyInterpreterState_GET()->config._use_peg_parser; PyArena *arena = PyArena_New(); if (arena == NULL) return NULL; @@ -1329,7 +1329,7 @@ _Py_SymtableStringObjectFlags(const char *str, PyObject *filename, int start, Py { struct symtable *st; mod_ty mod; - int use_peg = _PyInterpreterState_GET()->config.use_peg; + int use_peg = _PyInterpreterState_GET()->config._use_peg_parser; PyArena *arena; arena = PyArena_New(); |