``__nonzero__`` traceback on python3

Issue #364 resolved
Ralph Bean created an issue

I ran into this traceback when trying to run the python3 test suite for the nose package using the 4.0a5 release of coverage.

Traceback (most recent call last):
  File "/builddir/build/BUILD/python3-python-nose-1.3.6-1.fc23/build/tests/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/builddir/build/BUILD/python3-python-nose-1.3.6-1.fc23/build/tests/nose/loader.py", line 420, in loadTestsFromName
    addr.filename, addr.module)
  File "/builddir/build/BUILD/python3-python-nose-1.3.6-1.fc23/build/tests/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/builddir/build/BUILD/python3-python-nose-1.3.6-1.fc23/build/tests/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.4/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/usr/lib64/python3.4/imp.py", line 171, in load_source
    module = methods.load()
  File "<frozen importlib._bootstrap>", line 1220, in load
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/builddir/build/BUILD/python3-python-nose-1.3.6-1.fc23/build/tests/functional_tests/test_coverage_plugin.py", line 14, in <module>
    import coverage
  File "/usr/lib64/python3.4/site-packages/coverage/__init__.py", line 10, in <module>
    from coverage.control import Coverage, process_startup
  File "/usr/lib64/python3.4/site-packages/coverage/control.py", line 1138, in <module>
    class Plugins(object):
  File "/usr/lib64/python3.4/site-packages/coverage/control.py", line 1176, in Plugins
    __bool__ = __nonzero__
NameError: name '__nonzero__' is not defined

If I can provide any other information (or help!) let me know.

(Also, filed downstream here in Fedora's bug-tracker: https://bugzilla.redhat.com/show_bug.cgi?id=1208965 )

Comments (4)

  1. Ned Batchelder repo owner

    @ralphbean I'm not sure why 2to3 is involved? Coverage.py doesn't need that step, it will run natively on Python 2 or Python 3.

  2. Ned Batchelder repo owner

    I notice the fedora ticket says, "we don;t need to run 2to3 any more". Coverage.py has never needed 2to3. Also, are you packaging an alpha release of coverage.py? That seems unwise....

  3. Ned Batchelder repo owner

    Is there some indication that this is an alpha release? Or are Fedora users just getting an alpha without realizing it? I guess rawhide users expect that kind of bleeding edge?

  4. Log in to comment