Colin Watson has proposed merging 
lp:~cjwatson/launchpad/unexport-getSharedArtifacts into lp:launchpad.

Commit message:
Stop exporting the unsupportable ISharingService.getSharedArtifacts method.  
Use getSharedBugs etc. instead.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/unexport-getSharedArtifacts/+merge/248923

Stop exporting the unsupportable ISharingService.getSharedArtifacts method.  
Use getSharedBugs etc. instead.

As well as being unbatchable, we cannot retain API compatibility for the return 
value of getSharedArtifacts when we add new shareable artifact types, since it 
simply returns a tuple of (bugtasks, branches, specifications).
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~cjwatson/launchpad/unexport-getSharedArtifacts into lp:launchpad.
=== modified file 'lib/lp/registry/interfaces/sharingservice.py'
--- lib/lp/registry/interfaces/sharingservice.py	2013-01-09 05:37:18 +0000
+++ lib/lp/registry/interfaces/sharingservice.py	2015-02-06 15:25:05 +0000
@@ -98,12 +98,6 @@
         :return: a collection of distributions
         """
 
-    @export_read_operation()
-    @call_with(user=REQUEST_USER)
-    @operation_parameters(
-        pillar=Reference(IPillar, title=_('Pillar'), required=True),
-        person=Reference(IPerson, title=_('Person'), required=True))
-    @operation_for_version('devel')
     def getSharedArtifacts(pillar, person, user):
         """Return the artifacts shared between the pillar and person.
 

=== modified file 'lib/lp/registry/services/tests/test_sharingservice.py'
--- lib/lp/registry/services/tests/test_sharingservice.py	2014-02-27 09:30:38 +0000
+++ lib/lp/registry/services/tests/test_sharingservice.py	2015-02-06 15:25:05 +0000
@@ -1975,15 +1975,3 @@
             pillar=ws_pillar, person=ws_grantee)
         self.assertEqual(1, len(specifications))
         self.assertEqual(specifications[0].name, self.spec.name)
-
-    def test_getSharedArtifacts(self):
-        # Test the exported getSharedArtifacts() method.
-        ws_pillar = ws_object(self.launchpad, self.pillar)
-        ws_grantee = ws_object(self.launchpad, self.grantee)
-        (bugtasks, branches, specs) = self.service.getSharedArtifacts(
-            pillar=ws_pillar, person=ws_grantee)
-        self.assertEqual(1, len(bugtasks))
-        self.assertEqual(1, len(branches))
-        self.assertEqual(1, len(specs))
-        self.assertEqual(bugtasks[0]['title'], self.bug.default_bugtask.title)
-        self.assertEqual(branches[0]['unique_name'], self.branch.unique_name)

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to