Message249076
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. |
|
Date |
User |
Action |
Args |
2015-08-24 21:51:45 | rbcollins | set | recipients:
+ rbcollins, terry.reedy, ncoghlan, ezio.melotti, njs, takluyver, martin.panter, Jim.Jewett, serhiy.storchaka, The Compiler, mbussonn |
2015-08-24 21:51:44 | rbcollins | set | messageid: <1440453104.98.0.660769484541.issue24294@psf.upfronthosting.co.za> |
2015-08-24 21:51:44 | rbcollins | link | issue24294 messages |
2015-08-24 21:51:44 | rbcollins | create | |
|