Skip to content

Commit 39e9298

Browse files
committed
gh-153304: Remove incorrect assertion in pegen error handling
1 parent f62050d commit 39e9298

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

Parser/pegen_errors.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype,
311311
we're actually parsing from a file, which has an E_EOF SyntaxError and in that case
312312
`PyErr_ProgramTextObject` fails because lineno points to last_file_line + 1, which
313313
does not physically exist */
314-
assert(p->tok->fp == NULL || p->tok->fp == stdin || p->tok->done == E_EOF);
315314

316315
if (p->tok->lineno <= lineno && p->tok->inp > p->tok->buf) {
317316
Py_ssize_t size = p->tok->inp - p->tok->line_start;

0 commit comments

Comments
 (0)