[Openstack-poc] [Bug 951197] Re: openstack namespace does not play nicely with checkedout repos

2012-03-23 Thread Johannes Erdfelt
The change doesn't handle the case where cfg.py imports other modules
from openstack/common which aren't installed yet either. This is the
case with the new iniparser.py module that I recently got merged.

As a workaround so I can get my changes into nova, I hacked update.py to
use this code:

try:
from openstack.common import cfg
except AttributeError:
try:
sys.path.insert(0, '.')
from openstack.common import cfg
finally:
sys.path.pop(0)


** Changed in: openstack-common
   Status: Fix Committed = Confirmed

-- 
You received this bug notification because you are a member of OpenStack
Common Drivers, which is the registrant for openstack-common.
https://bugs.launchpad.net/bugs/951197

Title:
  openstack namespace does not play nicely with checkedout repos

Status in openstack-common:
  Confirmed

Bug description:
  Both openstack.common and openstack.nose_plugin declare the
  'openstack' namespace. When one package is installed it breaks pythons
  search path of ./ for modules.  This breaks update.py for example
  which is meant to be run out of the os-common checkout directory. It
  imports cfg from openstack.common, but since it is not installed it
  cannot be found:

  
  site-packages$ ls openstack*
  openstack.nose_plugin-0.5-py2.7-nspkg.pth

  openstack:
  nose_plugin.py  nose_plugin.pyc

  openstack.nose_plugin-0.5-py2.7.egg-info:
  dependency_links.txt  installed-files.txt PKG-INFO  SOURCES.txt
  entry_points.txt  namespace_packages.txt  requires.txt  top_level.txt

  common$ python update.py
  Traceback (most recent call last):
File update.py, line 64, in module
  from openstack.common import cfg
  ImportError: No module named common

  Since update.py is a temporary workaround for incubation we *could*
  hack it to inject ./openstack/common into the openstack namespace, but
  there might be a better way. Need to research.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openstack-common/+bug/951197/+subscriptions

___
Mailing list: https://launchpad.net/~openstack-poc
Post to : openstack-poc@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack-poc
More help   : https://help.launchpad.net/ListHelp


[Openstack-poc] [Bug 951197] Re: openstack namespace does not play nicely with checkedout repos

2012-03-14 Thread OpenStack Hudson
Reviewed:  https://review.openstack.org/5179
Committed: 
http://github.com/openstack/openstack-common/commit/e8a5ae2e5aab6b649b57d03f8a03af689d7e6b6e
Submitter: Jenkins
Branch:master

commit e8a5ae2e5aab6b649b57d03f8a03af689d7e6b6e
Author: Jason Kölker ja...@koelker.net
Date:   Fri Mar 9 17:29:41 2012 -0600

Import cfg module directly if not in path

If openstack.common is not installed, but another module has declared
the openstack namespace an ImportError is thrown since the common doesnt
exist in the openstack namespace. This falls back to importing cfg
directly from ./openstack/common/cfg.py.

Also ensures that openstack/__init__.py exists in the destination

* Fixes LP951197

Change-Id: I88c26fb7cc1aed97e66b068e4f0562b1f00b2b29


** Changed in: openstack-common
   Status: In Progress = Fix Committed

-- 
You received this bug notification because you are a member of OpenStack
Common Drivers, which is the registrant for openstack-common.
https://bugs.launchpad.net/bugs/951197

Title:
  openstack namespace does not play nicely with checkedout repos

Status in openstack-common:
  Fix Committed

Bug description:
  Both openstack.common and openstack.nose_plugin declare the
  'openstack' namespace. When one package is installed it breaks pythons
  search path of ./ for modules.  This breaks update.py for example
  which is meant to be run out of the os-common checkout directory. It
  imports cfg from openstack.common, but since it is not installed it
  cannot be found:

  
  site-packages$ ls openstack*
  openstack.nose_plugin-0.5-py2.7-nspkg.pth

  openstack:
  nose_plugin.py  nose_plugin.pyc

  openstack.nose_plugin-0.5-py2.7.egg-info:
  dependency_links.txt  installed-files.txt PKG-INFO  SOURCES.txt
  entry_points.txt  namespace_packages.txt  requires.txt  top_level.txt

  common$ python update.py
  Traceback (most recent call last):
File update.py, line 64, in module
  from openstack.common import cfg
  ImportError: No module named common

  Since update.py is a temporary workaround for incubation we *could*
  hack it to inject ./openstack/common into the openstack namespace, but
  there might be a better way. Need to research.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openstack-common/+bug/951197/+subscriptions

___
Mailing list: https://launchpad.net/~openstack-poc
Post to : openstack-poc@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack-poc
More help   : https://help.launchpad.net/ListHelp


[Openstack-poc] [Bug 951197] Re: openstack namespace does not play nicely with checkedout repos

2012-03-09 Thread OpenStack Hudson
Fix proposed to branch: master
Review: https://review.openstack.org/5179

** Changed in: openstack-common
   Status: Confirmed = In Progress

-- 
You received this bug notification because you are a member of OpenStack
Common Drivers, which is the registrant for openstack-common.
https://bugs.launchpad.net/bugs/951197

Title:
  openstack namespace does not play nicely with checkedout repos

Status in openstack-common:
  In Progress

Bug description:
  Both openstack.common and openstack.nose_plugin declare the
  'openstack' namespace. When one package is installed it breaks pythons
  search path of ./ for modules.  This breaks update.py for example
  which is meant to be run out of the os-common checkout directory. It
  imports cfg from openstack.common, but since it is not installed it
  cannot be found:

  
  site-packages$ ls openstack*
  openstack.nose_plugin-0.5-py2.7-nspkg.pth

  openstack:
  nose_plugin.py  nose_plugin.pyc

  openstack.nose_plugin-0.5-py2.7.egg-info:
  dependency_links.txt  installed-files.txt PKG-INFO  SOURCES.txt
  entry_points.txt  namespace_packages.txt  requires.txt  top_level.txt

  common$ python update.py
  Traceback (most recent call last):
File update.py, line 64, in module
  from openstack.common import cfg
  ImportError: No module named common

  Since update.py is a temporary workaround for incubation we *could*
  hack it to inject ./openstack/common into the openstack namespace, but
  there might be a better way. Need to research.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openstack-common/+bug/951197/+subscriptions

___
Mailing list: https://launchpad.net/~openstack-poc
Post to : openstack-poc@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack-poc
More help   : https://help.launchpad.net/ListHelp