launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01330
[Merge] lp:~sinzui/launchpad/move-binaryandsourcepackagename-0 into lp:launchpad/devel
Curtis Hovey has proposed merging lp:~sinzui/launchpad/move-binaryandsourcepackagename-0 into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#653005 Move BinaryAndSourcePackageName to lp.soyuz
https://bugs.launchpad.net/bugs/653005
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
--
https://code.launchpad.net/~sinzui/launchpad/move-binaryandsourcepackagename-0/+merge/37258
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/move-binaryandsourcepackagename-0 into lp:launchpad/devel.
=== 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 @@
# pylint: disable-msg=W0401,C0301
from canonical.launchpad.database.account import *
-from canonical.launchpad.database.binaryandsourcepackagename import *
from canonical.launchpad.database.emailaddress import *
from canonical.launchpad.database.librarian import *
from canonical.launchpad.database.logintoken import *
=== 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 @@
-<!-- Copyright 2009-2010 Canonical Ltd. This software is licensed under the
- GNU Affero General Public License version 3 (see the file LICENSE).
--->
-
-<configure
- xmlns="http://namespaces.zope.org/zope"
- xmlns:browser="http://namespaces.zope.org/browser"
- xmlns:i18n="http://namespaces.zope.org/i18n"
- i18n_domain="launchpad">
-
- <facet facet="overview">
-
- <!-- BinaryAndSourcePackagename -->
- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageName">
- <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
- </class>
-
- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
- <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
- </class>
-
- <securedutility
- name="BinaryAndSourcePackageName"
- component="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
- provides="zope.schema.interfaces.IVocabularyFactory"
- >
- <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
- </securedutility>
-
- <class class="canonical.launchpad.database.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
- <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
- </class>
-
-
- </facet>
-</configure>
=== 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 @@
<!-- Content class configuration -->
<include file="account.zcml" />
<include file="batchnavigator.zcml" />
- <include file="binaryandsourcepackagename.zcml" />
<include file="datetime.zcml" />
<include file="decoratedresultset.zcml" />
<include file="emailaddress.zcml" />
=== 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 @@
callable="lp.archiveuploader.tests.register_archive_upload_policy_adapters"
/>
+ <!-- BinaryAndSourcePackagename -->
+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageName">
+ <allow interface="lp.soyuz.interfaces.binarypackagename.IBinaryAndSourcePackageName" />
+ </class>
+
+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameIterator">
+ <allow interface="canonical.launchpad.webapp.vocabulary.ICountableIterator" />
+ </class>
+
+ <securedutility
+ name="BinaryAndSourcePackageName"
+ component="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary"
+ provides="zope.schema.interfaces.IVocabularyFactory"
+ >
+ <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
+ </securedutility>
+
+ <class class="lp.soyuz.model.binaryandsourcepackagename.BinaryAndSourcePackageNameVocabulary">
+ <allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
+ </class>
</configure>
=== 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 @@
from zope.schema.vocabulary import SimpleTerm
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.interfaces import IBinaryAndSourcePackageName
from canonical.launchpad.webapp.vocabulary import (
BatchedCountableIterator,
NamedSQLObjectHugeVocabulary,
)
from lp.registry.model.sourcepackagename import getSourcePackageDescriptions
+from lp.soyuz.interfaces.binarypackagename import IBinaryAndSourcePackageName
from lp.soyuz.model.binarypackagename import getBinaryPackageDescriptions
@@ -43,6 +43,7 @@
Builds descriptions from source and binary descriptions it can
identify based on the names returned when queried.
"""
+
def getTermsWithDescriptions(self, results):
# Note that we grab first source package descriptions and then
# binary package descriptions, giving preference to the latter,
@@ -70,5 +71,3 @@
displayname = 'Select a Package'
_orderBy = 'name'
iterator = BinaryAndSourcePackageNameIterator
-
-