Skip to content

Backwards incompatible debug change #1273

Closed
@cdce8p

Description

@cdce8p

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

  1. coveralls-python could drop support for 5.x.
  2. It could detect the version of coveragepy and act accordingly.
  3. Or a default value is added to TreeMatcher, ModuleMatcher, and FnmatchMatcher.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions