Author mark.dickinson
Recipients eamanu, mark.dickinson, porton, steven.daprano, vinay.sajip, xtreak
Date 2018-12-19.11:11:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545217878.42.0.788709270274.issue35530@psf.upfronthosting.co.za>
In-reply-to
Content
> I completely missed it.

You're not alone. Authors of many of the libraries that we work with on a day-to-day basis missed it, too. And that results in logging being accidentally configured as a side-effect halfway through a long test run, when one of those libraries happens to be imported. That it turn leads to heisenbug-like test failures (e.g., tests that fail locally but pass on Travis CI or Appveyor, or vice versa, just because one test accidentally configures logging, another test checks for particular logged messages, and unittest happened to run the tests in different orders in different setups).

This is a real problem for Enthought, where we write large, well-tested (our test suites commonly include thousands of tests) applications. In those circumstances, test interactions (tests that fail after some other test has been run, but don't fail when run standalone) are one of the biggest sources of pain.

Vinay claims in the #34350 discussion that:

> that's just like any other bug introduced because of a typo. It would presumably get caught in testing.

This isn't true in practice. The "bug" here is accidental configuration of logging by a library (possibly by one's own code, possibly by a third-party library that's being sued directly or indirectly). And unless you know about this possibility in advance, you're not going to test for it. If it does get caught in testing, it's in the form of the unpleasant test interactions described above. I've witnessed various third-party libraries configuring logging accidentally and not realising it; it doesn't tend to cause problems for the library directly - it causes problems for the downstream users of those libraries.

If this behaviour can't be changed for backwards compatibility reasons, then so be it. But I think it would be disingenuous to claim it's not a design flaw.


</rant>
History
Date User Action Args
2018-12-19 11:11:18mark.dickinsonsetrecipients: + mark.dickinson, vinay.sajip, steven.daprano, porton, eamanu, xtreak
2018-12-19 11:11:18mark.dickinsonsetmessageid: <1545217878.42.0.788709270274.issue35530@psf.upfronthosting.co.za>
2018-12-19 11:11:18mark.dickinsonlinkissue35530 messages
2018-12-19 11:11:18mark.dickinsoncreate