Skip to content

Traceback on python 2.6 starting with 4.3.2 #554

@nedbat

Description

@nedbat

Originally reported by Matt Clay (Bitbucket: mattclay, GitHub: mattclay)


The 4.3.2 release generates a traceback on python 2.6, where previous versions did not:

Traceback (most recent call last):
  File "/root/src/github.com/ansible/ansible/test/runner/.tox/py26/bin/coverage-2.6", line 7, in <module>
    from coverage.cmdline import main
  File "/root/src/github.com/ansible/ansible/test/runner/.tox/py26/lib/python2.6/site-packages/coverage/__init__.py", line 13, in <module>
    from coverage.control import Coverage, process_startup
  File "/root/src/github.com/ansible/ansible/test/runner/.tox/py26/lib/python2.6/site-packages/coverage/control.py", line 14, in <module>
    from coverage import env, files
  File "/root/src/github.com/ansible/ansible/test/runner/.tox/py26/lib/python2.6/site-packages/coverage/files.py", line 16, in <module>
    from coverage.misc import contract, CoverageException, join_regex, isolate_module
  File "/root/src/github.com/ansible/ansible/test/runner/.tox/py26/lib/python2.6/site-packages/coverage/misc.py", line 287, in <module>
    class StopEverything(unittest.SkipTest):
AttributeError: 'module' object has no attribute 'SkipTest'

It appears the commit responsible is this one:

https://bitbucket.org/ned/coveragepy/commits/10050dac0e9e45f9a882cfd16d4173fdea040da0

This error was triggered by running tests on the ansible repository from GitHub:

https://github.com/ansible/ansible/

Running tests with:

test/runner/ansible-test sanity --test ansible-doc --python 2.6 --coverage --tox

Changing the constraints.txt for the tests to limit the version to 4.3.1 works around the issue:

ansible/ansible#20329


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions