Code review comment for lp:~bac/launchpad/import_error

Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

The addition of a new test (registry/browser/tests/test_person_view.py) that does an
import of lp.registry.browser.person has caused a circular import error that only
shows up if you try to run just the registry tests using:
bin/test -vvm lp.registry.

The module that triggers the import error is lp.soyuz.browser.archive.ArchiveAdminView.

== Proposed fix ==

The "fix" is to move the import of lp.soyuz.browser.archive in person to be at the
single point of use. This fix may be a mask instead just covering up the real problem.

== Pre-implementation notes ==

Chats with Salgado.

== Implementation details ==

As above.

== Tests ==

bin/test -vvm lp.registry

== Demo and Q/A ==

N/A

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/tests/test_person_view.py
  lib/lp/registry/browser/person.py

== Pylint notices ==

lib/lp/registry/browser/person.py
    117: [F0401] Unable to import 'lazr.delegates' (No module named delegates)
    118: [F0401] Unable to import 'lazr.config' (No module named config)
    119: [F0401] Unable to import 'lazr.restful.interface' (No module named restful)

« Back to merge proposal