Moving NoSource exception from coverage.misc to coverage.exceptions broke coveralls reporting. · Issue #1226 · nedbat/coveragepy (original) (raw)
Describe the bug
I'm trying to contribute to an open source project, but my pull request fails CircleCI test pipeline because it tries to use the latest version of coveragepy.
#!/bin/bash -eo pipefail
COVERALLS_REPO_TOKEN=Q58WdUuZOi89XHyDeDsGE2lxUGQ2IfqP3 coveralls
Traceback (most recent call last):
File "/home/circleci/.local/bin/coveralls", line 5, in <module>
from coveralls.cli import main
File "/home/circleci/.local/lib/python3.8/site-packages/coveralls/__init__.py", line 1, in <module>
from .api import Coveralls
File "/home/circleci/.local/lib/python3.8/site-packages/coveralls/api.py", line 14, in <module>
from .reporter import CoverallReporter
File "/home/circleci/.local/lib/python3.8/site-packages/coveralls/reporter.py", line 5, in <module>
from coverage.misc import NoSource
ImportError: cannot import name 'NoSource' from 'coverage.misc' (/home/circleci/.local/lib/python3.8/site-packages/coverage/misc.py)
Exited with code exit status 1
CircleCI received exit code 1
It would be better if it was possible to import the exceptions from the old misc
namespace for a couple of versions before deprecation. Changes like this affects a lot of downstream users who might not be able to pin this library at version <6.0
I've also submitted an issue with coveralls-python about this.
TheKevJames/coveralls-python#326