← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:remove-hwdb-person into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:remove-hwdb-person into launchpad:master.

Commit message:
Remove Person.hardware_submissions

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/389983

We're in the process of removing the disused hardware database.  Remove the ability to fetch hardware submissions associated with a person via the webservice API.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:remove-hwdb-person into launchpad:master.
diff --git a/lib/lp/_schema_circular_imports.py b/lib/lp/_schema_circular_imports.py
index 7e0a047..ad2f85b 100644
--- a/lib/lp/_schema_circular_imports.py
+++ b/lib/lp/_schema_circular_imports.py
@@ -342,8 +342,6 @@ patch_collection_return_type(IPerson, 'getOwnedProjects', IProduct)
 # IHasRecipe
 patch_collection_property(IHasRecipes, 'recipes', ISourcePackageRecipe)
 
-patch_collection_property(IPerson, 'hardware_submissions', IHWSubmission)
-
 # publishing.py
 patch_collection_return_type(
     ISourcePackagePublishingHistoryPublic, 'getBuilds', IBinaryPackageBuild)
diff --git a/lib/lp/registry/interfaces/person.py b/lib/lp/registry/interfaces/person.py
index 273b50b..754a920 100644
--- a/lib/lp/registry/interfaces/person.py
+++ b/lib/lp/registry/interfaces/person.py
@@ -1005,11 +1005,6 @@ class IPersonViewRestricted(IHasBranches, IHasSpecifications,
             readonly=True, required=False,
             value_type=Reference(schema=Interface)))
 
-    hardware_submissions = exported(CollectionField(
-            title=_("Hardware submissions"),
-            readonly=True, required=False,
-            value_type=Reference(schema=Interface)))  # HWSubmission
-
     administrated_teams = Attribute(
         u"the teams that this person/team is an administrator of.")
 
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index 5917c6e..8eb34c1 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -3129,12 +3129,6 @@ class Person(
             return False
 
     @property
-    def hardware_submissions(self):
-        """See `IPerson`."""
-        from lp.hardwaredb.model.hwdb import HWSubmissionSet
-        return HWSubmissionSet().search(owner=self)
-
-    @property
     def recipes(self):
         """See `IHasRecipes`."""
         from lp.code.model.sourcepackagerecipe import SourcePackageRecipe
diff --git a/lib/lp/registry/stories/webservice/xx-person.txt b/lib/lp/registry/stories/webservice/xx-person.txt
index 8fcc0fd..a70885a 100644
--- a/lib/lp/registry/stories/webservice/xx-person.txt
+++ b/lib/lp/registry/stories/webservice/xx-person.txt
@@ -20,8 +20,6 @@ for teams (as they're defined in the ITeam interface).
     display_name: u'Guilherme Salgado'
     expired_members_collection_link: u'http://.../~salgado/expired_members'
     gpg_keys_collection_link: u'http://.../~salgado/gpg_keys'
-    hardware_submissions_collection_link:
-        u'http://.../~salgado/hardware_submissions'
     hide_email_addresses: False
     homepage_content: None
     invited_members_collection_link: u'http://.../~salgado/invited_members'
@@ -79,8 +77,6 @@ for teams (as they're defined in the ITeam interface).
     expired_members_collection_link:
         u'http://.../~ubuntu-team/expired_members'
     gpg_keys_collection_link: u'http://.../~ubuntu-team/gpg_keys'
-    hardware_submissions_collection_link:
-        u'http://.../~ubuntu-team/hardware_submissions'
     hide_email_addresses: False
     homepage_content: None
     invited_members_collection_link: