launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11494
[Merge] lp:~stevenk/launchpad/exported-policy into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/exported-policy into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/exported-policy/+merge/122184
Rename the two POLICY_ALLOWED_TYPES so they are distinguishable in low light conditions.
--
https://code.launchpad.net/~stevenk/launchpad/exported-policy/+merge/122184
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/exported-policy into lp:launchpad.
=== modified file 'lib/lp/bugs/interfaces/bugtarget.py'
--- lib/lp/bugs/interfaces/bugtarget.py 2012-08-20 13:29:54 +0000
+++ lib/lp/bugs/interfaces/bugtarget.py 2012-08-31 02:12:18 +0000
@@ -18,7 +18,7 @@
'IOfficialBugTagTargetPublic',
'IOfficialBugTagTargetRestricted',
'ISeriesBugTarget',
- 'POLICY_ALLOWED_TYPES',
+ 'BUG_POLICY_ALLOWED_TYPES',
'POLICY_DEFAULT_TYPES',
]
@@ -205,7 +205,7 @@
vocabulary=BugBlueprintSearch, required=False))
-POLICY_ALLOWED_TYPES = {
+BUG_POLICY_ALLOWED_TYPES = {
BugSharingPolicy.PUBLIC: FREE_INFORMATION_TYPES,
BugSharingPolicy.PUBLIC_OR_PROPRIETARY: NON_EMBARGOED_INFORMATION_TYPES,
BugSharingPolicy.PROPRIETARY_OR_PUBLIC: NON_EMBARGOED_INFORMATION_TYPES,
=== modified file 'lib/lp/code/model/branchnamespace.py'
--- lib/lp/code/model/branchnamespace.py 2012-08-22 04:58:49 +0000
+++ lib/lp/code/model/branchnamespace.py 2012-08-31 02:12:18 +0000
@@ -8,7 +8,7 @@
'BranchNamespaceSet',
'PackageNamespace',
'PersonalNamespace',
- 'POLICY_ALLOWED_TYPES',
+ 'BRANCH_POLICY_ALLOWED_TYPES',
'ProductNamespace',
]
@@ -85,7 +85,7 @@
)
-POLICY_ALLOWED_TYPES = {
+BRANCH_POLICY_ALLOWED_TYPES = {
BranchSharingPolicy.PUBLIC: FREE_INFORMATION_TYPES,
BranchSharingPolicy.PUBLIC_OR_PROPRIETARY: NON_EMBARGOED_INFORMATION_TYPES,
BranchSharingPolicy.PROPRIETARY_OR_PUBLIC: (
@@ -427,7 +427,7 @@
self.product, required_grant, self.owner)):
return []
- return POLICY_ALLOWED_TYPES[
+ return BRANCH_POLICY_ALLOWED_TYPES[
self.product.branch_sharing_policy]
# The project still uses BranchVisibilityPolicy, so check that.
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2012-08-30 05:25:03 +0000
+++ lib/lp/registry/model/product.py 2012-08-31 02:12:18 +0000
@@ -91,7 +91,7 @@
from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
from lp.bugs.interfaces.bugtarget import (
- POLICY_ALLOWED_TYPES,
+ BUG_POLICY_ALLOWED_TYPES,
POLICY_DEFAULT_TYPES,
)
from lp.bugs.interfaces.bugtaskfilter import OrderedBugTask
@@ -107,9 +107,7 @@
)
from lp.code.enums import BranchType
from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING
-from lp.code.model.branchnamespace import (
- POLICY_ALLOWED_TYPES as BRANCH_POLICY_ALLOWED_TYPES,
- )
+from lp.code.model.branchnamespace import BRANCH_POLICY_ALLOWED_TYPES
from lp.code.model.branchvisibilitypolicy import BranchVisibilityPolicyMixin
from lp.code.model.hasbranches import (
HasBranchesMixin,
@@ -583,13 +581,14 @@
def setBugSharingPolicy(self, bug_sharing_policy):
"""See `IProductEditRestricted`."""
self._prepare_to_set_sharing_policy(
- bug_sharing_policy, BugSharingPolicy, 'bugs', POLICY_ALLOWED_TYPES)
+ bug_sharing_policy, BugSharingPolicy, 'bugs',
+ BUG_POLICY_ALLOWED_TYPES)
self.bug_sharing_policy = bug_sharing_policy
def getAllowedBugInformationTypes(self):
"""See `IProduct.`"""
if self.bug_sharing_policy is not None:
- return POLICY_ALLOWED_TYPES[self.bug_sharing_policy]
+ return BUG_POLICY_ALLOWED_TYPES[self.bug_sharing_policy]
types = set(InformationType.items)
types.discard(InformationType.PROPRIETARY)
=== modified file 'lib/lp/scripts/garbo.py'
--- lib/lp/scripts/garbo.py 2012-08-29 14:16:30 +0000
+++ lib/lp/scripts/garbo.py 2012-08-31 02:12:18 +0000
@@ -47,9 +47,7 @@
from lp.answers.model.answercontact import AnswerContact
from lp.bugs.interfaces.bug import IBugSet
-from lp.bugs.interfaces.bugtarget import (
- POLICY_ALLOWED_TYPES as BUG_POLICY_ALLOWED_TYPES,
- )
+from lp.bugs.interfaces.bugtarget import BUG_POLICY_ALLOWED_TYPES
from lp.bugs.model.bug import Bug
from lp.bugs.model.bugattachment import BugAttachment
from lp.bugs.model.bugnotification import BugNotification
@@ -60,9 +58,7 @@
)
from lp.code.enums import BranchVisibilityRule
from lp.code.interfaces.revision import IRevisionSet
-from lp.code.model.branchnamespace import (
- POLICY_ALLOWED_TYPES as BRANCH_POLICY_ALLOWED_TYPES,
- )
+from lp.code.model.branchnamespace import BRANCH_POLICY_ALLOWED_TYPES
from lp.code.model.branchvisibilitypolicy import BranchVisibilityTeamPolicy
from lp.code.model.codeimportevent import CodeImportEvent
from lp.code.model.codeimportresult import CodeImportResult
Follow ups