bpo-14916: use specified tokenizer fd for file input by pmp-p · Pull Request #31006 · python/cpython (original) (raw)

@pablogsal, sorry i failed to rebase to main, so i recreated #22190 (comment)

PyRun_InteractiveOne*() functions allow to explicitily set fd instead of stdin.
but stdin was hardcoded in readline call.

This patch does not fix target file for prompt unlike original bpo one : prompt fd is unrelated to tokenizer source which could be read only. It is more of a bugfix regarding the docs : actual documentation say "prompt the user" so one would expect prompt to go on stdout not a file for both PyRun_InteractiveOne*() and PyRun_InteractiveLoop*().

https://bugs.python.org/issue14916

Automerge-Triggered-By: GH:pablogsal