Skip to content
Snippets Groups Projects
Unverified Commit bbb2ab70 authored by Paul m. p. Peny's avatar Paul m. p. Peny Committed by GitHub
Browse files

[3.11] bpo-14916: interactive fd is not tied to stdin [type-bug] (#91469)

* bpo-14916: interactive fd is not always stdin

related to https://github.com/python/cpython/pull/31006 merged bugfix

following https://bugs.python.org/issue14916

* :scroll::robot:

 Added by blurb_it.

Co-authored-by: default avatarblurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
parent 7502af88
No related branches found
No related tags found
No related merge requests found
Fixed an assert that prevented ``PyRun_InteractiveOne`` from providing tracebacks when parsing from the provided FD.
......@@ -245,7 +245,7 @@ get_error_line_from_tokenizer_buffers(Parser *p, Py_ssize_t lineno)
* (multi-line) statement are stored in p->tok->interactive_src_start.
* If not, we're parsing from a string, which means that the whole source
* is stored in p->tok->str. */
assert((p->tok->fp == NULL && p->tok->str != NULL) || p->tok->fp == stdin);
assert((p->tok->fp == NULL && p->tok->str != NULL) || p->tok->fp != NULL);
char *cur_line = p->tok->fp_interactive ? p->tok->interactive_src_start : p->tok->str;
if (cur_line == NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment