cfg: unneeded multiple inheritance

Bug #927650 reported by Mark McLoughlin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-common
Fix Released
Low
Zhongyue Luo

Bug Description

From Monsyne Dragon in https://review.openstack.org/3729

  File nova/openstack/common/cfg.py
  Line 696: class ConfigOpts(collections.Mapping, object):
  I don't think we really need to multiply inherit from 'object' here.
  esp. since collections.Mapping already inherits from object.

  While this doesn't affect anything atm, this kind of diamond inheritance may lead to some rather non-intuitive behavior if
  someone subclasses ConfigOpts in the future

Tags: cfg
Revision history for this message
Zhongyue Luo (zyluo) wrote :

In python=<2.6, collections.Mapping inherits from
collections.Sized, collections.Iterable, and collections.Container
which are also subclasses of object.

Changed in openstack-common:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-common (master)

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

Changed in openstack-common:
assignee: nobody → Zhongyue Luo (lzyeval)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-common (master)

Reviewed: https://review.openstack.org/4059
Committed: http://github.com/openstack/openstack-common/commit/8f1de0c493a68eec5801037590d769e711f19127
Submitter: Jenkins
Branch: master

commit 8f1de0c493a68eec5801037590d769e711f19127
Author: Zhongyue Luo <email address hidden>
Date: Sun Feb 12 16:04:21 2012 +0800

    cfg: unneeded multiple inheritance

    Fixed bug #927650

    In python=<2.6, collections.Mapping inherits from
    collections.Sized, collections.Iterable, and collections.Container
    which are also subclasses of object.

    Change-Id: I6238c683324127abd9fb637748a10b6bdb2961e0

Changed in openstack-common:
status: In Progress → Fix Committed
Mark McLoughlin (markmc)
tags: added: cfg
Mark McLoughlin (markmc)
Changed in openstack-common:
milestone: none → 2012.1
importance: Undecided → Low
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.