setup.py fails w/ TypeError: super(NovaLogger, self).warning(msg, *args, **kwargs)

Bug #917398 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Naveed Massjouni

Bug Description

After commit 067eb74733d00d2d9eda46b313c612746b1bba2e I'm now getting this when running setup.py:

Traceback (most recent call last):
  File "setup.py", line 104, in <module>
    py_modules=[])
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 96, in setup
    __requires(attrs, src_all)
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 424, in __requires
    __add_imports(imports, s, attrs)
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 368, in __add_imports
    if __external_mod(cur_module, alias.name, attrs):
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 323, in __external_mod
    mod = __import__(module)
  File "/usr/lib/python2.6/md5.py", line 8, in <module>
    DeprecationWarning, 2)
  File "/tmp/tmp.o2Z8XObOh6/nova/nova/utils.py", line 1397, in _showwarning
    LOG.warning(fmtmsg)
  File "/tmp/tmp.o2Z8XObOh6/nova/nova/log.py", line 187, in warning
    super(NovaLogger, self).warning(msg, *args, **kwargs)
TypeError: super() argument 1 must be type, not classobj
dh_auto_build: python2.6 setup.py build --force returned exit code 1
make[1]: *** [override_dh_auto_build] Error 1
make[1]: Leaving directory `/tmp/tmp.o2Z8XObOh6/nova'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
rake aborted!
Build packages failed!

Revision history for this message
Dan Prince (dan-prince) wrote :

Looks like the issue here is that NovaLogger now extends Logger. In python 2.6 Logger extends Filterer which is an old style class that doesn't extend (object). If I edit /usr/lib/python2.6/logging/__init__.py and make change Filterer to Filterer(object) it works fine.

So the issue here appears to be a python2.6 problem when using the latest nova code.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/3086

Changed in nova:
assignee: nobody → Naveed Massjouni (ironcamel)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3086
Committed: http://github.com/openstack/nova/commit/f2fc7dd9b2dbf9259c232f9561804dc6c0cff0bd
Submitter: Jenkins
Branch: master

commit f2fc7dd9b2dbf9259c232f9561804dc6c0cff0bd
Author: Naveed Massjouni <email address hidden>
Date: Mon Jan 16 23:37:12 2012 +0000

    Super is not so super.

    Fixing bug where calling super causes TypeError. For explanation, see:
    http://stackoverflow.com/questions/489269/python-super-raises-typeerror-why

    bug: 917398
    Change-Id: Ib2bd69496b4e1e93f63b17b9ba751ae27126f736

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
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.