Closed
Description
Describe the bug
The change done in 16f54a9 (adding a name
argument to TreeMatcher
, ModuleMatcher
, and FnmatchMatcher
) makes it difficult for projects to support both versions 5.x
and 6.x
as the signature is incompatible.
For example coveralls-python
doesn't currently pass the name
argument.
https://github.com/TheKevJames/coveralls-python/blob/e03a2de15e65cafc3fe583b1ab15e3e0b6478722/coveralls/reporter.py#L70-L78
This obviously results in a TypeError
when using 6.x
: TheKevJames/coveralls-python#333
Possible resolutions
coveralls-python
could drop support for5.x
.- It could detect the version of
coveragepy
and act accordingly. - Or a default value is added to
TreeMatcher
,ModuleMatcher
, andFnmatchMatcher
.
Although options (1) and (2) would work, I think (3) is be preferable. name
is only used in the __repr__
functions. I don't think that justifies breaking existing code.