← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/more-de-dsspr into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/more-de-dsspr into lp:launchpad.

Commit message:
DS.getLatestUploads, DSBP.last_sourcepackagerelease, SPPH.meta_* no longer return deprecated DSSPRs, but DSPRs.

Requested reviews:
  William Grant (wgrant): code

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/more-de-dsspr/+merge/241203
-- 
https://code.launchpad.net/~wgrant/launchpad/more-de-dsspr/+merge/241203
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'lib/lp/registry/doc/distroseries.txt'
--- lib/lp/registry/doc/distroseries.txt	2014-11-09 01:48:36 +0000
+++ lib/lp/registry/doc/distroseries.txt	2014-11-09 10:36:27 +0000
@@ -1031,7 +1031,7 @@
 
     >>> for upload in latest_uploads:
     ...     print upload.title
-    "mozilla-firefox" 0.9 source package in The Warty Warthog Release
+    "mozilla-firefox" 0.9 source package in Ubuntu
 
 Also, empty results (caused obviously by lack of sample data or very
 earlier development state of a distroseries) are possible:

=== modified file 'lib/lp/registry/interfaces/distroseries.py'
--- lib/lp/registry/interfaces/distroseries.py	2014-11-09 02:03:26 +0000
+++ lib/lp/registry/interfaces/distroseries.py	2014-11-09 10:36:27 +0000
@@ -403,7 +403,7 @@
         """Return the latest five source uploads for this DistroSeries.
 
         It returns a list containing up to five elements as
-        IDistroSeriesSourcePackageRelease instances
+        IDistributionSourcePackageRelease instances
         """
 
     # DistroArchSeries lookup properties/methods.

=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py	2014-11-09 01:48:36 +0000
+++ lib/lp/registry/model/distroseries.py	2014-11-09 10:36:27 +0000
@@ -1224,7 +1224,8 @@
             orderBy=['-packageupload.id'])
 
         distro_sprs = [
-            self.getSourcePackageRelease(spr) for spr in last_uploads]
+            self.distribution.getSourcePackageRelease(spr)
+            for spr in last_uploads]
 
         return distro_sprs
 

=== modified file 'lib/lp/soyuz/doc/distroseriesbinarypackage.txt'
--- lib/lp/soyuz/doc/distroseriesbinarypackage.txt	2010-10-09 16:36:22 +0000
+++ lib/lp/soyuz/doc/distroseriesbinarypackage.txt	2014-11-09 10:36:27 +0000
@@ -57,7 +57,7 @@
 It also provides access to the last DistroSeriesSourcePackageRelease:
 
     >>> print firefox_dsbp.last_sourcepackagerelease.title
-    "iceweasel" 1.0 source package in The Warty Warthog Release
+    "iceweasel" 1.0 source package in Ubuntu
 
 If a DistroSeriesBinaryPackage doesn't have a DistroSeriesPackageCache,
 then the summary and description fields reflect the situation:

=== modified file 'lib/lp/soyuz/interfaces/publishing.py'
--- lib/lp/soyuz/interfaces/publishing.py	2014-10-31 22:53:39 +0000
+++ lib/lp/soyuz/interfaces/publishing.py	2014-11-09 10:36:27 +0000
@@ -371,10 +371,10 @@
     meta_sourcepackage = Attribute(
         "Return an ISourcePackage meta object correspondent to the "
         "sourcepackagerelease attribute inside a specific distroseries")
-    meta_distroseriessourcepackagerelease = Attribute(
-        "Return an IDistroSeriesSourcePackageRelease meta object "
+    meta_distributionsourcepackagerelease = Attribute(
+        "Return an IDistributionSourcePackageRelease meta object "
         "correspondent to the sourcepackagerelease attribute inside "
-        "a specific distroseries")
+        "this distribution")
 
     source_package_name = exported(
         TextLine(

=== modified file 'lib/lp/soyuz/model/distroseriesbinarypackage.py'
--- lib/lp/soyuz/model/distroseriesbinarypackage.py	2013-01-07 02:40:55 +0000
+++ lib/lp/soyuz/model/distroseriesbinarypackage.py	2014-11-09 10:36:27 +0000
@@ -20,9 +20,6 @@
     IDistroSeriesBinaryPackage,
     )
 from lp.soyuz.model.binarypackagerelease import BinaryPackageRelease
-from lp.soyuz.model.distroseriessourcepackagerelease import (
-    DistroSeriesSourcePackageRelease,
-    )
 from lp.soyuz.model.publishing import BinaryPackagePublishingHistory
 
 
@@ -137,11 +134,14 @@
     @property
     def last_sourcepackagerelease(self):
         """See `IDistroSeriesBinaryPackage`."""
+        from lp.soyuz.model.distributionsourcepackagerelease import (
+            DistributionSourcePackageRelease,
+            )
         last_published = self.last_published
         if last_published is None:
             return None
 
         src_pkg_release = last_published.build.source_package_release
 
-        return DistroSeriesSourcePackageRelease(
-            self.distroseries, src_pkg_release)
+        return DistributionSourcePackageRelease(
+            self.distribution, src_pkg_release)

=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py	2014-10-31 22:53:39 +0000
+++ lib/lp/soyuz/model/publishing.py	2014-11-09 10:36:27 +0000
@@ -528,9 +528,9 @@
             self.sourcepackagerelease.sourcepackagename)
 
     @property
