[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

Nick Coghlan report at bugs.python.org
Tue Aug 25 08:03:04 CEST 2015


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 <report at bugs.python.org>
<http://bugs.python.org/issue24294>
_______________________________________


More information about the Python-bugs-list mailing list