summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2024-01-30 16:21:30 (GMT)
committerGitHub <noreply@github.com>2024-01-30 16:21:30 (GMT)
commit39d102c2ee8eec8ab0bacbcd62d62a72742ecc7c (patch)
treef1dab9719fa4b0bda6f06be2b6f99465053761d9 /Parser
parent1f515e8a109204f7399d85b7fd806135166422d9 (diff)
downloadcpython-39d102c2ee8eec8ab0bacbcd62d62a72742ecc7c.zip
cpython-39d102c2ee8eec8ab0bacbcd62d62a72742ecc7c.tar.gz
cpython-39d102c2ee8eec8ab0bacbcd62d62a72742ecc7c.tar.bz2
gh-113744: Add a new IncompleteInputError exception to improve incomplete input detection in the codeop module (#113745)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 7766253..3d3e645 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -844,7 +844,7 @@ _PyPegen_run_parser(Parser *p)
if (res == NULL) {
if ((p->flags & PyPARSE_ALLOW_INCOMPLETE_INPUT) && _is_end_of_source(p)) {
PyErr_Clear();
- return RAISE_SYNTAX_ERROR("incomplete input");
+ return _PyPegen_raise_error(p, PyExc_IncompleteInputError, 0, "incomplete input");
}
if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_SyntaxError)) {
return NULL;