mirror of https://github.com/python/cpython
[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 * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
7502af888f
commit
bbb2ab70b6
|
@ -0,0 +1 @@
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue