Post-reorg, importing interfaces is sometimes broken
Bug #384831 reported by
Gavin Panella
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Medium
|
Jonathan Lange |
Bug Description
After the migration of the bugs code to the lp/bugs tree, there seem
to be problems importing interfaces. The following occurs:
$ python2.4
>>> import _pythonpath
>>> import lp.bugs.
Traceback (most recent call last):
...
ImportError: cannot import name IBug
This was causing problems in several scripts, e.g. update-cve.py.
A temporary workaround:
>>> import canonical.
has been added to lib/lp/
with Bjorn. This bug is to remind us to fix this crufty hack.
Related branches
lp:~jml/launchpad/interface-apocalypse
- Michael Hudson-Doyle: Approve
- Curtis Hovey (community): Needs Fixing (code)
-
Diff: 258 lines (+37/-156)6 files modifiedlib/canonical/launchpad/doc/renamed-view.txt (+1/-1)
lib/canonical/launchpad/interfaces/__init__.py (+12/-146)
lib/lp/bugs/interfaces/__init__.py (+0/-5)
lib/lp/code/interfaces/webservice.py (+23/-0)
lib/lp/soyuz/interfaces/archive.py (+1/-0)
lib/lp/soyuz/interfaces/webservice.py (+0/-4)
Changed in malone: | |
milestone: | 2.2.6 → 2.2.7 |
Changed in malone: | |
milestone: | 2.2.7 → none |
Changed in malone: | |
milestone: | none → 10.11 |
tags: |
added: qa-ok removed: qa-needstesting |
tags: |
added: qa-ok removed: qa-bad |
Changed in malone: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I am hitting into a lot of circular import problems because of this now (trying to migrate translations code to a new layout as well). This seems to mainly affect scripts.
Running in 'make harness' does not exhibit the same issues, so it seems that scripts might use xmlconfig. file('script. zcml') call that is done by make harness as well.
Doing that makes it all work without that ugly trick:
$ python2.4 file('script. zcml') configuration. config. ConfigurationMa chine object at 0x7f65d8c8a690> interfaces. bug
>>> import _pythonpath
>>> from zope.configuration import xmlconfig
>>> xmlconfig.
<zope.
>>> import lp.bugs.
>>>