strutils imports openstack.common.log and has plenty of unused dependencies

Bug #1174215 reported by Alexej Ababilov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Undecided
Alexej Ababilov

Bug Description

If you try to update oslo for novaclient. you will import _a lot_ of really unused modules:

$ python update.py ../python-novaclient/openstack-common.conf
Copying openstack.common.setup under the novaclient module in ../python-novaclient
Copying openstack.common.timeutils under the novaclient module in ../python-novaclient
Copying openstack.common.strutils under the novaclient module in ../python-novaclient
Copying openstack.common.version under the novaclient module in ../python-novaclient
Copying openstack.common.apiclient under the novaclient module in ../python-novaclient
Copying openstack.common.log under the novaclient module in ../python-novaclient
Copying openstack.common.gettextutils under the novaclient module in ../python-novaclient
Copying openstack.common.jsonutils under the novaclient module in ../python-novaclient
Copying openstack.common.local under the novaclient module in ../python-novaclient
Copying openstack.common.notifier under the novaclient module in ../python-novaclient
Copying openstack.common.context under the novaclient module in ../python-novaclient
Copying openstack.common.uuidutils under the novaclient module in ../python-novaclient
Copying openstack.common.rpc under the novaclient module in ../python-novaclient
Copying openstack.common.importutils under the novaclient module in ../python-novaclient
Copying openstack.common.service under the novaclient module in ../python-novaclient
Copying openstack.common.eventlet_backdoor under the novaclient module in ../python-novaclient
Copying openstack.common.threadgroup under the novaclient module in ../python-novaclient
Copying openstack.common.loopingcall under the novaclient module in ../python-novaclient
Copying openstack.common.network_utils under the novaclient module in ../python-novaclient
Copying openstack.common.excutils under the novaclient module in ../python-novaclient
Copying openstack.common.processutils under the novaclient module in ../python-novaclient

(some of them need eventlet that was not required by novaclient initially).

The thing is that strutils imports openstack.common.log that depends on notifier, rpc, eventlet, and so on. This import was inherited from old utils.py and is not used in strutils.

Drop this import and there will be no problem:

$ python update.py ../python-novaclient/openstack-common.conf
Copying openstack.common.setup under the novaclient module in ../python-novaclient
Copying openstack.common.timeutils under the novaclient module in ../python-novaclient
Copying openstack.common.strutils under the novaclient module in ../python-novaclient
Copying openstack.common.version under the novaclient module in ../python-novaclient
Copying openstack.common.apiclient under the novaclient module in ../python-novaclient

summary: - strutils import logging and has plenty of unused dependencies
+ strutils imports openstack.common.log and has plenty of unused
+ dependencies
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

Changed in oslo:
assignee: nobody → Alessio Ababilov (aababilov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/27685
Committed: http://github.com/openstack/oslo-incubator/commit/8c964a25a0904f4153eb4fbcfb3cfd4d8a357e0c
Submitter: Jenkins
Branch: master

commit 8c964a25a0904f4153eb4fbcfb3cfd4d8a357e0c
Author: Alessio Ababilov <email address hidden>
Date: Mon Apr 29 11:13:51 2013 +0300

    Do not import openstack.common.log in strutils

    strutils imports openstack.common.log that depends on
    notifier, rpc, eventlet, etc. This import was inherited
    from old utils.py and is not used in strutils.

    All these numerous dependencies are not desirable in such
    small projects as novaclient that needs strutils only.

    Change-Id: I7761fb53ab58bd8801448c56648dace14ca7dc89
    Fixes: bug #1174215

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-1 → 2013.2
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.