← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~bac/launchpad/bug-616059-shipit into lp:launchpad/devel

 

Brad Crittenden has proposed merging lp:~bac/launchpad/bug-616059-shipit into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #616059 Shipit dependencies on Launchpad should be isolated
  https://bugs.launchpad.net/bugs/616059


= Summary =

Shipit has historically had lots of dependencies on Launchpad code.
Reorganizing and refactoring code would often break Shipit, which would
cause simple changes to have higher overhead.

Moving all symbols to a single wrapper module isolates Shipit from
Launchpad and allows Launchpad to move stuff around without changing
shipit, we'd just need to change the symbols in lp.shipit, which we control.

== Proposed fix ==

As above.

== Pre-implementation notes ==

Talks with Registry folks and discussed on the mailing list.

== Implementation details ==

As above.

== Tests ==

bin/test -vvm canonical.shipit

== Demo and Q/A ==


= Launchpad lint =

The Line Too Long problems will be fixed.  The 'unused' warnings are by
design.

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/shipit.py
  lib/lp/scripts/utilities/importfascist.py
  lib/canonical/launchpad/webapp/tests/test_login.py
  lib/canonical/launchpad/webapp/interaction.py

./lib/lp/shipit.py
      23: 'ILibraryFileAliasSet' imported but unused
      51: 'UnexpectedFormData' imported but unused
      32: 'setUpGlobs' imported but unused
      78: 'simple_sendmail' imported but unused
      33: 'LayeredDocFileSuite' imported but unused
       4: 'MaintenanceMessage' imported but unused
      43: 'BatchNavigator' imported but unused
      44: 'MasterDatabasePolicy' imported but unused
      64: 'VirtualHostRequestPublicationFactory' imported but unused
      56: 'allowUnauthenticatedSession' imported but unused
      45: 'SystemErrorView' imported but unused
      26: 'AuthorizationBase' imported but unused
      19: 'IAccount' imported but unused
      42: 'urlappend' imported but unused
      89: 'LaunchpadObjectFactory' imported but unused
      25: 'setFirstLayer' imported but unused
      70: 'fill_login_form_and_submit' imported but unused
       7: 'Account' imported but unused
      34: 'sd_setUp' imported but unused
      62: 'LaunchpadBrowserRequest' imported but unused
      79: 'LaunchpadCronScript' imported but unused
      28: 'tearDown' imported but unused
      16: 'ISlaveStore' imported but unused
      41: 'stepto' imported but unused
       6: 'LaunchpadImageFolder' imported but unused
      39: 'canonical_url' imported but unused
      46: 'Participation' imported but unused
      69: 'SRegResponse_fromSuccessResponse_stubbed' imported but unused
      77: 'stub' imported but unused
      60: 'LaunchpadView' imported but unused
      29: 'PageTestSuite' imported but unused
      74: 'PersonCreationRationale' imported but unused
      88: 'run_script' imported but unused
      27: 'setUp' imported but unused
      22: 'ILaunchpadCelebrities' imported but unused
      87: 'logout' imported but unused
      75: 'Karma' imported but unused
      49: 'IPlacelessLoginSource' imported but unused
       1: '_' imported but unused
      67: 'FakeOpenIDResponse' imported but unused
      15: 'IMasterObject' imported but unused
      31: 'find_tags_by_class' imported but unused
      50: 'IStoreSelector' imported but unused
       9: 'ANONYMOUS' imported but unused
      54: 'action' imported but unused
      10: 'login' imported but unused
       2: 'versioninfo' imported but unused
      35: 'sd_tearDown' imported but unused
      20: 'IAccountSet' imported but unused
      21: 'EmailAddressStatus' imported but unused
      47: 'ILaunchBag' imported but unused
      82: 'ICountrySet' imported but unused
      58: 'structured' imported but unused
      40: 'redirection' imported but unused
      30: 'extract_text' imported but unused
      80: 'LaunchpadScript' imported but unused
      73: 'IPersonSet' imported but unused
      12: 'shortlist' imported but unused
      57: 'logInPrincipal' imported but unused
      52: 'LaunchpadEditFormView' imported but unused
      76: 'Person' imported but unused
      68: 'IAccountSet_getByOpenIDIdentifier_monkey_patched' imported
