Metaclass problem on Python 3.2

Bug #1062252 reported by Dirkjan Ochtman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.interface
Invalid
Undecided
Unassigned

Bug Description

This has been happening for a while now, in both 3.8.0 and 4.0.1:

Traceback (most recent call last):
  File "setup.py", line 138, in <module>
    **extra)
  File "/usr/lib64/python3.2/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib64/python3.2/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/usr/lib64/python3.2/site-packages/setuptools/command/test.py", line 137, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib64/python3.2/site-packages/setuptools/command/test.py", line 117, in with_project_on_sys_path
    func()
  File "/usr/lib64/python3.2/site-packages/setuptools/command/test.py", line 146, in run_tests
    testLoader = loader_class()
  File "/usr/lib64/python3.2/unittest/main.py", line 123, in __init__
    self.parseArgs(argv)
  File "/usr/lib64/python3.2/unittest/main.py", line 191, in parseArgs
    self.createTests()
  File "/usr/lib64/python3.2/unittest/main.py", line 198, in createTests
    self.module)
  File "/usr/lib64/python3.2/unittest/loader.py", line 132, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib64/python3.2/unittest/loader.py", line 132, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib64/python3.2/unittest/loader.py", line 103, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/usr/lib64/python3.2/site-packages/setuptools/command/test.py", line 21, in loadTestsFromModule
    tests.append(module.additional_tests())
  File "/usr/lib64/python3.2/site-packages/zope/interface/tests/__init__.py", line 10, in additional_tests
    locals(), [name])
  File "/usr/lib64/python3.2/site-packages/zope/interface/tests/test_odd_declarations.py", line 34, in <module>
    class Odd(object, metaclass=odd.MetaClass): pass
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I cannot reproduce this with zope.interface 4.0.5.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

For that matter, I cannot reproduce this with 4.0.1 either. I tried both tox and buildout + bin/test, with Python 3.2.

Changed in zope.interface:
status: New → Invalid
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Some discussion on IRC lead to the discovery that 'python setup.py test' fails when you've got an older version of zope.interface in the system Python site packages.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.