[Python-Dev] DeprecationWarnings in the regression tests

Barry A. Warsaw barry@zope.com
Mon, 15 Apr 2002 17:55:38 -0400


>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:

    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).

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.

-Barry