Message 95117 - Python tracker (original) (raw)
It would be very useful to have an environment variable $PYTHONWARNINGS, tied to the -W option for silencing various warnings (most importantly, DeprecationWarnings).
Use case: a test suite running many subprocesses, testing that those subproc output is clean. DeprecationWarnings cannot easily be suppressed by passing -W flags all around or using liberally sprinkled filterwarnings(). Setting $PYTHONWARNINGS once and for all to silence all processes would be very useful.