Guys, it is great that we are having this discussion. I apologize for
not being as active in the code recently, but I'm sure this
collaboration will make for a better coverage.py.
Simon, thanks especially for point 3 below. I don't use doctest, and
so wasn't aware of the problems it was creating. As it happens, just
this weekend, I fixed issue 61
(
http://bitbucket.org/ned/coveragepy/issue/61) about "annotate -i"
failing for doctest files. The fix was to change control.py so that
doctest files aren't recorded in the first place. It sounds like this
will also fix your issue with them. Can you verify whether this is
true?
I'm not against regexes per se, but I am concerned about two things: 1)
solving the right problem, and 2) backward compatibility.
#1: I've never been quite clear exactly why people had been requesting
regexes. As you point out below, your real problem is in fact solved
in a much better way somewhere else. I'm sure there are still people
who would like regex exclusion (or now with Zooko's change, inclusion),
but I wish I could find out more about why they want it. I would hate
to miss the opportunity for a simpler better solution.
#2: Your patch adds regexes, but also removes prefix support, which
makes me wary. It's clear the whole method of directing coverage.py's
attention needs work, and I'd be willing to break backward
compatibility for the right solution, but dropping prefix support for
regexes doesn't feel like the right tradeoff yet.
--Ned.