launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17500
[Merge] lp:~wgrant/launchpad/dsd-no-dsspr into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/dsd-no-dsspr into lp:launchpad.
Commit message:
DistroSeriesDifferences now use DSPR, not DSSPR.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/dsd-no-dsspr/+merge/241204
--
https://code.launchpad.net/~wgrant/launchpad/dsd-no-dsspr/+merge/241204
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/dsd-no-dsspr into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/distroseriesdifference.py'
--- lib/lp/registry/interfaces/distroseriesdifference.py 2012-01-17 21:45:24 +0000
+++ lib/lp/registry/interfaces/distroseriesdifference.py 2014-11-09 12:02:03 +0000
@@ -44,8 +44,8 @@
from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.sourcepackagename import ISourcePackageName
from lp.soyuz.enums import PackageDiffStatus
-from lp.soyuz.interfaces.distroseriessourcepackagerelease import (
- IDistroSeriesSourcePackageRelease,
+from lp.soyuz.interfaces.distributionsourcepackagerelease import (
+ IDistributionSourcePackageRelease,
)
from lp.soyuz.interfaces.packagediff import IPackageDiff
from lp.soyuz.interfaces.publishing import ISourcePackagePublishingHistory
@@ -135,14 +135,14 @@
required=True, readonly=True)
source_package_release = Reference(
- IDistroSeriesSourcePackageRelease,
+ IDistributionSourcePackageRelease,
title=_("Derived source pub"), readonly=True,
description=_(
"The published version in the derived series with version "
"source_version."))
parent_source_package_release = Reference(
- IDistroSeriesSourcePackageRelease,
+ IDistributionSourcePackageRelease,
title=_("Parent source pub"), readonly=True,
description=_(
"The published version in the derived series with version "
=== modified file 'lib/lp/registry/model/distroseriesdifference.py'
--- lib/lp/registry/model/distroseriesdifference.py 2014-07-04 11:21:54 +0000
+++ lib/lp/registry/model/distroseriesdifference.py 2014-11-09 12:02:03 +0000
@@ -98,9 +98,6 @@
from lp.soyuz.model.distributionsourcepackagerelease import (
DistributionSourcePackageRelease,
)
-from lp.soyuz.model.distroseriessourcepackagerelease import (
- DistroSeriesSourcePackageRelease,
- )
from lp.soyuz.model.packageset import Packageset
from lp.soyuz.model.packagesetsources import PackagesetSources
from lp.soyuz.model.publishing import SourcePackagePublishingHistory
@@ -312,16 +309,17 @@
if spn_id in source_pubs_for_release:
spph = source_pubs_for_release[spn_id]
cache.source_package_release = (
- DistroSeriesSourcePackageRelease(
- dsd.derived_series,
+ DistributionSourcePackageRelease(
+ dsd.derived_series.distribution,
spph.sourcepackagerelease))
else:
cache.source_package_release = None
if spn_id in parent_source_pubs_for_release:
spph = parent_source_pubs_for_release[spn_id]
cache.parent_source_package_release = (
- DistroSeriesSourcePackageRelease(
- dsd.parent_series, spph.sourcepackagerelease))
+ DistributionSourcePackageRelease(
+ dsd.parent_series.distribution,
+ spph.sourcepackagerelease))
else:
cache.parent_source_package_release = None
cache.latest_comment = latest_comment_by_dsd_id.get(dsd.id)
@@ -702,8 +700,8 @@
if pub is None:
return None
else:
- return DistroSeriesSourcePackageRelease(
- distro_series, pub.sourcepackagerelease)
+ return DistributionSourcePackageRelease(
+ distro_series.distribution, pub.sourcepackagerelease)
@cachedproperty
def base_distro_source_package_release(self):
=== modified file 'lib/lp/registry/tests/test_distroseriesdifference.py'
--- lib/lp/registry/tests/test_distroseriesdifference.py 2012-12-26 01:32:19 +0000
+++ lib/lp/registry/tests/test_distroseriesdifference.py 2014-11-09 12:02:03 +0000
@@ -946,7 +946,7 @@
dsd = getUtility(IDistroSeriesDifferenceSource).new(
dsp.derived_series, spn, dsp.parent_series)
spr = dsd.source_package_release
- self.assertEqual(dsp.derived_series, spr.distroseries)
+ self.assertEqual(dsp.derived_series.distribution, spr.distribution)
self.assertEqual(spph.sourcepackagerelease, spr.sourcepackagerelease)
def test_package_diff_urls(self):
=== modified file 'lib/lp/soyuz/doc/distroseriesbinarypackage.txt'
--- lib/lp/soyuz/doc/distroseriesbinarypackage.txt 2014-11-09 08:56:32 +0000
+++ lib/lp/soyuz/doc/distroseriesbinarypackage.txt 2014-11-09 12:02:03 +0000
@@ -54,7 +54,7 @@
>>> "%s %s" % (last_published.name, last_published.version)
u'mozilla-firefox 1.0'
-It also provides access to the last DistroSeriesSourcePackageRelease:
+It also provides access to the last DistributionSourcePackageRelease:
>>> print firefox_dsbp.last_sourcepackagerelease.title
"iceweasel" 1.0 source package in Ubuntu
@@ -78,7 +78,7 @@
>>> print firefox_hoary_dsbp.last_published
None
-In this case, the last DistroSeriesSourcePackageRelease will also be None:
+In this case, the last DistributionSourcePackageRelease will also be None:
>>> print firefox_hoary_dsbp.last_sourcepackagerelease
None
=== modified file 'lib/lp/soyuz/interfaces/distroseriesbinarypackage.py'
--- lib/lp/soyuz/interfaces/distroseriesbinarypackage.py 2013-01-07 02:40:55 +0000
+++ lib/lp/soyuz/interfaces/distroseriesbinarypackage.py 2014-11-09 12:02:03 +0000
@@ -16,12 +16,12 @@
)
from lp import _
+from lp.soyuz.interfaces.distributionsourcepackagerelease import (
+ IDistributionSourcePackageRelease,
+ )
from lp.soyuz.interfaces.distroarchseriesbinarypackagerelease import (
IDistroArchSeriesBinaryPackageRelease,
)
-from lp.soyuz.interfaces.distroseriessourcepackagerelease import (
- IDistroSeriesSourcePackageRelease,
- )
class IDistroSeriesBinaryPackage(Interface):
@@ -53,8 +53,8 @@
"binary package in this distroseries."))
last_sourcepackagerelease = Reference(
- IDistroSeriesSourcePackageRelease,
- title=_("The DistroSeriesSourcePackageRelease that was used to "
+ IDistributionSourcePackageRelease,
+ title=_("The DistributionSourcePackageRelease that was used to "
"generate the most recently published binary package "
"release"))
=== modified file 'lib/lp/soyuz/model/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/model/distributionsourcepackagerelease.py 2014-11-09 01:48:36 +0000
+++ lib/lp/soyuz/model/distributionsourcepackagerelease.py 2014-11-09 12:02:03 +0000
@@ -195,7 +195,7 @@
return DecoratedResultSet(all_published, make_dsb_package)
def getBinariesForSeries(self, distroseries):
- """See `IDistroSeriesSourcePackageRelease`."""
+ """See `IDistributionSourcePackageRelease`."""
# Avoid circular imports.
from lp.soyuz.model.distroarchseries import DistroArchSeries
store = Store.of(distroseries)
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt 2013-02-13 14:22:07 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroarchseries-binpackages.txt 2014-11-09 12:02:03 +0000
@@ -89,7 +89,7 @@
0.9 : mozilla-firefox : i386 : Warty (4.10) : Ubuntu
This page represents an IDistroArchSeriesBinaryPackageRelease and is
-able to point the user to the IDistroSeriesSourcePackageRelease which
+able to point the user to the IDistributionSourcePackageRelease which
originated itself:
>>> source_element = find_tag_by_id(browser.contents, 'source')
@@ -224,7 +224,7 @@
1.0-1 : commercialpackage : i386 : Breezy Badger Autotest (6.6.6) : Ubuntu
This page represents an IDistroArchSeriesBinaryPackageRelease and is
-able to point the user to the IDistroSeriesSourcePackageRelease which
+able to point the user to the IDistributionSourcePackageRelease which
originated itself:
>>> print extract_text(find_tag_by_id(browser.contents, 'source'))
=== modified file 'lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py'
--- lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py 2014-11-09 07:21:24 +0000
+++ lib/lp/soyuz/tests/test_distributionsourcepackagerelease.py 2014-11-09 12:02:03 +0000
@@ -156,7 +156,7 @@
class TestGetBinariesForSeries(TestCaseWithFactory):
- """Tests for DistroSeriesSourcePackageRelease."""
+ """Tests for DistributionSourcePackageRelease.getBinariesForSeries."""
layer = DatabaseFunctionalLayer
@@ -190,9 +190,8 @@
return bp_release
def test_binaries__no_releases(self):
- # If no binary releases exist,
- # DistroSeriesSourcePackageRelease.binaries returns an empty
- # sequence.
+ # If no binary releases exist, getBinariesForSeries returns an
+ # empty sequence.
self.assertEqual(
0,
self.dspr.getBinariesForSeries(
@@ -200,7 +199,7 @@
def test_binaries__one_release_for_source_package(self):
# If a binary release exists, it is returned by
- # DistroSeriesSourcePackageRelease.binaries.
+ # getBinariesForSeries.
bp_release = self.makeBinaryPackageRelease()
self.assertEqual(
[bp_release],
@@ -222,7 +221,7 @@
# The properties BinaryPackageRelease.build and
# and BinaryPackageRelease.binarypackagename of the
# the result objects are preloaded in the query
- # issued in DistroSeriesSourcePackageRelease.binaries.
+ # issued in getBinariesForSeries.
self.makeBinaryPackageRelease()
# Both properties we want to check have been created
# in makeBinaryPackageRelease() and are thus already
Follow ups