Robert Collins added the comment:

On testing this - I don't think subprocess tests are necessarily needed.

The scenarios are these (from Nick's comment):
Test frameworks.
 - there are two in the standard library. unittest and doctest.
 - unittest's code paths end up going through 'TestProgram'.
 - doctest via 'testmod'.
 - so alter the warning configuration in those APIs to enable both 
DeprecationWarning and PendingDeprecationWarning. I don't think (right now 
anyhow :)) that we need a 'do not do this' flag in them..

Interactive REPL. This includes IDLE in my opinion.
 - there are three here IIRC - IDLE and the cPython and a helper module (which 
may or may not be the REPL for ./python - I haven't climbed through that code 
in ---ages---).
 - Again here I'd just enable DW in those code paths. Don't worry about whether 
its a tty or not: thats irrelevant. If the REPL enters, its the REPL and we 
should treat it like a user. If someone is driving the REPL programattically 
its likely one of: a remote session - so they should see it - or its a test 
harness - so they should see it.


Everything else.
Don't change anything here.

On docs: yes, we should update the docs for:
 - each changed module
 - the warnings module itself.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24294>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to