Nick Coghlan added the comment:
As Robert suggests, I think it's OK to issue the deprecation warnings for code
run via "python < script.py" or "cat script.py | python". Reverting to the
current behaviour if folks actually want that would just be a matter of passing
the file in directly, rather than piping it via stdin: "python script.py".
That eliminates any need to care about whether the input is a tty or not, and
we can just focus on the code paths. If you grep the CPython code base for
"ps1" you're likely to find most of the relevant places ("sys.ps1" hold the
interactive prompt, while "sys.ps2" holds the continuation prompt)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com