but unused
      38: 'Navigation' imported but unused
      24: 'IOpenIDConsumerStore' imported but unused
      11: 'intOrZero' imported but unused
      63: 'LaunchpadTestRequest' imported but unused
       8: 'make_mondays_between' imported but unused
      14: 'ILaunchpadRoot' imported but unused
      55: 'custom_widget' imported but unused
      66: 'FakeOpenIDConsumer' imported but unused
      61: 'AccountPrincipalMixin' imported but unused
      18: 'AccountStatus' imported but unused
      90: 'get_request_and_publication' imported but unused
      85: 'TestCaseWithFactory' imported but unused
      84: 'TestCase' imported but unused
      72: 'IPerson' imported but unused
      81: 'LaunchpadScriptFailure' imported but unused
      86: 'login_person' imported but unused
      37: 'revno' imported but unused
      83: 'Country' imported but unused
      17: 'IStore' imported but unused
      71: 'allvhosts' imported but unused
      36: 'LaunchpadValidationError' imported but unused
      53: 'LaunchpadFormView' imported but unused
      65: 'verifyObject' imported but unused
      48: 'ILaunchpadApplication' imported but unused
      59: 'LaunchpadBrowserPublication' imported but unused
      64: E501 line too long (83 characters)
      68: E501 line too long (104 characters)
      69: E501 line too long (96 characters)
      70: E501 line too long (82 characters)
      64: Line exceeds 78 characters.
      68: Line exceeds 78 characters.
      69: Line exceeds 78 characters.
      70: Line exceeds 78 characters.
./lib/lp/scripts/utilities/importfascist.py
     183: E302 expected 2 blank lines, found 1
     179: Line exceeds 78 characters.
./lib/canonical/launchpad/webapp/tests/test_login.py
      74: E301 expected 1 blank line, found 0
      81: E301 expected 1 blank line, found 0
      88: E301 expected 1 blank line, found 0
     269: E231 missing whitespace after ','
     429: E301 expected 1 blank line, found 0
     578: E301 expected 1 blank line, found 0
     583: E301 expected 1 blank line, found 0
-- 
https://code.launchpad.net/~bac/launchpad/bug-616059-shipit/+merge/32458
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/launchpad/bug-616059-shipit into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/webapp/interaction.py'
--- lib/canonical/launchpad/webapp/interaction.py	2010-07-10 10:00:12 +0000
+++ lib/canonical/launchpad/webapp/interaction.py	2010-08-12 15:41:38 +0000
@@ -52,6 +52,7 @@
     'setupInteraction',
     'setupInteractionByEmail',
     'setupInteractionForPerson',
+    'Participation',
     ]
 
 

=== modified file 'lib/canonical/launchpad/webapp/tests/test_login.py'
--- lib/canonical/launchpad/webapp/tests/test_login.py	2010-07-24 17:43:17 +0000
+++ lib/canonical/launchpad/webapp/tests/test_login.py	2010-08-12 15:41:38 +0000
@@ -6,7 +6,13 @@
 
 __metaclass__ = type
 
-__all__ = []
+__all__ = [
+    'FakeOpenIDConsumer',
+    'FakeOpenIDResponse',
+    'IAccountSet_getByOpenIDIdentifier_monkey_patched',
+    'SRegResponse_fromSuccessResponse_stubbed',
+    'fill_login_form_and_submit',
+    ]
 
 from contextlib import contextmanager
 from datetime import datetime, timedelta

=== modified file 'lib/lp/scripts/utilities/importfascist.py'
--- lib/lp/scripts/utilities/importfascist.py	2010-08-02 02:13:52 +0000
+++ lib/lp/scripts/utilities/importfascist.py	2010-08-12 15:41:38 +0000
@@ -38,6 +38,7 @@
     canonical.librarian.client
     canonical.librarian.db
     doctest
+    lp.shipit
     """)
 
 

=== added file 'lib/lp/shipit.py'
--- lib/lp/shipit.py	1970-01-01 00:00:00 +0000
+++ lib/lp/shipit.py	2010-08-12 15:41:38 +0000
@@ -0,0 +1,90 @@
+from canonical.launchpad import _
+from canonical.launchpad import versioninfo
+# From browser/configure.zcml.
+from canonical.launchpad.browser import MaintenanceMessage
+# From browser/configure.zcml.
+from canonical.launchpad.browser.launchpad import LaunchpadImageFolder
+from canonical.launchpad.database.account import Account
+from canonical.launchpad.datetimeutils import make_mondays_between
+from canonical.launchpad.ftests import ANONYMOUS
+from canonical.launchpad.ftests import login
+from canonical.launchpad.helpers import intOrZero
+from canonical.launchpad.helpers import shortlist
+# From browser/configure.zcml.
+from canonical.launchpad.interfaces import ILaunchpadRoot
+from canonical.launchpad.interfaces import IMasterObject
+from canonical.launchpad.interfaces import ISlaveStore
+from canonical.launchpad.interfaces import IStore
+from canonical.launchpad.interfaces.account import AccountStatus
+from canonical.launchpad.interfaces.account import IAccount
+from canonical.launchpad.interfaces.account import IAccountSet
+from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
+from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
+from canonical.launchpad.interfaces.openidconsumer import IOpenIDConsumerStore
+from canonical.launchpad.layers import setFirstLayer
+from canonical.launchpad.security import AuthorizationBase
+from canonical.launchpad.testing.browser import setUp
+from canonical.launchpad.testing.browser import tearDown
+from canonical.launchpad.testing.pages import PageTestSuite
+from canonical.launchpad.testing.pages import extract_text
+from canonical.launchpad.testing.pages import find_tags_by_class
+from canonical.launchpad.testing.pages import setUpGlobs
+from canonical.launchpad.testing.systemdocs import LayeredDocFileSuite
+from canonical.launchpad.testing.systemdocs import setUp as sd_setUp
+from canonical.launchpad.testing.systemdocs import tearDown as sd_tearDown
+from canonical.launchpad.validators import LaunchpadValidationError
+from canonical.launchpad.versioninfo import revno
+from canonical.launchpad.webapp import Navigation
+from canonical.launchpad.webapp import canonical_url
+from canonical.launchpad.webapp import redirection
+from canonical.launchpad.webapp import stepto
+from canonical.launchpad.webapp import urlappend
+from canonical.launchpad.webapp.batching import BatchNavigator
+from canonical.launchpad.webapp.dbpolicy import MasterDatabasePolicy
+from canonical.launchpad.webapp.error import SystemErrorView
+from canonical.launchpad.webapp.interaction import Participation
+from canonical.launchpad.webapp.interfaces import ILaunchBag
+from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
+from canonical.launchpad.webapp.interfaces import IPlacelessLoginSource
+from canonical.launchpad.webapp.interfaces import IStoreSelector
+from canonical.launchpad.webapp.interfaces import UnexpectedFormData
+from canonical.launchpad.webapp.launchpadform import LaunchpadEditFormView
+from canonical.launchpad.webapp.launchpadform import LaunchpadFormView
+from canonical.launchpad.webapp.launchpadform import action
+from canonical.launchpad.webapp.launchpadform import custom_widget
+from canonical.launchpad.webapp.login import allowUnauthenticatedSession
+from canonical.launchpad.webapp.login import logInPrincipal
+from canonical.launchpad.webapp.menu import structured
+from canonical.launchpad.webapp.publication import LaunchpadBrowserPublication
+from canonical.launchpad.webapp.publisher import LaunchpadView
+from canonical.launchpad.webapp.servers import AccountPrincipalMixin
+from canonical.launchpad.webapp.servers import LaunchpadBrowserRequest
+from canonical.launchpad.webapp.servers import LaunchpadTestRequest
+from canonical.launchpad.webapp.servers import VirtualHostRequestPublicationFactory
+from canonical.launchpad.webapp.testing import verifyObject
+from canonical.launchpad.webapp.tests.test_login import FakeOpenIDConsumer
+from canonical.launchpad.webapp.tests.test_login import FakeOpenIDResponse
+from canonical.launchpad.webapp.tests.test_login import IAccountSet_getByOpenIDIdentifier_monkey_patched
+from canonical.launchpad.webapp.tests.test_login import SRegResponse_fromSuccessResponse_stubbed
+from canonical.launchpad.webapp.tests.test_login import fill_login_form_and_submit
+from canonical.launchpad.webapp.vhosts import allvhosts
+from lp.registry.interfaces.person import IPerson
+from lp.registry.interfaces.person import IPersonSet
+from lp.registry.interfaces.person import PersonCreationRationale
+from lp.registry.model.karma import Karma
+from lp.registry.model.person import Person
+from lp.services.mail import stub
+from lp.services.mail.sendmail import simple_sendmail
+from lp.services.scripts.base import LaunchpadCronScript
+from lp.services.scripts.base import LaunchpadScript
+from lp.services.scripts.base import LaunchpadScriptFailure
+from lp.services.worlddata.interfaces.country import ICountrySet
+from lp.services.worlddata.model.country import Country
+from lp.testing import TestCase
+from lp.testing import TestCaseWithFactory
+from lp.testing import login_person
+from lp.testing import logout
+from lp.testing import run_script
+from lp.testing.factory import LaunchpadObjectFactory
+from lp.testing.publication import get_request_and_publication