[Python-Dev] Re-enable warnings in regrtest and/or unittest
Ezio Melotti
ezio.melotti at gmail.com
Mon Nov 22 18:14:03 CET 2010
I would like to re-enable by default warnings for regrtest and/or unittest.
The reasons are:
1) these tools are used mainly by developers and they (should) care
about warnings;
2) developers won't have to remember that warning are silenced and
how to enable them manually;
3) developers won't have to enable them manually every time they run
the tests;
4) some developers are not even aware that warnings have been
silenced and might not notice things like DeprecationWarnings until the
function/method/class/etc gets removed and breaks their code;
5) another developer tool -- the --with-pydebug flag -- already
re-enables warnings when it's used;
If this is fixed in unittest it won't be necessary to patch regrtest.
If it's fixed in regrtest only the core developers will benefit from this.
This could be fixed checking if any warning flags (-Wx) are passed to
python.
If no flags are passed the default will be -Wd, otherwise the behavior
will be the one specified by the flag.
This will allow developers to use `python -Wi` to ignore errors explicitly.
Best Regards,
Ezio Melotti
More information about the Python-Dev
mailing list