mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-110805: Allow the repl to show source code and complete tracebacks (#110775)
This commit is contained in:
parent
898f531996
commit
e1d8c65e1d
11 changed files with 191 additions and 19 deletions
|
|
@ -23,5 +23,18 @@ _PyParser_ASTFromFile(FILE *fp, PyObject *filename_ob, const char *enc,
|
|||
return NULL;
|
||||
}
|
||||
return _PyPegen_run_parser_from_file_pointer(fp, mode, filename_ob, enc, ps1, ps2,
|
||||
flags, errcode, arena);
|
||||
flags, errcode, NULL, arena);
|
||||
}
|
||||
|
||||
mod_ty
|
||||
_PyParser_InteractiveASTFromFile(FILE *fp, PyObject *filename_ob, const char *enc,
|
||||
int mode, const char *ps1, const char* ps2,
|
||||
PyCompilerFlags *flags, int *errcode,
|
||||
PyObject **interactive_src, PyArena *arena)
|
||||
{
|
||||
if (PySys_Audit("compile", "OO", Py_None, filename_ob) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
return _PyPegen_run_parser_from_file_pointer(fp, mode, filename_ob, enc, ps1, ps2,
|
||||
flags, errcode, interactive_src, arena);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue