Merge lp:~sinzui/launchpad/move-binaryandsourcepackagename-0 into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 11666
Proposed branch: lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
Merge into: lp:launchpad
Diff against target: 125 lines (+22/-41)
5 files modified
lib/canonical/launchpad/database/__init__.py (+0/-1)
lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml (+0/-36)
lib/canonical/launchpad/zcml/configure.zcml (+0/-1)
lib/lp/soyuz/configure.zcml (+20/-0)
lib/lp/soyuz/model/binaryandsourcepackagename.py (+2/-3)
To merge this branch: bzr merge lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+37258@code.launchpad.net

Description of the change

This is my branch to move BinaryAndSourcePackageName to lp.soyuz.

    lp:~sinzui/launchpad/move-binaryandsourcepackagename-0
    Diff size: 126
    Launchpad bug:
          https://bugs.launchpad.net/bugs/653005
    Test command: The whole test suite
    Pre-implementation: no one
    Target release: 10.10

Move BinaryAndSourcePackageName to lp.soyuz
-------------------------------------------

The interfaces for BinaryAndSourcePackageName is defined in soyuz, but the
database class is still in canonical.launchpad.database.

Rules
-----

    * Use utilities/migrater/rename_module to move the module.
    * Copy the ZCML into the soyuz configure.zcml file.

QA
--

    * Verify you can select a binary or source package name from the
      target widget of a bug or question.

Lint
----

Linting changed files:
  lib/canonical/launchpad/database/__init__.py
  lib/canonical/launchpad/zcml/configure.zcml
  lib/lp/soyuz/configure.zcml
  lib/lp/soyuz/model/binaryandsourcepackagename.py

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/database/__init__.py'
--- lib/canonical/launchpad/database/__init__.py 2010-09-30 03:39:35 +0000
+++ lib/canonical/launchpad/database/__init__.py 2010-10-01 14:01:09 +0000
@@ -4,7 +4,6 @@
4# pylint: disable-msg=W0401,C03014# pylint: disable-msg=W0401,C0301
55
6from canonical.launchpad.database.account import *6from canonical.launchpad.database.account import *
7from canonical.launchpad.database.binaryandsourcepackagename import *
8from canonical.launchpad.database.emailaddress import *7from canonical.launchpad.database.emailaddress import *
9from canonical.launchpad.database.librarian import *8from canonical.launchpad.database.librarian import *
10from canonical.launchpad.database.logintoken import *9from canonical.launchpad.database.logintoken import *
1110
=== removed file 'lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml'
--- lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml 2010-09-30 02:52:07 +0000
+++ lib/canonical/launchpad/zcml/binaryandsourcepackagename.zcml 1970-01-01 00:00:00 +0000
@@ -1,36 +0,0 @@
1<!-- Copyright 2009-2010 Canonical Ltd. This software is licensed under the
2 GNU Affero General Public License version 3 (see the file LICENSE).
3-->
4
5<configure
6 xmlns="http://namespaces.zope.org/zope"
7 xmlns:browser="http://namespaces.zope.org/browser"
8 xmlns:i18n="http://namespaces.zope.org/i18n"
9 i18n_domain="launchpad">
10
11 <facet facet="overview">
12
13 <!-- BinaryAndSourcePackagename -->
14 <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageName">
15 <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
16 </class>
17
18 <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
19 <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
20 </class>
21
22 <securedutility
23 name="BinaryAndSourcePackageName"
24 component="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
25 provides="zope.schema.interfaces.IVocabularyFactory"
26 >
27 <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
28 </securedutility>
29
30 <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
31 <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
32 </class>
33
34
35 </facet>
36</configure>
370
=== modified file 'lib/canonical/launchpad/zcml/configure.zcml'
--- lib/canonical/launchpad/zcml/configure.zcml 2010-09-12 15:15:16 +0000
+++ lib/canonical/launchpad/zcml/configure.zcml 2010-10-01 14:01:09 +0000
@@ -11,7 +11,6 @@
11 <!-- Content class configuration -->11 <!-- Content class configuration -->
12 <include file="account.zcml" />12 <include file="account.zcml" />
13 <include file="batchnavigator.zcml" />13 <include file="batchnavigator.zcml" />
14 <include file="binaryandsourcepackagename.zcml" />
15 <include file="datetime.zcml" />14 <include file="datetime.zcml" />
16 <include file="decoratedresultset.zcml" />15 <include file="decoratedresultset.zcml" />
17 <include file="emailaddress.zcml" />16 <include file="emailaddress.zcml" />
1817
=== modified file 'lib/lp/soyuz/configure.zcml'
--- lib/lp/soyuz/configure.zcml 2010-09-30 02:52:07 +0000
+++ lib/lp/soyuz/configure.zcml 2010-10-01 14:01:09 +0000
@@ -878,4 +878,24 @@
878 callable="lp.archiveuploader.tests.register_archive_upload_policy_adapters"878 callable="lp.archiveuploader.tests.register_archive_upload_policy_adapters"
879 />879 />
880880
881 <!-- BinaryAndSourcePackagename -->
882 <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageName">
883 <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
884 </class>
885
886 <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
887 <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
888 </class>
889
890 <securedutility
891 name="BinaryAndSourcePackageName"
892 component="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
893 provides="zope.schema.interfaces.IVocabularyFactory"
894 >
895 <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
896 </securedutility>
897
898 <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
899 <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
900 </class>
881</configure>901</configure>
882902
=== renamed file 'lib/canonical/launchpad/database/binaryandsourcepackagename.py' => 'lib/lp/soyuz/model/binaryandsourcepackagename.py'
--- lib/canonical/launchpad/database/binaryandsourcepackagename.py 2010-08-20 20:31:18 +0000
+++ lib/lp/soyuz/model/binaryandsourcepackagename.py 2010-10-01 14:01:09 +0000
@@ -14,12 +14,12 @@
14from zope.schema.vocabulary import SimpleTerm14from zope.schema.vocabulary import SimpleTerm
1515
16from canonical.database.sqlbase import SQLBase16from canonical.database.sqlbase import SQLBase
17from canonical.launchpad.interfaces import IBinaryAndSourcePackageName
18from canonical.launchpad.webapp.vocabulary import (17from canonical.launchpad.webapp.vocabulary import (
19 BatchedCountableIterator,18 BatchedCountableIterator,
20 NamedSQLObjectHugeVocabulary,19 NamedSQLObjectHugeVocabulary,
21 )20 )
22from lp.registry.model.sourcepackagename import getSourcePackageDescriptions21from lp.registry.model.sourcepackagename import getSourcePackageDescriptions
22from lp.soyuz.interfaces.binarypackagename import IBinaryAndSourcePackageName
23from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions23from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions
2424
2525
@@ -43,6 +43,7 @@
43 Builds descriptions from source and binary descriptions it can43 Builds descriptions from source and binary descriptions it can
44 identify based on the names returned when queried.44 identify based on the names returned when queried.
45 """45 """
46
46 def getTermsWithDescriptions(self, results):47 def getTermsWithDescriptions(self, results):
47 # Note that we grab first source package descriptions and then48 # Note that we grab first source package descriptions and then
48 # binary package descriptions, giving preference to the latter,49 # binary package descriptions, giving preference to the latter,
@@ -70,5 +71,3 @@
70 displayname = 'Select a Package'71 displayname = 'Select a Package'
71 _orderBy = 'name'72 _orderBy = 'name'
72 iterator = BinaryAndSourcePackageNameIterator73 iterator = BinaryAndSourcePackageNameIterator
73
74