← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/fix-more-utilities into lp:launchpad

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/fix-more-utilities into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/launchpad/fix-more-utilities/+merge/72666

= Summary =

I've got a sort-of-working prototype of a tool that verifies all our utilities to their utility interfaces.

This branch fixes some of the errors it finds.  These are cases where the interface was clearly wrong, and there is no risk of affecting the web service API.


= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/code/interfaces/branchjob.py
  lib/lp/soyuz/interfaces/packagecloner.py
  lib/lp/soyuz/interfaces/packagediff.py
  lib/lp/bugs/interfaces/bugtask.py
-- 
https://code.launchpad.net/~jtv/launchpad/fix-more-utilities/+merge/72666
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/fix-more-utilities into lp:launchpad.
=== modified file 'lib/lp/bugs/interfaces/bugtask.py'
--- lib/lp/bugs/interfaces/bugtask.py	2011-08-23 04:38:33 +0000
+++ lib/lp/bugs/interfaces/bugtask.py	2011-08-24 05:30:43 +0000
@@ -1597,7 +1597,7 @@
         The assignee and the assignee's validity are precached.
         """
 
-    def getBugTaskTargetMilestones(bugtasks, eager=False):
+    def getBugTaskTargetMilestones(bugtasks):
         """Get all the milestones for the selected bugtasks' targets."""
 
     open_bugtask_search = Attribute("A search returning open bugTasks.")

=== modified file 'lib/lp/code/interfaces/branchjob.py'
--- lib/lp/code/interfaces/branchjob.py	2011-06-20 18:58:27 +0000
+++ lib/lp/code/interfaces/branchjob.py	2011-08-24 05:30:43 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 # pylint: disable-msg=E0211,E0213
@@ -111,10 +111,11 @@
 
 class IBranchUpgradeJobSource(IJobSource):
 
-    def create(branch):
+    def create(branch, requester):
         """Upgrade a branch to a more current format.
 
         :param branch: The database branch to upgrade.
+        :param requester: The person requesting the upgrade.
         """
 
 

=== modified file 'lib/lp/soyuz/interfaces/packagecloner.py'
--- lib/lp/soyuz/interfaces/packagecloner.py	2011-06-23 12:28:10 +0000
+++ lib/lp/soyuz/interfaces/packagecloner.py	2011-08-24 05:30:43 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd.  This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 # pylint: disable-msg=E0211,E0213
@@ -17,12 +17,13 @@
 class IPackageCloner(Interface):
     """Copies publishing history data across archives."""
 
-    def clonePackages(
-        origin, destination, distroarchseries_list=None,
-        proc_families=None, sourcepackagenames=None,
-        always_create=False, no_duplicates=False):
-        """Copies the source packages from origin to destination as
-        well as the binary packages for the DistroArchSeries specified.
+    def clonePackages(origin, destination, distroarchseries_list=None,
+                    proc_families=None, sourcepackagenames=None,
+                    always_create=False):
+        """Copy packages from origin to destination.
+
+        Copies the source packages, as well as the binary packages for the
+        specified `DistroArchSeries`.
 
         :param origin: the location from which packages are to be copied.
         :param destination: the location to which the data is to be copied.
@@ -33,8 +34,6 @@
         :param sourcepackagenames: the source packages which are to be
             copied.
         :param always_create: if builds should always be created.
-        :param no_duplicates: if we should prevent the duplication of packages
-            with identical sourcepackagename in the destination.
         """
 
     def mergeCopy(origin, destination):

=== modified file 'lib/lp/soyuz/interfaces/packagediff.py'
--- lib/lp/soyuz/interfaces/packagediff.py	2011-08-23 04:38:33 +0000
+++ lib/lp/soyuz/interfaces/packagediff.py	2011-08-24 05:30:43 +0000
@@ -114,7 +114,7 @@
         EmptyResultSet is returned.
         """
 
-    def getDiffBetweenReleases(self, from_spr, to_spr):
+    def getDiffBetweenReleases(from_spr, to_spr):
         """Return the diff that is targetted to the two SPRs.
 
         :param from_spr: a `SourcePackageRelease` object.