[Python-Dev] DeprecationWarnings in the regression tests
Guido van Rossum
guido@python.org
Mon, 15 Apr 2002 18:10:49 -0400
> GvR> No, because a test might use some feature that is deprecated,
> GvR> not as the feature to be tested, but as a tool for the
> GvR> testing. (E.g. a test function might use "from M import *".)
>
> GvR> With your approach we would never hear about this deprecation
> GvR> until the feature is finally removed.
>
> By the same token then, we probably shouldn't be suppressing the
> warnings at the top of certain files; the effect would be the same
> (but limited to only those files that /do/ test deprecated features).
Actually, the filterwarnings() calls are usually pretty selective, by
specifying a substring that must occur in the suppressed warning. (A
few don't do this, and ought to be fixed.)
> Hmm, what about making this controllable via a command line option to
> regrtest? Then what should the default be? Probably, "don't
> suppress" and then most people will just have to ignore the warnings.
> In that case, I'd argue that the switch should be "suppress" by
> default in the final releases, so as not to confuse end users.
Why do you want this? Did you get a particular warning that bugs you?
If not, let's please call a YAGNI on this.
--Guido van Rossum (home page: http://www.python.org/~guido/)