-    def meta_distroseriessourcepackagerelease(self):
+    def meta_distributionsourcepackagerelease(self):
         """see `ISourcePackagePublishingHistory`."""
-        return self.distroseries.getSourcePackageRelease(
+        return self.distroseries.distribution.getSourcePackageRelease(
             self.sourcepackagerelease)
 
     # XXX: StevenK 2011-09-13 bug=848563: This can die when

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt	2009-11-09 17:08:21 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt	2014-11-09 10:36:27 +0000
@@ -15,7 +15,7 @@
     Mozilla Firefox Web Browser
     Mozilla Firefox Web Browser is .....
     Source package
-    "iceweasel" 1.0 source package in The Warty Warthog Release
+    "iceweasel" 1.0 source package in Ubuntu
     Published versions
     mozilla-firefox 0.9 in hppa (Release)
     mozilla-firefox 0.9 in i386 (Release)
@@ -36,7 +36,7 @@
 
     >>> browser.getLink(id="source_package").click()
     >>> browser.title
-    '...iceweasel... source package : Warty (4.10) : Ubuntu'
+    '1.0 : ...iceweasel... package : Ubuntu'
 
 Some DistroSeriesBinaryPackages are unpublished, in this case there is
 no link to any source package:

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt	2012-02-07 15:08:44 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-index.txt	2014-11-09 10:36:27 +0000
@@ -42,12 +42,12 @@
   True
 
 The link presented points to the SourcePackageRelease inside the
-DistroSeries in question (a IDRSPR), we can check for consistency
+Distribution in question (a IDSPR), we can check for consistency
 clicking on it:
 
   >>> anon_browser.getLink("mozilla-firefox 0.9").click()
   >>> anon_browser.url
-  'http://launchpad.dev/ubuntu/warty/+source/mozilla-firefox/0.9'
+  'http://launchpad.dev/ubuntu/+source/mozilla-firefox/0.9'
 
 Empty results are also presented properly (even if they are quite rare
 in production environment):

=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
--- lib/lp/soyuz/templates/archive-index.pt	2012-03-10 15:08:09 +0000
+++ lib/lp/soyuz/templates/archive-index.pt	2014-11-09 10:36:27 +0000
@@ -244,7 +244,7 @@
               </td>
               <td>
                 <tal:version define="
-                version_name publishing/meta_distroseriessourcepackagerelease/version;"
+                version_name publishing/sourcepackagerelease/version;"
                     content="version_name">
                   2.0.39
                 </tal:version>

=== modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-detailed.pt'
--- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-detailed.pt	2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-detailed.pt	2014-11-09 10:36:27 +0000
@@ -16,8 +16,8 @@
 
   <div class="boardCommentDetails">
     <strong>
-      <a tal:content="context/meta_distroseriessourcepackagerelease/version"
-         tal:attributes="href context/meta_distroseriessourcepackagerelease/fmt:url"
+      <a tal:content="context/sourcepackagerelease/version"
+         tal:attributes="href context/meta_distributionsourcepackagerelease/fmt:url"
       >2.0.39</a>
     </strong>
     <table>

=== modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-summary.pt'
--- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-summary.pt	2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-summary.pt	2014-11-09 10:36:27 +0000
@@ -5,8 +5,8 @@
   omit-tag="">
 
   <tal:publishing-history define="
-    version_name context/meta_distroseriessourcepackagerelease/version;
-    version_url context/meta_distroseriessourcepackagerelease/fmt:url;
+    version_name context/sourcepackagerelease/version;
+    version_url context/meta_distributionsourcepackagerelease/fmt:url;
     series_name context/distroseries/displayname;
     series_url context/meta_sourcepackage/fmt:url">
 


References