launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12214
[Merge] lp:~rharding/launchpad/move_into_utils into lp:launchpad
Richard Harding has proposed merging lp:~rharding/launchpad/move_into_utils into lp:launchpad with lp:~abentley/launchpad/spec-creation-js as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1051954 in Launchpad itself: "json_dump_information_types does not belong in enums.py"
https://bugs.launchpad.net/launchpad/+bug/1051954
For more details, see:
https://code.launchpad.net/~rharding/launchpad/move_into_utils/+merge/125224
= Summary =
During creating the helper to dump information type data to json it was
brought up that really InformationType has moved beyond the scope of registry
and belonged in app for all to share.
This branch moves InformationType enums, vocabularies, and the json dump tool
into app.
== Pre Implementation ==
Everyone got a say, but the final +1 for this came from Curtis and Aaron.
== Implementation Notes ==
Basically a few moved files and a ton of adjustments to imports. We didn't
change the code itself, so only the imports are effected and existing tests
should blow up if anything is amiss.
This branch depends on Aaron's so that we move the json dump utiltity to the
correct new path as well and hopefully prevent things from having merge
conflict issues.
== Tests ==
Heh...too long to list.
--
https://code.launchpad.net/~rharding/launchpad/move_into_utils/+merge/125224
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rharding/launchpad/move_into_utils into lp:launchpad.
=== modified file 'lib/lp/app/browser/informationtype.py'
--- lib/lp/app/browser/informationtype.py 2012-09-14 00:59:44 +0000
+++ lib/lp/app/browser/informationtype.py 2012-09-19 14:18:33 +0000
@@ -8,10 +8,8 @@
from lazr.restful.interfaces import IJSONRequestCache
-from lp.registry.enums import (
- json_dump_information_types,
- PRIVATE_INFORMATION_TYPES
- )
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
+from lp.app.utilities import json_dump_information_types
class InformationTypePortletMixin:
=== modified file 'lib/lp/app/browser/tales.py'
--- lib/lp/app/browser/tales.py 2012-07-23 07:48:51 +0000
+++ lib/lp/app/browser/tales.py 2012-09-19 14:18:33 +0000
@@ -47,6 +47,7 @@
)
from lp import _
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.app.browser.badge import IHasBadges
from lp.app.browser.stringformatter import (
escape,
@@ -64,7 +65,6 @@
from lp.buildmaster.enums import BuildStatus
from lp.code.interfaces.branch import IBranch
from lp.layers import LaunchpadLayer
-from lp.registry.enums import PRIVATE_INFORMATION_TYPES
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distributionsourcepackage import (
IDistributionSourcePackage,
@@ -76,6 +76,7 @@
from lp.services.webapp import (
canonical_url,
urlappend,
+
)
from lp.services.webapp.authorization import check_permission
from lp.services.webapp.canonicalurl import nearest_adapter
=== modified file 'lib/lp/app/browser/tests/launchpad-search-pages.txt'
--- lib/lp/app/browser/tests/launchpad-search-pages.txt 2012-05-02 05:25:11 +0000
+++ lib/lp/app/browser/tests/launchpad-search-pages.txt 2012-09-19 14:18:33 +0000
@@ -115,7 +115,7 @@
created because he is the owner.
>>> from lp.services.webapp.interfaces import ILaunchBag
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> login('test@xxxxxxxxxxxxx')
>>> sample_person = getUtility(ILaunchBag).user
=== modified file 'lib/lp/app/browser/tests/test_launchpad.py'
--- lib/lp/app/browser/tests/test_launchpad.py 2012-08-14 23:27:07 +0000
+++ lib/lp/app/browser/tests/test_launchpad.py 2012-09-19 14:18:33 +0000
@@ -17,13 +17,11 @@
iter_view_registrations,
LaunchpadRootNavigation,
)
+from lp.app.enums import InformationType
from lp.app.errors import GoneError
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
-from lp.registry.enums import (
- InformationType,
- PersonVisibility,
- )
+from lp.registry.enums import PersonVisibility
from lp.registry.interfaces.person import IPersonSet
from lp.services.identity.interfaces.account import AccountStatus
from lp.services.webapp import canonical_url
=== modified file 'lib/lp/app/browser/tests/test_linkchecker.py'
--- lib/lp/app/browser/tests/test_linkchecker.py 2012-05-02 05:25:11 +0000
+++ lib/lp/app/browser/tests/test_linkchecker.py 2012-09-19 14:18:33 +0000
@@ -11,7 +11,7 @@
from zope.security.proxy import removeSecurityProxy
from lp.app.browser.linkchecker import LinkCheckerAPI
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
=== modified file 'lib/lp/app/enums.py'
--- lib/lp/app/enums.py 2012-02-24 06:33:10 +0000
+++ lib/lp/app/enums.py 2012-09-19 14:18:33 +0000
@@ -5,6 +5,15 @@
__metaclass__ = type
__all__ = [
+ 'FREE_INFORMATION_TYPES',
+ 'FREE_PRIVATE_INFORMATION_TYPES',
+ 'InformationType',
+ 'NON_EMBARGOED_INFORMATION_TYPES',
+ 'PRIVATE_INFORMATION_TYPES',
+ 'PROPRIETARY_INFORMATION_TYPES',
+ 'PUBLIC_INFORMATION_TYPES',
+ 'PUBLIC_PROPRIETARY_INFORMATION_TYPES',
+ 'SECURITY_INFORMATION_TYPES',
'ServiceUsage',
'service_uses_launchpad',
]
@@ -15,6 +24,80 @@
)
+class InformationType(DBEnumeratedType):
+ """Information Type.
+
+ The types used to control which users and teams can see various
+ Launchpad artifacts, including bugs and branches.
+ """
+
+ PUBLIC = DBItem(1, """
+ Public
+
+ Everyone can see this information.
+ """)
+
+ PUBLICSECURITY = DBItem(2, """
+ Public Security
+
+ Everyone can see this security related information.
+ """)
+
+ PRIVATESECURITY = DBItem(3, """
+ Private Security
+
+ Only the security group can see this information.
+ """)
+
+ USERDATA = DBItem(4, """
+ Private
+
+ Only shared with users permitted to see private user information.
+ """)
+
+ PROPRIETARY = DBItem(5, """
+ Proprietary
+
+ Only shared with users permitted to see proprietary information.
+ """)
+
+ EMBARGOED = DBItem(6, """
+ Embargoed
+
+ Only shared with users permitted to see embargoed information.
+ """)
+
+
+PUBLIC_INFORMATION_TYPES = (
+ InformationType.PUBLIC, InformationType.PUBLICSECURITY)
+
+PRIVATE_INFORMATION_TYPES = (
+ InformationType.PRIVATESECURITY, InformationType.USERDATA,
+ InformationType.PROPRIETARY, InformationType.EMBARGOED)
+
+NON_EMBARGOED_INFORMATION_TYPES = (
+ PUBLIC_INFORMATION_TYPES +
+ (InformationType.PRIVATESECURITY, InformationType.USERDATA,
+ InformationType.PROPRIETARY))
+
+SECURITY_INFORMATION_TYPES = (
+ InformationType.PUBLICSECURITY, InformationType.PRIVATESECURITY)
+
+FREE_PRIVATE_INFORMATION_TYPES = (
+ InformationType.PRIVATESECURITY, InformationType.USERDATA)
+
+FREE_INFORMATION_TYPES = (
+ PUBLIC_INFORMATION_TYPES + FREE_PRIVATE_INFORMATION_TYPES)
+
+PROPRIETARY_INFORMATION_TYPES = (
+ InformationType.PROPRIETARY, InformationType.EMBARGOED)
+
+# The information types unrelated to user data or security
+PUBLIC_PROPRIETARY_INFORMATION_TYPES = (
+ (InformationType.PUBLIC,) + PROPRIETARY_INFORMATION_TYPES
+)
+
+
class ServiceUsage(DBEnumeratedType):
"""Launchpad application usages.
=== renamed file 'lib/lp/registry/interfaces/informationtype.py' => 'lib/lp/app/interfaces/informationtype.py'
--- lib/lp/registry/interfaces/informationtype.py 2012-09-12 20:19:42 +0000
+++ lib/lp/app/interfaces/informationtype.py 2012-09-19 14:18:33 +0000
@@ -9,8 +9,8 @@
from zope.schema import Choice
from lp import _
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import IPrivacy
-from lp.registry.enums import InformationType
class IInformationType(IPrivacy):
=== renamed file 'lib/lp/registry/tests/test_information_type_vocabulary.py' => 'lib/lp/app/tests/test_information_type_vocabulary.py'
--- lib/lp/registry/tests/test_information_type_vocabulary.py 2012-07-26 07:55:44 +0000
+++ lib/lp/app/tests/test_information_type_vocabulary.py 2012-09-19 14:18:33 +0000
@@ -7,8 +7,8 @@
from testtools.matchers import MatchesStructure
-from lp.registry.enums import InformationType
-from lp.registry.vocabularies import InformationTypeVocabulary
+from lp.app.enums import InformationType
+from lp.app.vocabularies import InformationTypeVocabulary
from lp.testing import TestCase
=== modified file 'lib/lp/app/utilities/__init__.py'
--- lib/lp/app/utilities/__init__.py 2012-09-14 00:59:44 +0000
+++ lib/lp/app/utilities/__init__.py 2012-09-19 14:18:33 +0000
@@ -0,0 +1,30 @@
+# Copyright 2012 Canonical Ltd. This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+
+__all__ = [
+ 'json_dump_information_types',
+ ]
+
+
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ )
+
+
+def json_dump_information_types(cache, information_types):
+ """Dump a dict of the data in the types requested."""
+ dump = {}
+ order = list(InformationType.sort_order)
+ for term in information_types:
+ dump[term.name] = {
+ 'value': term.name,
+ 'description': term.description,
+ 'name': term.title,
+ 'order': order.index(term.name),
+ 'is_private': (term in PRIVATE_INFORMATION_TYPES),
+ 'description_css_class': 'choice-description',
+ }
+
+ cache.objects['information_type_data'] = dump
=== modified file 'lib/lp/blueprints/browser/specification.py'
--- lib/lp/blueprints/browser/specification.py 2012-09-13 20:40:34 +0000
+++ lib/lp/blueprints/browser/specification.py 2012-09-19 14:18:33 +0000
@@ -101,6 +101,9 @@
DateTimeFormatterAPI,
format_link,
)
+from lp.app.enums import (
+ PUBLIC_PROPRIETARY_INFORMATION_TYPES,
+ )
from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription
from lp.blueprints.browser.specificationtarget import HasSpecificationsView
from lp.blueprints.enums import (
@@ -116,9 +119,6 @@
from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch
from lp.blueprints.interfaces.sprintspecification import ISprintSpecification
from lp.code.interfaces.branchnamespace import IBranchNamespaceSet
-from lp.registry.enums import (
- PUBLIC_PROPRIETARY_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.product import IProduct
from lp.registry.vocabularies import InformationTypeVocabulary
=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py 2012-09-16 12:52:04 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py 2012-09-19 14:18:33 +0000
@@ -23,6 +23,7 @@
from zope.security.proxy import removeSecurityProxy
from lp.app.browser.tales import format_link
+from lp.app.enums import InformationType
from lp.app.interfaces.services import IService
from lp.blueprints.browser import specification
from lp.blueprints.browser.specification import INFORMATION_TYPE_FLAG
@@ -31,10 +32,7 @@
ISpecification,
ISpecificationSet,
)
-from lp.registry.enums import (
- InformationType,
- SpecificationSharingPolicy,
- )
+from lp.registry.enums import SpecificationSharingPolicy
from lp.registry.interfaces.person import PersonVisibility
from lp.services.features.testing import FeatureFixture
from lp.services.webapp.interfaces import BrowserNotificationLevel
=== modified file 'lib/lp/blueprints/interfaces/specification.py'
--- lib/lp/blueprints/interfaces/specification.py 2012-09-11 19:14:41 +0000
+++ lib/lp/blueprints/interfaces/specification.py 2012-09-19 14:18:33 +0000
@@ -48,6 +48,7 @@
)
from lp import _
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import IPrivacy
from lp.app.validators import LaunchpadValidationError
from lp.app.validators.url import valid_webref
@@ -72,7 +73,6 @@
from lp.blueprints.interfaces.sprint import ISprint
from lp.bugs.interfaces.buglink import IBugLinkTarget
from lp.code.interfaces.branchlink import IHasLinkedBranches
-from lp.registry.enums import InformationType
from lp.registry.interfaces.milestone import IMilestone
from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.projectgroup import IProjectGroup
=== modified file 'lib/lp/blueprints/model/specification.py'
--- lib/lp/blueprints/model/specification.py 2012-09-16 12:49:11 +0000
+++ lib/lp/blueprints/model/specification.py 2012-09-19 14:18:33 +0000
@@ -43,7 +43,13 @@
from zope.event import notify
from zope.interface import implements
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.errors import UserCannotUnsubscribePerson
+from lp.app.interfaces.informationtype import IInformationType
from lp.blueprints.adapters import SpecificationDelta
from lp.blueprints.enums import (
NewSpecificationDefinitionStatus,
@@ -75,16 +81,10 @@
from lp.bugs.interfaces.bugtaskfilter import filter_bugtasks_by_context
from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams
from lp.bugs.model.buglinktarget import BugLinkTargetMixin
-from lp.registry.enums import (
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- SpecificationSharingPolicy,
- )
+from lp.registry.enums import SpecificationSharingPolicy
from lp.registry.errors import CannotChangeInformationType
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distroseries import IDistroSeries
-from lp.registry.interfaces.informationtype import IInformationType
from lp.registry.interfaces.person import validate_public_person
from lp.registry.interfaces.product import IProduct
from lp.registry.interfaces.productseries import IProductSeries
=== modified file 'lib/lp/blueprints/model/tests/test_specification.py'
--- lib/lp/blueprints/model/tests/test_specification.py 2012-09-14 17:47:45 +0000
+++ lib/lp/blueprints/model/tests/test_specification.py 2012-09-19 14:18:33 +0000
@@ -18,16 +18,14 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.validators import LaunchpadValidationError
from lp.blueprints.interfaces.specification import ISpecification
from lp.blueprints.interfaces.specificationworkitem import (
SpecificationWorkItemStatus,
)
from lp.blueprints.model.specificationworkitem import SpecificationWorkItem
-from lp.registry.enums import (
- InformationType,
- SpecificationSharingPolicy,
- )
+from lp.registry.enums import SpecificationSharingPolicy
from lp.registry.errors import CannotChangeInformationType
from lp.registry.model.milestone import Milestone
from lp.services.mail import stub
=== modified file 'lib/lp/blueprints/tests/test_specification.py'
--- lib/lp/blueprints/tests/test_specification.py 2012-09-11 14:06:21 +0000
+++ lib/lp/blueprints/tests/test_specification.py 2012-09-19 14:18:33 +0000
@@ -17,6 +17,11 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.interfaces.security import IAuthorization
from lp.app.interfaces.services import IService
from lp.blueprints.enums import (
@@ -26,12 +31,7 @@
)
from lp.blueprints.errors import TargetAlreadyHasSpecification
from lp.blueprints.interfaces.specification import ISpecificationSet
-from lp.registry.enums import (
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- SharingPermission,
- )
+from lp.registry.enums import SharingPermission
from lp.security import (
AdminSpecification,
EditSpecificationByRelatedPeople,
=== modified file 'lib/lp/bugs/adapters/bug.py'
--- lib/lp/bugs/adapters/bug.py 2012-07-17 06:34:59 +0000
+++ lib/lp/bugs/adapters/bug.py 2012-09-19 14:18:33 +0000
@@ -13,7 +13,7 @@
from lazr.restful.interfaces import IEntry
from zope.component import getMultiAdapter
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
def bugcomment_to_entry(comment, version):
=== modified file 'lib/lp/bugs/browser/bug.py'
--- lib/lp/bugs/browser/bug.py 2012-09-12 02:22:43 +0000
+++ lib/lp/bugs/browser/bug.py 2012-09-19 14:18:33 +0000
@@ -71,6 +71,7 @@
LaunchpadEditFormView,
LaunchpadFormView,
)
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.app.errors import NotFoundError
from lp.app.interfaces.services import IService
from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription
@@ -103,7 +104,6 @@
from lp.bugs.model.structuralsubscription import (
get_structural_subscriptions_for_bug,
)
-from lp.registry.enums import PRIVATE_INFORMATION_TYPES
from lp.registry.interfaces.person import IPersonSet
from lp.registry.vocabularies import InformationTypeVocabulary
from lp.services.fields import DuplicateBug
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2012-09-14 00:59:44 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2012-09-19 14:18:33 +0000
@@ -60,7 +60,13 @@
)
from lp.app.browser.lazrjs import vocabulary_to_choice_edit_items
from lp.app.browser.stringformatter import FormattersAPI
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ SECURITY_INFORMATION_TYPES,
+ ServiceUsage,
+ )
from lp.app.errors import (
NotFoundError,
UnexpectedFormData,
@@ -69,6 +75,7 @@
ILaunchpadCelebrities,
ILaunchpadUsage,
)
+from lp.app.utilities import json_dump_information_types
from lp.app.validators.name import valid_name_pattern
from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription
from lp.app.widgets.product import (
@@ -115,13 +122,6 @@
ProductConfigureBase,
ProductPrivateBugsMixin,
)
-from lp.registry.enums import (
- json_dump_information_types,
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- SECURITY_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distributionsourcepackage import (
IDistributionSourcePackage,
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2012-08-30 12:22:35 +0000
+++ lib/lp/bugs/browser/bugtask.py 2012-09-19 14:18:33 +0000
@@ -137,7 +137,11 @@
PersonFormatterAPI,
)
from lp.app.browser.vocabulary import vocabulary_filters
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ PROPRIETARY_INFORMATION_TYPES,
+ ServiceUsage,
+ )
from lp.app.errors import (
NotFoundError,
UnexpectedFormData,
@@ -222,10 +226,6 @@
from lp.bugs.model.bugtasksearch import orderby_expression
from lp.code.interfaces.branchcollection import IAllBranches
from lp.layers import FeedsLayer
-from lp.registry.enums import (
- InformationType,
- PROPRIETARY_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import (
IDistribution,
IDistributionSet,
=== modified file 'lib/lp/bugs/browser/structuralsubscription.py'
--- lib/lp/bugs/browser/structuralsubscription.py 2012-09-07 20:25:51 +0000
+++ lib/lp/bugs/browser/structuralsubscription.py 2012-09-19 14:18:33 +0000
@@ -40,7 +40,10 @@
custom_widget,
LaunchpadFormView,
)
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ ServiceUsage,
+ )
from lp.app.widgets.itemswidgets import LabeledMultiCheckBoxWidget
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
@@ -52,7 +55,6 @@
IStructuralSubscriptionTarget,
IStructuralSubscriptionTargetHelper,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distributionsourcepackage import (
IDistributionSourcePackage,
=== modified file 'lib/lp/bugs/browser/tests/bugtask-search-views.txt'
--- lib/lp/bugs/browser/tests/bugtask-search-views.txt 2012-07-10 09:51:13 +0000
+++ lib/lp/bugs/browser/tests/bugtask-search-views.txt 2012-09-19 14:18:33 +0000
@@ -358,7 +358,7 @@
First we'll change the information type of one of the bugtasks (we are still
logged in from earlier):
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> previous_information_type = open_bugtasks[0].bug.information_type
>>> open_bugtasks[0].bug.transitionToInformationType(
... InformationType.USERDATA, getUtility(ILaunchBag).user)
=== modified file 'lib/lp/bugs/browser/tests/test_bug_views.py'
--- lib/lp/bugs/browser/tests/test_bug_views.py 2012-09-10 06:45:22 +0000
+++ lib/lp/bugs/browser/tests/test_bug_views.py 2012-09-19 14:18:33 +0000
@@ -27,15 +27,13 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.adapters.bugchange import BugAttachmentChange
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
from lp.registry.interfaces.accesspolicy import (
IAccessPolicyGrantSource,
IAccessPolicySource,
)
+from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.person import PersonVisibility
from lp.services.webapp.interfaces import IOpenLaunchBag
from lp.services.webapp.publisher import canonical_url
=== modified file 'lib/lp/bugs/browser/tests/test_bugcomment.py'
--- lib/lp/bugs/browser/tests/test_bugcomment.py 2012-07-24 20:10:02 +0000
+++ lib/lp/bugs/browser/tests/test_bugcomment.py 2012-09-19 14:18:33 +0000
@@ -19,6 +19,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.browser.bugcomment import (
BugComment,
group_comments_with_activity,
@@ -28,7 +29,6 @@
TestHideMessageControlMixin,
TestMessageVisibilityMixin,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.services.webapp.publisher import canonical_url
from lp.services.webapp.testing import verifyObject
=== modified file 'lib/lp/bugs/browser/tests/test_bugs.py'
--- lib/lp/bugs/browser/tests/test_bugs.py 2012-08-30 23:50:35 +0000
+++ lib/lp/bugs/browser/tests/test_bugs.py 2012-09-19 14:18:33 +0000
@@ -9,13 +9,11 @@
from zope.component import getUtility
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import BugTaskStatus
from lp.bugs.interfaces.malone import IMaloneApplication
from lp.bugs.publisher import BugsLayer
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.product import License
from lp.services.webapp.publisher import canonical_url
from lp.testing import (
=== modified file 'lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py 2012-08-07 05:31:42 +0000
+++ lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py 2012-09-19 14:18:33 +0000
@@ -14,6 +14,7 @@
from testtools.matchers import StartsWith
import transaction
+from lp.app.enums import InformationType
from lp.bugs.browser.structuralsubscription import (
StructuralSubscriptionNavigation,
)
@@ -22,7 +23,6 @@
BugTaskImportance,
BugTaskStatus,
)
-from lp.registry.enums import InformationType
from lp.services.webapp.publisher import canonical_url
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
=== modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py'
--- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-09-13 16:36:54 +0000
+++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-09-19 14:18:33 +0000
@@ -14,6 +14,10 @@
)
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import (
+ InformationType,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.bugs.browser.bugtarget import FileBugViewBase
from lp.bugs.interfaces.bug import (
IBugAddForm,
@@ -24,12 +28,7 @@
BugTaskStatus,
)
from lp.bugs.publisher import BugsLayer
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.projectgroup import IProjectGroup
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
=== modified file 'lib/lp/bugs/browser/tests/test_bugtask.py'
--- lib/lp/bugs/browser/tests/test_bugtask.py 2012-08-30 06:18:38 +0000
+++ lib/lp/bugs/browser/tests/test_bugtask.py 2012-09-19 14:18:33 +0000
@@ -32,6 +32,7 @@
from zope.interface import providedBy
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.adapters.bugchange import BugTaskStatusChange
from lp.bugs.browser.bugtask import (
@@ -58,10 +59,7 @@
FeedsLayer,
setFirstLayer,
)
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.person import PersonVisibility
from lp.services.config import config
from lp.services.database.constants import UTC_NOW
=== modified file 'lib/lp/bugs/browser/tests/test_bugview.py'
--- lib/lp/bugs/browser/tests/test_bugview.py 2012-09-13 14:46:33 +0000
+++ lib/lp/bugs/browser/tests/test_bugview.py 2012-09-19 14:18:33 +0000
@@ -6,11 +6,11 @@
from lazr.restful.interfaces import IJSONRequestCache
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.browser.bug import (
BugInformationTypePortletView,
BugView,
)
-from lp.registry.enums import InformationType
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
login,
=== modified file 'lib/lp/bugs/doc/bug-private-by-default.txt'
--- lib/lp/bugs/doc/bug-private-by-default.txt 2012-09-07 20:15:30 +0000
+++ lib/lp/bugs/doc/bug-private-by-default.txt 2012-09-19 14:18:33 +0000
@@ -5,7 +5,7 @@
(this is enforced by a DB constraint).
>>> from lp.bugs.interfaces.bug import CreateBugParams
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.product import IProductSet
>>> from lp.testing.dbuser import switch_dbuser
=== modified file 'lib/lp/bugs/doc/bug.txt'
--- lib/lp/bugs/doc/bug.txt 2012-08-30 06:18:38 +0000
+++ lib/lp/bugs/doc/bug.txt 2012-09-19 14:18:33 +0000
@@ -90,7 +90,7 @@
The event can be seen when we file a bug.
>>> from lp.bugs.interfaces.bug import CreateBugParams
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> steve_harris = factory.makePerson(name='steve-harris')
>>> jukebox = factory.makeProduct()
=== modified file 'lib/lp/bugs/doc/bugattachments.txt'
--- lib/lp/bugs/doc/bugattachments.txt 2012-08-07 02:31:56 +0000
+++ lib/lp/bugs/doc/bugattachments.txt 2012-09-19 14:18:33 +0000
@@ -613,7 +613,7 @@
If an attachment is added to a private bug, the "restricted" flag of
its Librarian file is set.
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> private_bug_owner = factory.makePerson()
>>> ignored = login_person(private_bug_owner)
>>> private_bug = factory.makeBug(
=== modified file 'lib/lp/bugs/doc/bugnotification-email.txt'
--- lib/lp/bugs/doc/bugnotification-email.txt 2012-07-17 06:34:59 +0000
+++ lib/lp/bugs/doc/bugnotification-email.txt 2012-09-19 14:18:33 +0000
@@ -36,7 +36,7 @@
... IBugDelta,
... IBugSet,
... )
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> from lp.registry.interfaces.person import IPersonSet
=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
--- lib/lp/bugs/doc/bugnotification-sending.txt 2012-08-23 04:20:48 +0000
+++ lib/lp/bugs/doc/bugnotification-sending.txt 2012-09-19 14:18:33 +0000
@@ -336,7 +336,7 @@
We will need a fresh new bug.
>>> from lp.bugs.interfaces.bug import CreateBugParams
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu')
>>> description = getUtility(IMessageSet).fromText(
=== modified file 'lib/lp/bugs/doc/bugsubscription.txt'
--- lib/lp/bugs/doc/bugsubscription.txt 2012-09-07 20:26:36 +0000
+++ lib/lp/bugs/doc/bugsubscription.txt 2012-09-19 14:18:33 +0000
@@ -48,7 +48,7 @@
>>> from lp.services.webapp.interfaces import ILaunchBag
>>> from lp.bugs.interfaces.bug import CreateBugParams
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> from lp.registry.interfaces.distribution import IDistributionSet
>>> from lp.registry.interfaces.person import IPersonSet
>>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu")
=== modified file 'lib/lp/bugs/doc/bugsummary.txt'
--- lib/lp/bugs/doc/bugsummary.txt 2012-08-13 19:34:10 +0000
+++ lib/lp/bugs/doc/bugsummary.txt 2012-09-19 14:18:33 +0000
@@ -442,7 +442,7 @@
distribution task. Subscribed to by team_c.
- bug_z is public.
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> distro_p = factory.makeDistribution(name='di-p')
>>> series_p = factory.makeDistroSeries(
... distribution=distro_p, name='ds-p')
=== modified file 'lib/lp/bugs/interfaces/bug.py'
--- lib/lp/bugs/interfaces/bug.py 2012-09-07 20:25:51 +0000
+++ lib/lp/bugs/interfaces/bug.py 2012-09-19 14:18:33 +0000
@@ -66,6 +66,7 @@
from zope.schema.vocabulary import SimpleVocabulary
from lp import _
+from lp.app.enums import InformationType
from lp.app.errors import NotFoundError
from lp.app.interfaces.launchpad import IPrivacy
from lp.app.validators.attachment import attachment_size_constraint
@@ -81,7 +82,6 @@
from lp.bugs.interfaces.bugwatch import IBugWatch
from lp.bugs.interfaces.cve import ICve
from lp.code.interfaces.branchlink import IHasLinkedBranches
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import IPerson
from lp.services.fields import (
BugField,
=== modified file 'lib/lp/bugs/interfaces/bugsubscriptionfilter.py'
--- lib/lp/bugs/interfaces/bugsubscriptionfilter.py 2012-08-02 04:46:31 +0000
+++ lib/lp/bugs/interfaces/bugsubscriptionfilter.py 2012-09-19 14:18:33 +0000
@@ -31,13 +31,13 @@
)
from lp import _
+from lp.app.enums import InformationType
from lp.bugs.enums import BugNotificationLevel
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
BugTaskStatus,
)
from lp.bugs.interfaces.structuralsubscription import IStructuralSubscription
-from lp.registry.enums import InformationType
from lp.services.fields import (
PersonChoice,
SearchTag,
=== modified file 'lib/lp/bugs/interfaces/bugtarget.py'
--- lib/lp/bugs/interfaces/bugtarget.py 2012-08-31 02:24:18 +0000
+++ lib/lp/bugs/interfaces/bugtarget.py 2012-09-19 14:18:33 +0000
@@ -54,6 +54,11 @@
)
from lp import _
+from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ InformationType,
+ NON_EMBARGOED_INFORMATION_TYPES,
+ )
from lp.bugs.interfaces.bugtask import IBugTask
from lp.bugs.interfaces.bugtasksearch import (
BugBlueprintSearch,
@@ -61,12 +66,7 @@
BugTagsSearchCombinator,
IBugTaskSearch,
)
-from lp.registry.enums import (
- BugSharingPolicy,
- FREE_INFORMATION_TYPES,
- InformationType,
- NON_EMBARGOED_INFORMATION_TYPES,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.services.fields import Tag
=== modified file 'lib/lp/bugs/interfaces/bugtasksearch.py'
--- lib/lp/bugs/interfaces/bugtasksearch.py 2012-08-07 03:47:15 +0000
+++ lib/lp/bugs/interfaces/bugtasksearch.py 2012-09-19 14:18:33 +0000
@@ -41,13 +41,13 @@
from zope.security.proxy import isinstance as zope_isinstance
from lp import _
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import (
BugTaskStatusSearch,
BugTaskStatusSearchDisplay,
IBugTask,
UNRESOLVED_BUGTASK_STATUSES,
)
-from lp.registry.enums import InformationType
from lp.services.fields import SearchTag
from lp.services.searchbuilder import (
all,
=== modified file 'lib/lp/bugs/mail/bugnotificationbuilder.py'
--- lib/lp/bugs/mail/bugnotificationbuilder.py 2012-04-27 02:26:36 +0000
+++ lib/lp/bugs/mail/bugnotificationbuilder.py 2012-09-19 14:18:33 +0000
@@ -17,11 +17,11 @@
from zope.component import getUtility
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities
-from lp.registry.enums import (
+from lp.app.enums import (
PRIVATE_INFORMATION_TYPES,
SECURITY_INFORMATION_TYPES,
)
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.services.config import config
from lp.services.helpers import shortlist
from lp.services.identity.interfaces.emailaddress import IEmailAddressSet
=== modified file 'lib/lp/bugs/mail/commands.py'
--- lib/lp/bugs/mail/commands.py 2012-09-07 21:49:00 +0000
+++ lib/lp/bugs/mail/commands.py 2012-09-19 14:18:33 +0000
@@ -28,6 +28,10 @@
ValidationError,
)
+from lp.app.enums import (
+ InformationType,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.errors import (
NotFoundError,
UserCannotUnsubscribePerson,
@@ -47,10 +51,6 @@
IllegalTarget,
)
from lp.bugs.interfaces.cve import ICveSet
-from lp.registry.enums import (
- InformationType,
- PUBLIC_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distributionsourcepackage import (
IDistributionSourcePackage,
=== modified file 'lib/lp/bugs/mail/tests/test_commands.py'
--- lib/lp/bugs/mail/tests/test_commands.py 2012-08-30 05:48:03 +0000
+++ lib/lp/bugs/mail/tests/test_commands.py 2012-09-19 14:18:33 +0000
@@ -6,6 +6,7 @@
IObjectModifiedEvent,
)
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bug import CreateBugParams
from lp.bugs.mail.commands import (
AffectsEmailCommand,
@@ -20,10 +21,7 @@
TagEmailCommand,
UnsubscribeEmailCommand,
)
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.services.mail.interfaces import (
BugTargetNotFound,
EmailProcessingError,
=== modified file 'lib/lp/bugs/mail/tests/test_handler.py'
--- lib/lp/bugs/mail/tests/test_handler.py 2012-08-22 14:23:12 +0000
+++ lib/lp/bugs/mail/tests/test_handler.py 2012-09-19 14:18:33 +0000
@@ -16,6 +16,7 @@
)
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bug import IBugSet
from lp.bugs.mail.commands import (
BugEmailCommand,
@@ -28,10 +29,7 @@
MaloneHandler,
)
from lp.bugs.model.bugnotification import BugNotification
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.services.config import config
from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
from lp.services.mail import stub
=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py 2012-09-18 21:56:29 +0000
+++ lib/lp/bugs/model/bug.py 2012-09-19 14:18:33 +0000
@@ -78,8 +78,14 @@
removeSecurityProxy,
)
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PROPRIETARY_INFORMATION_TYPES,
+ SECURITY_INFORMATION_TYPES,
+ ServiceUsage,
+ )
from lp.answers.interfaces.questiontarget import IQuestionTarget
-from lp.app.enums import ServiceUsage
from lp.app.errors import (
NotFoundError,
SubscriptionPrivacyViolation,
@@ -154,12 +160,6 @@
)
from lp.code.interfaces.branchcollection import IAllBranches
from lp.hardwaredb.interfaces.hwdb import IHWSubmissionBugSet
-from lp.registry.enums import (
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PROPRIETARY_INFORMATION_TYPES,
- SECURITY_INFORMATION_TYPES,
- )
from lp.registry.errors import CannotChangeInformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactGrantSource,
=== modified file 'lib/lp/bugs/model/bugsubscriptionfilter.py'
--- lib/lp/bugs/model/bugsubscriptionfilter.py 2012-09-19 05:10:03 +0000
+++ lib/lp/bugs/model/bugsubscriptionfilter.py 2012-09-19 14:18:33 +0000
@@ -27,6 +27,7 @@
)
from zope.interface import implements
+from lp.app.enums import InformationType
from lp.bugs.enums import BugNotificationLevel
from lp.bugs.interfaces.bugsubscriptionfilter import (
IBugSubscriptionFilter,
@@ -36,7 +37,6 @@
BugTaskImportance,
BugTaskStatus,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import validate_person
from lp.services import searchbuilder
from lp.services.database.constants import UTC_NOW
=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py 2012-09-11 23:40:12 +0000
+++ lib/lp/bugs/model/bugtask.py 2012-09-19 14:18:33 +0000
@@ -67,7 +67,10 @@
)
from zope.security.proxy import removeSecurityProxy
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ PROPRIETARY_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.errors import NotFoundError
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.interfaces.bug import IBugSet
@@ -93,10 +96,6 @@
UserCannotEditBugTaskStatus,
)
from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams
-from lp.registry.enums import (
- PROPRIETARY_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import (
IDistribution,
IDistributionSet,
=== modified file 'lib/lp/bugs/model/bugtaskflat.py'
--- lib/lp/bugs/model/bugtaskflat.py 2012-07-24 07:24:58 +0000
+++ lib/lp/bugs/model/bugtaskflat.py 2012-09-19 14:18:33 +0000
@@ -12,12 +12,12 @@
Storm,
)
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
BugTaskStatus,
BugTaskStatusSearch,
)
-from lp.registry.enums import InformationType
from lp.services.database.enumcol import EnumCol
=== modified file 'lib/lp/bugs/model/bugtasksearch.py'
--- lib/lp/bugs/model/bugtasksearch.py 2012-09-17 07:50:51 +0000
+++ lib/lp/bugs/model/bugtasksearch.py 2012-09-19 14:18:33 +0000
@@ -38,6 +38,7 @@
removeSecurityProxy,
)
+from lp.app.enums import PUBLIC_INFORMATION_TYPES
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.blueprints.model.specification import Specification
from lp.blueprints.model.specificationbug import SpecificationBug
@@ -68,7 +69,6 @@
from lp.bugs.model.bugtask import BugTask
from lp.bugs.model.bugtaskflat import BugTaskFlat
from lp.bugs.model.structuralsubscription import StructuralSubscription
-from lp.registry.enums import PUBLIC_INFORMATION_TYPES
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.milestone import IProjectGroupMilestone
=== modified file 'lib/lp/bugs/model/tests/test_bug.py'
--- lib/lp/bugs/model/tests/test_bug.py 2012-09-18 16:07:51 +0000
+++ lib/lp/bugs/model/tests/test_bug.py 2012-09-19 14:18:33 +0000
@@ -14,6 +14,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.adapters.bugchange import BugTitleChange
from lp.bugs.enums import (
@@ -27,10 +28,7 @@
BugNotification,
BugSubscriptionInfo,
)
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.registry.errors import CannotChangeInformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactSource,
=== modified file 'lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py 2012-08-02 01:52:08 +0000
+++ lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py 2012-09-19 14:18:33 +0000
@@ -12,6 +12,7 @@
removeSecurityProxy,
)
+from lp.app.enums import InformationType
from lp.bugs.enums import BugNotificationLevel
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
@@ -24,7 +25,6 @@
BugSubscriptionFilterStatus,
BugSubscriptionFilterTag,
)
-from lp.registry.enums import InformationType
from lp.services import searchbuilder
from lp.services.database.lpstorm import IStore
from lp.testing import (
=== modified file 'lib/lp/bugs/model/tests/test_bugsummary.py'
--- lib/lp/bugs/model/tests/test_bugsummary.py 2012-08-24 05:09:51 +0000
+++ lib/lp/bugs/model/tests/test_bugsummary.py 2012-09-19 14:18:33 +0000
@@ -11,6 +11,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.services import IService
from lp.bugs.interfaces.bugsummary import IBugSummary
from lp.bugs.interfaces.bugtask import (
@@ -23,10 +24,7 @@
get_bugsummary_filter_for_user,
)
from lp.bugs.model.bugtask import BugTask
-from lp.registry.enums import (
- InformationType,
- SharingPermission,
- )
+from lp.registry.enums import SharingPermission
from lp.services.database.lpstorm import IMasterStore
from lp.testing import TestCaseWithFactory
from lp.testing.dbuser import switch_dbuser
=== modified file 'lib/lp/bugs/model/tests/test_bugtask.py'
--- lib/lp/bugs/model/tests/test_bugtask.py 2012-09-12 00:56:03 +0000
+++ lib/lp/bugs/model/tests/test_bugtask.py 2012-09-19 14:18:33 +0000
@@ -22,7 +22,10 @@
from zope.security.interfaces import Unauthorized as ZopeUnAuthorized
from zope.security.proxy import removeSecurityProxy
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ ServiceUsage,
+ )
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.blueprints.interfaces.specification import ISpecificationSet
from lp.bugs.interfaces.bug import (
@@ -57,7 +60,6 @@
from lp.bugs.tests.bug import create_old_bug
from lp.registry.enums import (
BugSharingPolicy,
- InformationType,
TeamMembershipPolicy,
)
from lp.registry.interfaces.accesspolicy import (
=== modified file 'lib/lp/bugs/model/tests/test_bugtasksearch.py'
--- lib/lp/bugs/model/tests/test_bugtasksearch.py 2012-09-18 04:30:42 +0000
+++ lib/lp/bugs/model/tests/test_bugtasksearch.py 2012-09-19 14:18:33 +0000
@@ -17,6 +17,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.app.interfaces.services import IService
from lp.bugs.errors import InvalidSearchParameters
@@ -47,10 +48,7 @@
HWBus,
IHWDeviceSet,
)
-from lp.registry.enums import (
- InformationType,
- SharingPermission,
- )
+from lp.registry.enums import SharingPermission
from lp.registry.interfaces.distribution import (
IDistribution,
IDistributionSet,
=== modified file 'lib/lp/bugs/scripts/bugsummaryrebuild.py'
--- lib/lp/bugs/scripts/bugsummaryrebuild.py 2012-07-30 01:56:54 +0000
+++ lib/lp/bugs/scripts/bugsummaryrebuild.py 2012-09-19 14:18:33 +0000
@@ -17,6 +17,10 @@
from storm.properties import Bool
import transaction
+from lp.app.enums import (
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.bugs.model.bug import BugTag
from lp.bugs.model.bugsummary import BugSummary
from lp.bugs.model.bugtask import (
@@ -25,10 +29,6 @@
BugTask,
)
from lp.bugs.model.bugtaskflat import BugTaskFlat
-from lp.registry.enums import (
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.series import ISeriesMixin
=== modified file 'lib/lp/bugs/scripts/tests/test_bugnotification.py'
--- lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-09-19 14:18:33 +0000
@@ -23,6 +23,7 @@
)
from zope.interface import implements
+from lp.app.enums import InformationType
from lp.bugs.adapters.bugchange import (
BranchLinkedToBug,
BranchUnlinkedFromBug,
@@ -63,7 +64,6 @@
notification_comment_batches,
process_deferred_notifications,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProductSet
from lp.services.config import config
=== modified file 'lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py'
--- lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,7 @@
import transaction
from zope.component import getUtility
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
BugTaskStatus,
@@ -25,7 +26,6 @@
RawBugSummary,
rebuild_bugsummary_for_target,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.services.database.lpstorm import IStore
from lp.services.log.logger import BufferLogger
=== modified file 'lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt'
--- lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2012-08-30 05:17:23 +0000
+++ lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2012-09-19 14:18:33 +0000
@@ -206,7 +206,8 @@
>>> from lp.services.webapp import canonical_url
>>> from lp.services.webapp.interfaces import ILaunchBag
>>> from lp.bugs.interfaces.bug import CreateBugParams
- >>> from lp.registry.enums import BugSharingPolicy, InformationType
+ >>> from lp.app.enums import InformationType
+ >>> from lp.registry.enums import BugSharingPolicy
>>> def current_user():
... return getUtility(ILaunchBag).user
=== modified file 'lib/lp/bugs/tests/test_bug_messages.py'
--- lib/lp/bugs/tests/test_bug_messages.py 2012-08-08 07:22:51 +0000
+++ lib/lp/bugs/tests/test_bug_messages.py 2012-09-19 14:18:33 +0000
@@ -7,7 +7,7 @@
from zope.component import getUtility
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.testing import (
login,
=== modified file 'lib/lp/bugs/tests/test_bug_messages_webservice.py'
--- lib/lp/bugs/tests/test_bug_messages_webservice.py 2012-07-24 20:10:02 +0000
+++ lib/lp/bugs/tests/test_bug_messages_webservice.py 2012-09-19 14:18:33 +0000
@@ -11,8 +11,8 @@
from zope.security.management import endInteraction
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugmessage import IBugMessageSet
-from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.registry.interfaces.person import IPersonSet
from lp.testing import (
=== modified file 'lib/lp/bugs/tests/test_bug_notification_recipients.py'
--- lib/lp/bugs/tests/test_bug_notification_recipients.py 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/tests/test_bug_notification_recipients.py 2012-09-19 14:18:33 +0000
@@ -7,7 +7,7 @@
from zope.component import getUtility
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactGrantSource,
IAccessPolicySource,
=== modified file 'lib/lp/bugs/tests/test_bugbranch.py'
--- lib/lp/bugs/tests/test_bugbranch.py 2012-05-03 01:14:29 +0000
+++ lib/lp/bugs/tests/test_bugbranch.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,7 @@
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.interfaces.bugbranch import (
IBugBranch,
@@ -17,7 +18,6 @@
BugBranch,
BugBranchSet,
)
-from lp.registry.enums import InformationType
from lp.testing import (
anonymous_logged_in,
celebrity_logged_in,
=== modified file 'lib/lp/bugs/tests/test_bugchanges.py'
--- lib/lp/bugs/tests/test_bugchanges.py 2012-08-08 11:48:29 +0000
+++ lib/lp/bugs/tests/test_bugchanges.py 2012-09-19 14:18:33 +0000
@@ -16,6 +16,7 @@
from zope.event import notify
from zope.interface import providedBy
+from lp.app.enums import InformationType
from lp.bugs.enums import BugNotificationLevel
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
@@ -24,7 +25,6 @@
from lp.bugs.interfaces.cve import ICveSet
from lp.bugs.model.bugnotification import BugNotification
from lp.bugs.scripts.bugnotification import construct_email_notifications
-from lp.registry.enums import InformationType
from lp.services.features.testing import FeatureFixture
from lp.services.librarian.browser import ProxiedLibraryFileAlias
from lp.services.webapp.interfaces import ILaunchBag
=== modified file 'lib/lp/bugs/tests/test_bugs_webservice.py'
--- lib/lp/bugs/tests/test_bugs_webservice.py 2012-09-10 01:33:52 +0000
+++ lib/lp/bugs/tests/test_bugs_webservice.py 2012-09-19 14:18:33 +0000
@@ -27,12 +27,10 @@
from zope.component import getMultiAdapter
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.browser.bugtask import get_comments_for_bugtask
from lp.bugs.interfaces.bug import IBug
-from lp.registry.enums import (
- BugSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BugSharingPolicy
from lp.registry.interfaces.product import License
from lp.services.webapp import snapshot
from lp.services.webapp.interfaces import OAuthPermission
=== modified file 'lib/lp/bugs/tests/test_bugtaskflat_triggers.py'
--- lib/lp/bugs/tests/test_bugtaskflat_triggers.py 2012-07-17 06:34:59 +0000
+++ lib/lp/bugs/tests/test_bugtaskflat_triggers.py 2012-09-19 14:18:33 +0000
@@ -10,9 +10,9 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bugtask import BugTaskStatus
from lp.bugs.model.bug import Bug
-from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactGrantSource,
IAccessArtifactSource,
=== modified file 'lib/lp/bugs/tests/test_bugvisibility.py'
--- lib/lp/bugs/tests/test_bugvisibility.py 2012-08-16 05:18:54 +0000
+++ lib/lp/bugs/tests/test_bugvisibility.py 2012-09-19 14:18:33 +0000
@@ -3,7 +3,7 @@
"""Tests for visibility of a bug."""
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.testing import (
celebrity_logged_in,
TestCaseWithFactory,
=== modified file 'lib/lp/bugs/tests/test_searchtasks_webservice.py'
--- lib/lp/bugs/tests/test_searchtasks_webservice.py 2012-09-17 08:15:11 +0000
+++ lib/lp/bugs/tests/test_searchtasks_webservice.py 2012-09-19 14:18:33 +0000
@@ -5,7 +5,7 @@
__metaclass__ = type
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.testing import (
person_logged_in,
TestCaseWithFactory,
=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
--- lib/lp/bugs/tests/test_structuralsubscription.py 2012-09-19 05:10:03 +0000
+++ lib/lp/bugs/tests/test_structuralsubscription.py 2012-09-19 14:18:33 +0000
@@ -13,6 +13,7 @@
from testtools.matchers import StartsWith
from zope.security.interfaces import Unauthorized
+from lp.app.enums import InformationType
from lp.bugs.enums import BugNotificationLevel
from lp.bugs.interfaces.bugtask import (
BugTaskImportance,
@@ -30,7 +31,6 @@
get_structural_subscriptions,
get_structural_subscriptions_for_bug,
)
-from lp.registry.enums import InformationType
from lp.services.database.decoratedresultset import DecoratedResultSet
from lp.testing import (
anonymous_logged_in,
=== modified file 'lib/lp/bugs/xmlrpc/bug.py'
--- lib/lp/bugs/xmlrpc/bug.py 2012-07-31 01:55:07 +0000
+++ lib/lp/bugs/xmlrpc/bug.py 2012-09-19 14:18:33 +0000
@@ -12,10 +12,10 @@
from zope.component import getUtility
from zope.interface import implements
+from lp.app.enums import InformationType
from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import CreateBugParams
from lp.bugs.interfaces.externalbugtracker import IExternalBugTrackerTokenAPI
-from lp.registry.enums import InformationType
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProductSet
=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py 2012-09-19 04:37:16 +0000
+++ lib/lp/code/browser/branch.py 2012-09-19 14:18:33 +0000
@@ -74,6 +74,7 @@
from zope.traversing.interfaces import IPathAdapter
from lp import _
+from lp.app.enums import InformationType
from lp.app.browser.informationtype import InformationTypePortletMixin
from lp.app.browser.launchpad import Hierarchy
from lp.app.browser.launchpadform import (
@@ -126,7 +127,6 @@
from lp.code.interfaces.branchmergeproposal import IBranchMergeProposal
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.code.interfaces.codereviewvote import ICodeReviewVoteReference
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.productseries import IProductSeries
from lp.registry.vocabularies import (
=== modified file 'lib/lp/code/browser/branchlisting.py'
--- lib/lp/code/browser/branchlisting.py 2012-07-24 06:39:54 +0000
+++ lib/lp/code/browser/branchlisting.py 2012-09-19 14:18:33 +0000
@@ -52,6 +52,7 @@
from zope.schema import Choice
from lp import _
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.app.browser.badge import (
Badge,
HasBadgeBase,
@@ -99,7 +100,6 @@
ProductDownloadFileMixin,
SortSeriesMixin,
)
-from lp.registry.enums import PRIVATE_INFORMATION_TYPES
from lp.registry.interfaces.person import (
IPerson,
IPersonSet,
=== modified file 'lib/lp/code/browser/tests/test_bazaar.py'
--- lib/lp/code/browser/tests/test_bazaar.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/browser/tests/test_bazaar.py 2012-09-19 14:18:33 +0000
@@ -7,8 +7,8 @@
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.browser.bazaar import BazaarApplicationView
-from lp.registry.enums import InformationType
from lp.services.webapp.authorization import check_permission
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
=== modified file 'lib/lp/code/browser/tests/test_branch.py'
--- lib/lp/code/browser/tests/test_branch.py 2012-09-18 00:45:58 +0000
+++ lib/lp/code/browser/tests/test_branch.py 2012-09-19 14:18:33 +0000
@@ -14,6 +14,7 @@
from zope.publisher.interfaces import NotFound
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.headings import IRootContext
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.interfaces.bugtask import (
@@ -35,10 +36,7 @@
BranchType,
BranchVisibilityRule,
)
-from lp.registry.enums import (
- BranchSharingPolicy,
- InformationType,
- )
+from lp.registry.enums import BranchSharingPolicy
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.registry.interfaces.person import PersonVisibility
from lp.services.config import config
=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposal.py'
--- lib/lp/code/browser/tests/test_branchmergeproposal.py 2012-08-14 23:27:07 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposal.py 2012-09-19 14:18:33 +0000
@@ -30,6 +30,7 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.browser.branch import RegisterBranchMergeProposalView
from lp.code.browser.branchmergeproposal import (
BranchMergeProposalAddVoteView,
@@ -54,7 +55,6 @@
make_merge_proposal_without_reviewers,
)
from lp.registry.enums import (
- InformationType,
PersonVisibility,
TeamMembershipPolicy,
)
=== modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py'
--- lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2012-09-19 14:18:33 +0000
@@ -14,6 +14,7 @@
import transaction
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.browser.branchmergeproposallisting import (
ActiveReviewsView,
BranchMergeProposalListingItem,
@@ -23,7 +24,6 @@
BranchMergeProposalStatus,
CodeReviewVote,
)
-from lp.registry.enums import InformationType
from lp.registry.model.personproduct import PersonProduct
from lp.services.database.sqlbase import flush_database_caches
from lp.services.webapp.servers import LaunchpadTestRequest
=== modified file 'lib/lp/code/browser/tests/test_branchmergequeuelisting.py'
--- lib/lp/code/browser/tests/test_branchmergequeuelisting.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/browser/tests/test_branchmergequeuelisting.py 2012-09-19 14:18:33 +0000
@@ -11,7 +11,7 @@
import soupmatchers
from zope.security.proxy import removeSecurityProxy
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.services.features.model import (
FeatureFlag,
getFeatureStore,
=== modified file 'lib/lp/code/browser/tests/test_branchsubscription.py'
--- lib/lp/code/browser/tests/test_branchsubscription.py 2012-06-21 01:40:52 +0000
+++ lib/lp/code/browser/tests/test_branchsubscription.py 2012-09-19 14:18:33 +0000
@@ -5,7 +5,7 @@
__metaclass__ = type
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.services.webapp.interfaces import IPrimaryContext
from lp.testing import (
person_logged_in,
=== modified file 'lib/lp/code/browser/tests/test_product.py'
--- lib/lp/code/browser/tests/test_product.py 2012-08-29 03:19:38 +0000
+++ lib/lp/code/browser/tests/test_product.py 2012-09-19 14:18:33 +0000
@@ -14,14 +14,16 @@
import pytz
from zope.component import getUtility
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ ServiceUsage,
+ )
from lp.code.enums import (
BranchType,
BranchVisibilityRule,
)
from lp.code.interfaces.revision import IRevisionSet
from lp.code.publisher import CodeLayer
-from lp.registry.enums import InformationType
from lp.services.webapp import canonical_url
from lp.testing import (
ANONYMOUS,
=== modified file 'lib/lp/code/browser/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2012-08-16 02:45:38 +0000
+++ lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2012-09-19 14:18:33 +0000
@@ -21,6 +21,7 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.buildmaster.enums import BuildStatus
from lp.code.browser.sourcepackagerecipe import (
@@ -34,7 +35,6 @@
)
from lp.code.interfaces.sourcepackagerecipe import MINIMAL_RECIPE_TEXT
from lp.code.tests.helpers import recipe_parser_newest_version
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.series import SeriesStatus
=== modified file 'lib/lp/code/interfaces/branch.py'
--- lib/lp/code/interfaces/branch.py 2012-09-14 01:21:13 +0000
+++ lib/lp/code/interfaces/branch.py 2012-09-19 14:18:33 +0000
@@ -69,6 +69,7 @@
TextLine,
)
+from lp.app.enums import InformationType
from lp import _
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.app.validators import LaunchpadValidationError
@@ -91,7 +92,6 @@
from lp.code.interfaces.hasbranches import IHasMergeProposals
from lp.code.interfaces.hasrecipes import IHasRecipes
from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.role import IHasOwner
=== modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py'
--- lib/lp/code/mail/tests/test_branchmergeproposal.py 2012-09-18 04:51:46 +0000
+++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2012-09-19 14:18:33 +0000
@@ -13,6 +13,7 @@
from zope.interface import providedBy
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import (
BranchMergeProposalStatus,
BranchSubscriptionNotificationLevel,
@@ -30,7 +31,6 @@
from lp.code.model.codereviewvote import CodeReviewVoteReference
from lp.code.model.diff import PreviewDiff
from lp.code.subscribers.branchmergeproposal import merge_proposal_modified
-from lp.registry.enums import InformationType
from lp.services.database.lpstorm import IStore
from lp.services.webapp import canonical_url
from lp.testing import (
=== modified file 'lib/lp/code/model/branch.py'
--- lib/lp/code/model/branch.py 2012-09-19 04:39:40 +0000
+++ lib/lp/code/model/branch.py 2012-09-19 14:18:33 +0000
@@ -53,6 +53,11 @@
)
from lp import _
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.errors import (
SubscriptionPrivacyViolation,
UserCannotUnsubscribePerson,
@@ -132,12 +137,7 @@
)
from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch
from lp.codehosting.safe_open import safe_open
-from lp.registry.enums import (
- InformationType,
- PersonVisibility,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
+from lp.registry.enums import PersonVisibility
from lp.registry.errors import CannotChangeInformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactGrantSource,
=== modified file 'lib/lp/code/model/branchcollection.py'
--- lib/lp/code/model/branchcollection.py 2012-08-07 02:31:56 +0000
+++ lib/lp/code/model/branchcollection.py 2012-09-19 14:18:33 +0000
@@ -31,6 +31,10 @@
from zope.component import getUtility
from zope.interface import implements
+from lp.app.enums import (
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.bugs.interfaces.bugtask import IBugTaskSet
from lp.bugs.interfaces.bugtaskfilter import filter_bugtasks_by_context
from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams
@@ -59,10 +63,6 @@
from lp.code.model.codereviewvote import CodeReviewVoteReference
from lp.code.model.revision import Revision
from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch
-from lp.registry.enums import (
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
from lp.registry.model.distribution import Distribution
from lp.registry.model.distroseries import DistroSeries
from lp.registry.model.person import (
=== modified file 'lib/lp/code/model/branchmergeproposal.py'
--- lib/lp/code/model/branchmergeproposal.py 2012-08-31 20:06:10 +0000
+++ lib/lp/code/model/branchmergeproposal.py 2012-09-19 14:18:33 +0000
@@ -38,6 +38,7 @@
from zope.event import notify
from zope.interface import implements
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.code.enums import (
BranchMergeProposalStatus,
BranchSubscriptionDiffSize,
@@ -76,7 +77,6 @@
IncrementalDiff,
PreviewDiff,
)
-from lp.registry.enums import PRIVATE_INFORMATION_TYPES
from lp.registry.interfaces.person import (
IPerson,
IPersonSet,
=== modified file 'lib/lp/code/model/branchnamespace.py'
--- lib/lp/code/model/branchnamespace.py 2012-09-06 00:01:38 +0000
+++ lib/lp/code/model/branchnamespace.py 2012-09-19 14:18:33 +0000
@@ -20,6 +20,13 @@
from zope.interface import implements
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ FREE_PRIVATE_INFORMATION_TYPES,
+ InformationType,
+ NON_EMBARGOED_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.interfaces.services import IService
from lp.code.enums import (
BranchLifecycleStatus,
@@ -48,12 +55,7 @@
from lp.code.model.branch import Branch
from lp.registry.enums import (
BranchSharingPolicy,
- FREE_INFORMATION_TYPES,
- FREE_PRIVATE_INFORMATION_TYPES,
- InformationType,
- NON_EMBARGOED_INFORMATION_TYPES,
PersonVisibility,
- PUBLIC_INFORMATION_TYPES,
)
from lp.registry.errors import (
NoSuchDistroSeries,
=== modified file 'lib/lp/code/model/revision.py'
--- lib/lp/code/model/revision.py 2012-06-07 04:52:02 +0000
+++ lib/lp/code/model/revision.py 2012-09-19 14:18:33 +0000
@@ -48,6 +48,7 @@
from zope.interface import implements
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import PUBLIC_INFORMATION_TYPES
from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING
from lp.code.interfaces.revision import (
IRevision,
@@ -56,7 +57,6 @@
IRevisionProperty,
IRevisionSet,
)
-from lp.registry.enums import PUBLIC_INFORMATION_TYPES
from lp.registry.interfaces.person import validate_public_person
from lp.registry.interfaces.product import IProduct
from lp.registry.interfaces.projectgroup import IProjectGroup
=== modified file 'lib/lp/code/model/tests/test_branch.py'
--- lib/lp/code/model/tests/test_branch.py 2012-09-19 04:39:40 +0000
+++ lib/lp/code/model/tests/test_branch.py 2012-09-19 14:18:33 +0000
@@ -30,6 +30,11 @@
from zope.security.proxy import removeSecurityProxy
from lp import _
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.blueprints.enums import NewSpecificationDefinitionStatus
from lp.blueprints.interfaces.specification import ISpecificationSet
@@ -114,10 +119,7 @@
from lp.codehosting.vfs.branchfs import get_real_branch_path
from lp.registry.enums import (
BranchSharingPolicy,
- InformationType,
PersonVisibility,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
TeamMembershipPolicy,
)
from lp.registry.errors import CannotChangeInformationType
=== modified file 'lib/lp/code/model/tests/test_branchcollection.py'
--- lib/lp/code/model/tests/test_branchcollection.py 2012-09-06 00:01:38 +0000
+++ lib/lp/code/model/tests/test_branchcollection.py 2012-09-19 14:18:33 +0000
@@ -13,6 +13,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.app.interfaces.services import IService
from lp.code.enums import (
@@ -32,10 +33,7 @@
from lp.code.model.branch import Branch
from lp.code.model.branchcollection import GenericBranchCollection
from lp.code.tests.helpers import remove_all_sample_data_branches
-from lp.registry.enums import (
- InformationType,
- PersonVisibility,
- )
+from lp.registry.enums import PersonVisibility
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.webapp.interfaces import (
=== modified file 'lib/lp/code/model/tests/test_branchjob.py'
--- lib/lp/code/model/tests/test_branchjob.py 2012-08-27 08:11:27 +0000
+++ lib/lp/code/model/tests/test_branchjob.py 2012-09-19 14:18:33 +0000
@@ -28,6 +28,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.bzr import (
branch_revision_history,
BranchFormat,
@@ -65,7 +66,6 @@
from lp.code.model.revision import RevisionSet
from lp.code.model.tests.test_branch import create_knit
from lp.codehosting.vfs import branch_id_to_path
-from lp.registry.enums import InformationType
from lp.scripts.helpers import TransactionFreeOperation
from lp.services.config import config
from lp.services.database.constants import UTC_NOW
=== modified file 'lib/lp/code/model/tests/test_branchlookup.py'
--- lib/lp/code/model/tests/test_branchlookup.py 2012-07-18 15:39:35 +0000
+++ lib/lp/code/model/tests/test_branchlookup.py 2012-09-19 14:18:33 +0000
@@ -9,6 +9,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.errors import (
CannotHaveLinkedBranch,
InvalidNamespace,
@@ -27,7 +28,6 @@
compose_public_url,
)
from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
-from lp.registry.enums import InformationType
from lp.registry.errors import (
NoSuchDistroSeries,
NoSuchSourcePackageName,
=== modified file 'lib/lp/code/model/tests/test_branchmergeproposal.py'
--- lib/lp/code/model/tests/test_branchmergeproposal.py 2012-08-31 20:05:51 +0000
+++ lib/lp/code/model/tests/test_branchmergeproposal.py 2012-09-19 14:18:33 +0000
@@ -23,6 +23,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import IPrivacy
from lp.code.enums import (
BranchMergeProposalStatus,
@@ -62,10 +63,7 @@
add_revision_to_branch,
make_merge_proposal_without_reviewers,
)
-from lp.registry.enums import (
- InformationType,
- TeamMembershipPolicy,
- )
+from lp.registry.enums import TeamMembershipPolicy
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProductSet
from lp.services.database.constants import UTC_NOW
=== modified file 'lib/lp/code/model/tests/test_branchmergequeuecollection.py'
--- lib/lp/code/model/tests/test_branchmergequeuecollection.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/model/tests/test_branchmergequeuecollection.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.code.interfaces.branchmergequeuecollection import (
IAllBranchMergeQueues,
@@ -18,7 +19,6 @@
from lp.code.model.branchmergequeuecollection import (
GenericBranchMergeQueueCollection,
)
-from lp.registry.enums import InformationType
from lp.services.database.lpstorm import IMasterStore
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
=== modified file 'lib/lp/code/model/tests/test_branchnamespace.py'
--- lib/lp/code/model/tests/test_branchnamespace.py 2012-09-06 00:01:38 +0000
+++ lib/lp/code/model/tests/test_branchnamespace.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,13 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ FREE_PRIVATE_INFORMATION_TYPES,
+ InformationType,
+ NON_EMBARGOED_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.interfaces.services import IService
from lp.app.validators import LaunchpadValidationError
from lp.code.enums import (
@@ -38,12 +45,7 @@
)
from lp.registry.enums import (
BranchSharingPolicy,
- FREE_INFORMATION_TYPES,
- FREE_PRIVATE_INFORMATION_TYPES,
- InformationType,
- NON_EMBARGOED_INFORMATION_TYPES,
PersonVisibility,
- PUBLIC_INFORMATION_TYPES,
SharingPermission,
TeamMembershipPolicy,
)
=== modified file 'lib/lp/code/model/tests/test_branchpuller.py'
--- lib/lp/code/model/tests/test_branchpuller.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/model/tests/test_branchpuller.py 2012-09-19 14:18:33 +0000
@@ -15,9 +15,9 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import BranchType
from lp.code.interfaces.branchpuller import IBranchPuller
-from lp.registry.enums import InformationType
from lp.services.database.constants import UTC_NOW
from lp.testing import (
login_person,
=== modified file 'lib/lp/code/model/tests/test_branchset.py'
--- lib/lp/code/model/tests/test_branchset.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/model/tests/test_branchset.py 2012-09-19 14:18:33 +0000
@@ -8,9 +8,9 @@
from testtools.matchers import LessThan
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.interfaces.branch import IBranchSet
from lp.code.model.branch import BranchSet
-from lp.registry.enums import InformationType
from lp.testing import (
login_person,
logout,
=== modified file 'lib/lp/code/model/tests/test_branchsubscription.py'
--- lib/lp/code/model/tests/test_branchsubscription.py 2012-09-18 16:32:01 +0000
+++ lib/lp/code/model/tests/test_branchsubscription.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,7 @@
from zope.component import getUtility
+from lp.app.enums import InformationType
from lp.app.errors import (
SubscriptionPrivacyViolation,
UserCannotUnsubscribePerson,
@@ -17,7 +18,6 @@
BranchSubscriptionNotificationLevel,
CodeReviewNotificationLevel,
)
-from lp.registry.enums import InformationType
from lp.testing import (
person_logged_in,
TestCaseWithFactory,
=== modified file 'lib/lp/code/model/tests/test_branchtarget.py'
--- lib/lp/code/model/tests/test_branchtarget.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/model/tests/test_branchtarget.py 2012-09-19 14:18:33 +0000
@@ -7,6 +7,7 @@
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import (
BranchType,
RevisionControlSystems,
@@ -19,7 +20,6 @@
PersonBranchTarget,
ProductBranchTarget,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.webapp import canonical_url
from lp.services.webapp.interfaces import IPrimaryContext
=== modified file 'lib/lp/code/model/tests/test_branchvisibility.py'
--- lib/lp/code/model/tests/test_branchvisibility.py 2012-08-13 19:34:10 +0000
+++ lib/lp/code/model/tests/test_branchvisibility.py 2012-09-19 14:18:33 +0000
@@ -18,6 +18,7 @@
)
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.app.interfaces.security import IAuthorization
from lp.code.enums import (
@@ -26,7 +27,6 @@
CodeReviewNotificationLevel,
)
from lp.code.interfaces.branch import IBranchSet
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.interfaces.role import IPersonRoles
from lp.security import AccessBranch
=== modified file 'lib/lp/code/model/tests/test_revision.py'
--- lib/lp/code/model/tests/test_revision.py 2012-06-07 04:52:02 +0000
+++ lib/lp/code/model/tests/test_revision.py 2012-09-19 14:18:33 +0000
@@ -19,6 +19,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import BranchLifecycleStatus
from lp.code.interfaces.branchlookup import IBranchLookup
from lp.code.interfaces.revision import IRevisionSet
@@ -26,7 +27,6 @@
RevisionCache,
RevisionSet,
)
-from lp.registry.enums import InformationType
from lp.registry.model.karma import Karma
from lp.scripts.garbo import RevisionAuthorEmailLinker
from lp.services.database.lpstorm import IMasterObject
=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipe.py 2012-09-05 05:08:26 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipe.py 2012-09-19 14:18:33 +0000
@@ -22,6 +22,7 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interfaces.buildqueue import IBuildQueue
from lp.buildmaster.model.buildqueue import BuildQueue
@@ -51,7 +52,6 @@
)
from lp.code.model.sourcepackagerecipedata import SourcePackageRecipeData
from lp.code.tests.helpers import recipe_parser_newest_version
-from lp.registry.enums import InformationType
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.series import SeriesStatus
from lp.services.database.bulk import load_referencing
=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2012-05-24 02:16:59 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2012-09-19 14:18:33 +0000
@@ -18,6 +18,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.errors import NotFoundError
from lp.buildmaster.enums import BuildStatus
from lp.buildmaster.interfaces.buildqueue import IBuildQueue
@@ -38,7 +39,6 @@
SourcePackageRecipeBuildMailer,
)
from lp.code.model.sourcepackagerecipebuild import SourcePackageRecipeBuild
-from lp.registry.enums import InformationType
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.series import SeriesStatus
from lp.services.database.lpstorm import IStore
=== modified file 'lib/lp/code/stories/branches/xx-private-branch-listings.txt'
--- lib/lp/code/stories/branches/xx-private-branch-listings.txt 2012-06-20 17:17:58 +0000
+++ lib/lp/code/stories/branches/xx-private-branch-listings.txt 2012-09-19 14:18:33 +0000
@@ -25,7 +25,7 @@
>>> from zope.component import getUtility
>>> from lp.services.database.sqlbase import flush_database_updates
>>> from lp.code.enums import BranchType
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> from lp.registry.interfaces.person import IPersonSet
>>> from lp.registry.interfaces.product import IProductSet
>>> login('no-priv@xxxxxxxxxxxxx')
=== modified file 'lib/lp/code/stories/webservice/xx-branchmergeproposal.txt'
--- lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2012-06-07 04:52:02 +0000
+++ lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2012-09-19 14:18:33 +0000
@@ -420,7 +420,7 @@
>>> login('admin@xxxxxxxxxxxxx')
>>> from zope.security.proxy import removeSecurityProxy
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> branch_owner = fixit_proposal.source_branch.owner
>>> removeSecurityProxy(
... fixit_proposal.source_branch).transitionToInformationType(
=== modified file 'lib/lp/code/tests/helpers.py'
--- lib/lp/code/tests/helpers.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/tests/helpers.py 2012-09-19 14:18:33 +0000
@@ -30,6 +30,7 @@
removeSecurityProxy,
)
+from lp.app.enums import InformationType
from lp.code.interfaces.branchmergeproposal import (
IBranchMergeProposalJobSource,
)
@@ -38,7 +39,6 @@
from lp.code.model.seriessourcepackagebranch import (
SeriesSourcePackageBranchSet,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.series import SeriesStatus
from lp.services.database.sqlbase import cursor
=== modified file 'lib/lp/code/tests/test_branch.py'
--- lib/lp/code/tests/test_branch.py 2012-06-07 10:28:18 +0000
+++ lib/lp/code/tests/test_branch.py 2012-09-19 14:18:33 +0000
@@ -7,6 +7,7 @@
from zope.security.proxy import removeSecurityProxy
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
+from lp.app.enums import InformationType
from lp.code.enums import (
BranchSubscriptionDiffSize,
BranchSubscriptionNotificationLevel,
@@ -14,7 +15,6 @@
)
from lp.code.interfaces.codehosting import SUPPORTED_SCHEMES
from lp.code.tests.helpers import make_official_package_branch
-from lp.registry.enums import InformationType
from lp.services.webapp.authorization import check_permission
from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
from lp.testing import (
=== modified file 'lib/lp/code/tests/test_branch_access_policy_triggers.py'
--- lib/lp/code/tests/test_branch_access_policy_triggers.py 2012-07-10 10:58:27 +0000
+++ lib/lp/code/tests/test_branch_access_policy_triggers.py 2012-09-19 14:18:33 +0000
@@ -5,8 +5,8 @@
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.model.branch import Branch
-from lp.registry.enums import InformationType
from lp.services.database.lpstorm import IStore
from lp.testing import TestCaseWithFactory
from lp.testing.layers import DatabaseFunctionalLayer
=== modified file 'lib/lp/code/tests/test_branch_webservice.py'
--- lib/lp/code/tests/test_branch_webservice.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/tests/test_branch_webservice.py 2012-09-19 14:18:33 +0000
@@ -8,9 +8,9 @@
from zope.security.management import endInteraction
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.interfaces.branch import IBranchSet
from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
-from lp.registry.enums import InformationType
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.testing import (
api_url,
=== modified file 'lib/lp/code/xmlrpc/tests/test_branch.py'
--- lib/lp/code/xmlrpc/tests/test_branch.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/xmlrpc/tests/test_branch.py 2012-09-19 14:18:33 +0000
@@ -12,11 +12,11 @@
from lazr.uri import URI
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import BranchType
from lp.code.interfaces.codehosting import BRANCH_ALIAS_PREFIX
from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch
from lp.code.xmlrpc.branch import PublicCodehostingAPI
-from lp.registry.enums import InformationType
from lp.services.xmlrpc import LaunchpadFault
from lp.testing import (
person_logged_in,
=== modified file 'lib/lp/code/xmlrpc/tests/test_codehosting.py'
--- lib/lp/code/xmlrpc/tests/test_codehosting.py 2012-05-31 03:54:13 +0000
+++ lib/lp/code/xmlrpc/tests/test_codehosting.py 2012-09-19 14:18:33 +0000
@@ -16,6 +16,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.errors import NotFoundError
from lp.code.bzr import (
BranchFormat,
@@ -43,7 +44,6 @@
run_with_login,
)
from lp.codehosting.inmemory import InMemoryFrontend
-from lp.registry.enums import InformationType
from lp.services.database.constants import UTC_NOW
from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet
from lp.services.webapp.interfaces import ILaunchBag
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2012-06-26 08:19:13 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2012-09-19 14:18:33 +0000
@@ -48,6 +48,7 @@
import subvertpy.client
import subvertpy.ra
+from lp.app.enums import InformationType
from lp.code.interfaces.codehosting import (
branch_id_alias,
compose_public_url,
@@ -87,7 +88,6 @@
SafeBranchOpener,
)
from lp.codehosting.tests.helpers import create_branch_with_one_revision
-from lp.registry.enums import InformationType
from lp.services.config import config
from lp.services.log.logger import BufferLogger
from lp.testing import (
=== modified file 'lib/lp/codehosting/inmemory.py'
--- lib/lp/codehosting/inmemory.py 2012-07-04 18:06:32 +0000
+++ lib/lp/codehosting/inmemory.py 2012-09-19 14:18:33 +0000
@@ -23,6 +23,11 @@
)
from zope.interface import implementer
+from lp.app.enums import (
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ )
from lp.app.validators import LaunchpadValidationError
from lp.app.validators.name import valid_name
from lp.code.bzr import (
@@ -50,11 +55,6 @@
ProductBranchTarget,
)
from lp.code.xmlrpc.codehosting import datetime_from_tuple
-from lp.registry.enums import (
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
- )
from lp.registry.errors import InvalidName
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.services.database.constants import UTC_NOW
=== modified file 'lib/lp/codehosting/puller/tests/test_acceptance.py'
--- lib/lp/codehosting/puller/tests/test_acceptance.py 2012-05-31 03:54:13 +0000
+++ lib/lp/codehosting/puller/tests/test_acceptance.py 2012-09-19 14:18:33 +0000
@@ -27,12 +27,12 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.enums import BranchType
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.codehosting.puller.tests import PullerBranchTestCase
from lp.codehosting.tests.helpers import LoomTestMixin
from lp.codehosting.vfs import get_lp_server
-from lp.registry.enums import InformationType
from lp.services.config import config
from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet
from lp.testing.layers import ZopelessAppServerLayer
=== modified file 'lib/lp/codehosting/tests/test_rewrite.py'
--- lib/lp/codehosting/tests/test_rewrite.py 2012-06-29 21:41:59 +0000
+++ lib/lp/codehosting/tests/test_rewrite.py 2012-09-19 14:18:33 +0000
@@ -13,10 +13,10 @@
import transaction
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.code.interfaces.codehosting import branch_id_alias
from lp.codehosting.rewrite import BranchRewriter
from lp.codehosting.vfs import branch_id_to_path
-from lp.registry.enums import InformationType
from lp.services.config import config
from lp.services.log.logger import BufferLogger
from lp.testing import (
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py 2012-09-14 00:59:44 +0000
+++ lib/lp/registry/browser/product.py 2012-09-19 14:18:33 +0000
@@ -108,10 +108,14 @@
format_link,
MenuAPI,
)
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ ServiceUsage,
+ )
from lp.app.errors import NotFoundError
from lp.app.interfaces.headings import IEditableContextTitle
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
+from lp.app.utilities import json_dump_information_types
from lp.app.widgets.date import DateWidget
from lp.app.widgets.itemswidgets import (
CheckBoxMatrixWidget,
@@ -158,10 +162,6 @@
PillarViewMixin,
)
from lp.registry.browser.productseries import get_series_branch_error
-from lp.registry.enums import (
- json_dump_information_types,
- InformationType,
- )
from lp.registry.interfaces.pillar import IPillarNameSet
from lp.registry.interfaces.product import (
IProduct,
=== modified file 'lib/lp/registry/browser/tests/milestone-views.txt'
--- lib/lp/registry/browser/tests/milestone-views.txt 2012-08-08 11:48:29 +0000
+++ lib/lp/registry/browser/tests/milestone-views.txt 2012-09-19 14:18:33 +0000
@@ -737,7 +737,7 @@
>>> ignored = login_person(owner)
>>> milestone = firefox_1_0.newMilestone('1.0.13')
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> private_bug = factory.makeBug(
... target=firefox, information_type=InformationType.USERDATA)
>>> private_bugtask = bug.bugtasks[0]
=== modified file 'lib/lp/registry/browser/tests/test_milestone.py'
--- lib/lp/registry/browser/tests/test_milestone.py 2012-08-13 19:34:10 +0000
+++ lib/lp/registry/browser/tests/test_milestone.py 2012-09-19 14:18:33 +0000
@@ -10,10 +10,10 @@
from testtools.matchers import LessThan
from zope.component import getUtility
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.bugs.interfaces.bugtask import IBugTaskSet
from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.model.milestonetag import ProjectGroupMilestoneTag
from lp.services.config import config
=== modified file 'lib/lp/registry/browser/tests/test_peoplemerge.py'
--- lib/lp/registry/browser/tests/test_peoplemerge.py 2012-09-17 02:53:26 +0000
+++ lib/lp/registry/browser/tests/test_peoplemerge.py 2012-09-19 14:18:33 +0000
@@ -7,10 +7,8 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
-from lp.registry.enums import (
- InformationType,
- TeamMembershipPolicy,
- )
+from lp.app.enums import InformationType
+from lp.registry.enums import TeamMembershipPolicy
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.persontransferjob import IPersonMergeJobSource
from lp.services.identity.interfaces.emailaddress import EmailAddressStatus
=== modified file 'lib/lp/registry/browser/tests/test_pillar_sharing.py'
--- lib/lp/registry/browser/tests/test_pillar_sharing.py 2012-09-14 13:24:20 +0000
+++ lib/lp/registry/browser/tests/test_pillar_sharing.py 2012-09-19 14:18:33 +0000
@@ -19,11 +19,11 @@
from zope.component import getUtility
from zope.traversing.browser.absoluteurl import absoluteURL
+from lp.app.enums import InformationType
from lp.app.interfaces.services import IService
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- InformationType,
)
from lp.registry.interfaces.accesspolicy import IAccessPolicyGrantFlatSource
from lp.registry.model.pillar import PillarPerson
=== modified file 'lib/lp/registry/browser/tests/test_team.py'
--- lib/lp/registry/browser/tests/test_team.py 2012-09-03 22:17:09 +0000
+++ lib/lp/registry/browser/tests/test_team.py 2012-09-19 14:18:33 +0000
@@ -11,6 +11,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.registry.browser.team import (
TeamIndexMenu,
TeamMailingListArchiveView,
@@ -19,7 +20,6 @@
from lp.registry.enums import (
EXCLUSIVE_TEAM_POLICY,
INCLUSIVE_TEAM_POLICY,
- InformationType,
PersonVisibility,
TeamMembershipPolicy,
TeamMembershipRenewalPolicy,
=== modified file 'lib/lp/registry/enums.py'
--- lib/lp/registry/enums.py 2012-09-16 12:49:11 +0000
+++ lib/lp/registry/enums.py 2012-09-19 14:18:33 +0000
@@ -10,20 +10,10 @@
'DistroSeriesDifferenceStatus',
'DistroSeriesDifferenceType',
'EXCLUSIVE_TEAM_POLICY',
- 'FREE_INFORMATION_TYPES',
- 'FREE_PRIVATE_INFORMATION_TYPES',
'INCLUSIVE_TEAM_POLICY',
- 'InformationType',
- 'json_dump_information_types',
- 'NON_EMBARGOED_INFORMATION_TYPES',
'PersonTransferJobType',
'PersonVisibility',
- 'PRIVATE_INFORMATION_TYPES',
- 'PROPRIETARY_INFORMATION_TYPES',
- 'PUBLIC_INFORMATION_TYPES',
- 'PUBLIC_PROPRIETARY_INFORMATION_TYPES',
'ProductJobType',
- 'SECURITY_INFORMATION_TYPES',
'SharingPermission',
'SpecificationSharingPolicy',
'TeamMembershipPolicy',
@@ -36,95 +26,6 @@
)
-class InformationType(DBEnumeratedType):
- """Information Type.
-
- The types used to control which users and teams can see various
- Launchpad artifacts, including bugs and branches.
- """
-
- PUBLIC = DBItem(1, """
- Public
-
- Everyone can see this information.
- """)
-
- PUBLICSECURITY = DBItem(2, """
- Public Security
-
- Everyone can see this security related information.
- """)
-
- PRIVATESECURITY = DBItem(3, """
- Private Security
-
- Only the security group can see this information.
- """)
-
- USERDATA = DBItem(4, """
- Private
-
- Only shared with users permitted to see private user information.
- """)
-
- PROPRIETARY = DBItem(5, """
- Proprietary
-
- Only shared with users permitted to see proprietary information.
- """)
-
- EMBARGOED = DBItem(6, """
- Embargoed
-
- Only shared with users permitted to see embargoed information.
- """)
-
-
-PUBLIC_INFORMATION_TYPES = (
- InformationType.PUBLIC, InformationType.PUBLICSECURITY)
-
-PRIVATE_INFORMATION_TYPES = (
- InformationType.PRIVATESECURITY, InformationType.USERDATA,
- InformationType.PROPRIETARY, InformationType.EMBARGOED)
-
-NON_EMBARGOED_INFORMATION_TYPES = (
- PUBLIC_INFORMATION_TYPES +
- (InformationType.PRIVATESECURITY, InformationType.USERDATA,
- InformationType.PROPRIETARY))
-
-SECURITY_INFORMATION_TYPES = (
- InformationType.PUBLICSECURITY, InformationType.PRIVATESECURITY)
-
-FREE_PRIVATE_INFORMATION_TYPES = (
- InformationType.PRIVATESECURITY, InformationType.USERDATA)
-
-FREE_INFORMATION_TYPES = (
- PUBLIC_INFORMATION_TYPES + FREE_PRIVATE_INFORMATION_TYPES)
-
-PROPRIETARY_INFORMATION_TYPES = (
- InformationType.PROPRIETARY, InformationType.EMBARGOED)
-
-# The information types unrelated to user data or security
-PUBLIC_PROPRIETARY_INFORMATION_TYPES = (
- (InformationType.PUBLIC,) + PROPRIETARY_INFORMATION_TYPES
-)
-
-
-def json_dump_information_types(cache, information_types):
- """Dump a dict of the data in the types requested."""
- dump = {}
- order = list(InformationType.sort_order)
- for term in information_types:
- dump[term.name] = {
- 'value': term.name,
- 'description': term.description,
- 'name': term.title,
- 'order': order.index(term.name),
- 'is_private': (term not in PUBLIC_INFORMATION_TYPES), 'description_css_class': 'choice-description',
- }
-
- cache.objects['information_type_data'] = dump
-
class SharingPermission(DBEnumeratedType):
"""Sharing permission.
=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py 2012-09-19 05:15:39 +0000
+++ lib/lp/registry/interfaces/product.py 2012-09-19 14:18:33 +0000
@@ -72,6 +72,7 @@
from zope.schema.vocabulary import SimpleVocabulary
from lp import _
+from lp.app.enums import InformationType
from lp.answers.interfaces.questiontarget import IQuestionTarget
from lp.app.errors import NameLookupFailed
from lp.app.interfaces.headings import IRootContext
@@ -109,7 +110,6 @@
BranchSharingPolicy,
BugSharingPolicy,
SpecificationSharingPolicy,
- InformationType,
)
from lp.registry.interfaces.announcement import IMakesAnnouncements
from lp.registry.interfaces.commercialsubscription import (
=== modified file 'lib/lp/registry/interfaces/sharingservice.py'
--- lib/lp/registry/interfaces/sharingservice.py 2012-09-18 16:41:02 +0000
+++ lib/lp/registry/interfaces/sharingservice.py 2012-09-19 14:18:33 +0000
@@ -27,6 +27,7 @@
)
from lp import _
+from lp.app.enums import InformationType
from lp.app.interfaces.services import IService
from lp.blueprints.interfaces.specification import ISpecification
from lp.bugs.interfaces.bug import IBug
@@ -34,7 +35,6 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- InformationType,
SharingPermission,
SpecificationSharingPolicy,
)
=== modified file 'lib/lp/registry/model/accesspolicy.py'
--- lib/lp/registry/model/accesspolicy.py 2012-09-18 18:18:28 +0000
+++ lib/lp/registry/model/accesspolicy.py 2012-09-19 14:18:33 +0000
@@ -34,11 +34,11 @@
from zope.component import getUtility
from zope.interface import implements
-from lp.registry.enums import (
+from lp.app.enums import (
InformationType,
PUBLIC_INFORMATION_TYPES,
- SharingPermission,
)
+from lp.registry.enums import SharingPermission
from lp.registry.interfaces.accesspolicy import (
IAccessArtifact,
IAccessArtifactGrant,
=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py 2012-09-13 21:58:12 +0000
+++ lib/lp/registry/model/distribution.py 2012-09-19 14:18:33 +0000
@@ -48,7 +48,13 @@
QuestionTargetMixin,
QuestionTargetSearch,
)
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
+ PUBLIC_INFORMATION_TYPES,
+ ServiceUsage,
+ )
from lp.app.errors import NotFoundError
from lp.app.interfaces.launchpad import (
IHasIcon,
@@ -93,10 +99,6 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- FREE_INFORMATION_TYPES,
- InformationType,
- PRIVATE_INFORMATION_TYPES,
- PUBLIC_INFORMATION_TYPES,
SpecificationSharingPolicy,
)
from lp.registry.errors import NoSuchDistroSeries
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2012-09-14 05:49:32 +0000
+++ lib/lp/registry/model/person.py 2012-09-19 14:18:33 +0000
@@ -108,6 +108,7 @@
)
from lp import _
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.answers.model.questionsperson import QuestionsPersonMixin
from lp.app.interfaces.launchpad import (
IHasIcon,
@@ -152,7 +153,6 @@
EXCLUSIVE_TEAM_POLICY,
INCLUSIVE_TEAM_POLICY,
PersonVisibility,
- PRIVATE_INFORMATION_TYPES,
TeamMembershipPolicy,
TeamMembershipRenewalPolicy,
)
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2012-09-19 05:15:39 +0000
+++ lib/lp/registry/model/product.py 2012-09-19 14:18:33 +0000
@@ -66,6 +66,9 @@
QuestionTargetSearch,
)
from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ InformationType,
+ PRIVATE_INFORMATION_TYPES,
service_uses_launchpad,
ServiceUsage,
)
@@ -121,9 +124,6 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- FREE_INFORMATION_TYPES,
- InformationType,
- PRIVATE_INFORMATION_TYPES,
SpecificationSharingPolicy,
)
from lp.registry.errors import CommercialSubscribersOnly
=== modified file 'lib/lp/registry/model/sharingjob.py'
--- lib/lp/registry/model/sharingjob.py 2012-07-13 04:42:34 +0000
+++ lib/lp/registry/model/sharingjob.py 2012-09-19 14:18:33 +0000
@@ -41,6 +41,7 @@
implements,
)
+from lp.app.enums import InformationType
from lp.bugs.interfaces.bug import (
IBug,
IBugSet,
@@ -55,7 +56,6 @@
get_branch_privacy_filter,
)
from lp.code.model.branchsubscription import BranchSubscription
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProduct
from lp.registry.interfaces.sharingjob import (
=== modified file 'lib/lp/registry/services/sharingservice.py'
--- lib/lp/registry/services/sharingservice.py 2012-09-18 16:32:01 +0000
+++ lib/lp/registry/services/sharingservice.py 2012-09-19 14:18:33 +0000
@@ -27,6 +27,7 @@
from zope.security.interfaces import Unauthorized
from zope.traversing.browser.absoluteurl import absoluteURL
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.app.browser.tales import ObjectImageDisplayAPI
from lp.blueprints.model.specification import Specification
from lp.bugs.interfaces.bugtask import IBugTaskSet
@@ -35,7 +36,6 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- PRIVATE_INFORMATION_TYPES,
SharingPermission,
SpecificationSharingPolicy,
)
=== modified file 'lib/lp/registry/services/tests/test_sharingservice.py'
--- lib/lp/registry/services/tests/test_sharingservice.py 2012-09-18 16:32:01 +0000
+++ lib/lp/registry/services/tests/test_sharingservice.py 2012-09-19 14:18:33 +0000
@@ -13,6 +13,7 @@
from zope.security.proxy import removeSecurityProxy
from zope.traversing.browser.absoluteurl import absoluteURL
+from lp.app.enums import InformationType
from lp.app.interfaces.services import IService
from lp.blueprints.interfaces.specification import ISpecification
from lp.bugs.interfaces.bug import IBug
@@ -24,7 +25,6 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- InformationType,
SharingPermission,
SpecificationSharingPolicy,
)
=== modified file 'lib/lp/registry/stories/product/xx-product-development-focus.txt'
--- lib/lp/registry/stories/product/xx-product-development-focus.txt 2012-07-06 07:39:40 +0000
+++ lib/lp/registry/stories/product/xx-product-development-focus.txt 2012-09-19 14:18:33 +0000
@@ -146,7 +146,7 @@
appears as if there is no series branch set.
>>> login('admin@xxxxxxxxxxxxx')
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> branch.transitionToInformationType(
... InformationType.USERDATA, branch.owner, verify_policy=False)
>>> logout()
=== modified file 'lib/lp/registry/tests/test_accesspolicy.py'
--- lib/lp/registry/tests/test_accesspolicy.py 2012-09-04 10:35:22 +0000
+++ lib/lp/registry/tests/test_accesspolicy.py 2012-09-19 14:18:33 +0000
@@ -7,10 +7,8 @@
from testtools.matchers import AllMatch
from zope.component import getUtility
-from lp.registry.enums import (
- InformationType,
- SharingPermission,
- )
+from lp.app.enums import InformationType
+from lp.registry.enums import SharingPermission
from lp.registry.interfaces.accesspolicy import (
IAccessArtifact,
IAccessArtifactGrant,
=== modified file 'lib/lp/registry/tests/test_distribution.py'
--- lib/lp/registry/tests/test_distribution.py 2012-09-13 15:41:25 +0000
+++ lib/lp/registry/tests/test_distribution.py 2012-09-19 14:18:33 +0000
@@ -23,7 +23,10 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ ServiceUsage,
+ )
from lp.app.errors import NotFoundError
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.registry.enums import (
@@ -31,7 +34,6 @@
BugSharingPolicy,
EXCLUSIVE_TEAM_POLICY,
INCLUSIVE_TEAM_POLICY,
- InformationType,
)
from lp.registry.errors import (
InclusiveTeamLinkageError,
=== modified file 'lib/lp/registry/tests/test_distro_webservice.py'
--- lib/lp/registry/tests/test_distro_webservice.py 2012-08-13 19:34:10 +0000
+++ lib/lp/registry/tests/test_distro_webservice.py 2012-09-19 14:18:33 +0000
@@ -11,6 +11,7 @@
from zope.security.management import endInteraction
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.code.enums import (
BranchSubscriptionDiffSize,
@@ -20,7 +21,6 @@
from lp.code.model.seriessourcepackagebranch import (
SeriesSourcePackageBranchSet,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.testing import (
=== modified file 'lib/lp/registry/tests/test_person.py'
--- lib/lp/registry/tests/test_person.py 2012-09-07 18:06:37 +0000
+++ lib/lp/registry/tests/test_person.py 2012-09-19 14:18:33 +0000
@@ -21,6 +21,7 @@
from zope.security.interfaces import Unauthorized
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.answers.model.answercontact import AnswerContact
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.blueprints.model.specification import Specification
@@ -30,7 +31,6 @@
)
from lp.bugs.model.bug import Bug
from lp.registry.enums import (
- InformationType,
PersonVisibility,
TeamMembershipPolicy,
)
=== modified file 'lib/lp/registry/tests/test_private_team_visibility.py'
--- lib/lp/registry/tests/test_private_team_visibility.py 2012-08-13 21:33:47 +0000
+++ lib/lp/registry/tests/test_private_team_visibility.py 2012-09-19 14:18:33 +0000
@@ -20,8 +20,8 @@
from zope.component import getUtility
from zope.security.interfaces import Unauthorized
+from lp.app.enums import InformationType
from lp.registry.enums import (
- InformationType,
PersonVisibility,
TeamMembershipPolicy,
)
=== modified file 'lib/lp/registry/tests/test_product.py'
--- lib/lp/registry/tests/test_product.py 2012-09-13 16:07:03 +0000
+++ lib/lp/registry/tests/test_product.py 2012-09-19 14:18:33 +0000
@@ -15,7 +15,11 @@
from zope.security.proxy import removeSecurityProxy
from lp.answers.interfaces.faqtarget import IFAQTarget
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ FREE_INFORMATION_TYPES,
+ InformationType,
+ ServiceUsage,
+ )
from lp.app.interfaces.launchpad import (
IHasIcon,
IHasLogo,
@@ -28,12 +32,10 @@
from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
from lp.registry.enums import (
+ EXCLUSIVE_TEAM_POLICY,
+ INCLUSIVE_TEAM_POLICY,
BranchSharingPolicy,
BugSharingPolicy,
- EXCLUSIVE_TEAM_POLICY,
- FREE_INFORMATION_TYPES,
- INCLUSIVE_TEAM_POLICY,
- InformationType,
SpecificationSharingPolicy,
)
from lp.registry.errors import (
=== modified file 'lib/lp/registry/tests/test_productjob.py'
--- lib/lp/registry/tests/test_productjob.py 2012-08-13 19:34:10 +0000
+++ lib/lp/registry/tests/test_productjob.py 2012-09-19 14:18:33 +0000
@@ -21,11 +21,9 @@
)
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
-from lp.registry.enums import (
- InformationType,
- ProductJobType,
- )
+from lp.registry.enums import ProductJobType
from lp.registry.interfaces.person import TeamMembershipPolicy
from lp.registry.interfaces.product import License
from lp.registry.interfaces.productjob import (
=== modified file 'lib/lp/registry/tests/test_sharingjob.py'
--- lib/lp/registry/tests/test_sharingjob.py 2012-08-13 19:34:10 +0000
+++ lib/lp/registry/tests/test_sharingjob.py 2012-09-19 14:18:33 +0000
@@ -11,12 +11,12 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.code.enums import (
BranchSubscriptionNotificationLevel,
CodeReviewNotificationLevel,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.accesspolicy import (
IAccessArtifactGrantSource,
IAccessPolicySource,
=== modified file 'lib/lp/registry/tests/test_team.py'
--- lib/lp/registry/tests/test_team.py 2012-08-21 04:04:47 +0000
+++ lib/lp/registry/tests/test_team.py 2012-09-19 14:18:33 +0000
@@ -10,10 +10,10 @@
from zope.interface.exceptions import Invalid
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.registry.enums import (
EXCLUSIVE_TEAM_POLICY,
INCLUSIVE_TEAM_POLICY,
- InformationType,
PersonTransferJobType,
PersonVisibility,
TeamMembershipPolicy,
=== modified file 'lib/lp/registry/tests/test_team_webservice.py'
--- lib/lp/registry/tests/test_team_webservice.py 2012-08-14 23:37:21 +0000
+++ lib/lp/registry/tests/test_team_webservice.py 2012-09-19 14:18:33 +0000
@@ -11,8 +11,8 @@
)
import transaction
+from lp.app.enums import InformationType
from lp.registry.enums import (
- InformationType,
PersonVisibility,
TeamMembershipPolicy,
)
=== modified file 'lib/lp/registry/tests/test_teammembership.py'
--- lib/lp/registry/tests/test_teammembership.py 2012-08-24 05:09:51 +0000
+++ lib/lp/registry/tests/test_teammembership.py 2012-09-19 14:18:33 +0000
@@ -22,9 +22,9 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.registry.enums import (
- InformationType,
TeamMembershipPolicy,
TeamMembershipRenewalPolicy,
)
=== modified file 'lib/lp/scripts/tests/test_garbo.py'
--- lib/lp/scripts/tests/test_garbo.py 2012-09-12 13:17:41 +0000
+++ lib/lp/scripts/tests/test_garbo.py 2012-09-19 14:18:33 +0000
@@ -35,6 +35,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.answers.model.answercontact import AnswerContact
from lp.bugs.model.bugnotification import (
BugNotification,
@@ -55,11 +56,9 @@
from lp.registry.enums import (
BranchSharingPolicy,
BugSharingPolicy,
- InformationType,
)
from lp.registry.interfaces.accesspolicy import IAccessPolicySource
from lp.registry.interfaces.person import IPersonSet
-from lp.registry.interfaces.product import IProductSet
from lp.registry.model.product import Product
from lp.scripts.garbo import (
AntiqueSessionPruner,
=== modified file 'lib/lp/services/feeds/stories/xx-security.txt'
--- lib/lp/services/feeds/stories/xx-security.txt 2012-05-14 06:28:17 +0000
+++ lib/lp/services/feeds/stories/xx-security.txt 2012-09-19 14:18:33 +0000
@@ -9,7 +9,7 @@
>>> from lp.services.database.lpstorm import IStore
>>> import transaction
>>> from lp.bugs.model.bug import Bug
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> IStore(Bug).find(Bug).set(information_type=InformationType.USERDATA)
>>> transaction.commit()
=== modified file 'lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py'
--- lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py 2012-05-02 05:25:11 +0000
+++ lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py 2012-09-19 14:18:33 +0000
@@ -8,7 +8,7 @@
from zope.component import getMultiAdapter
from zope.security.interfaces import Unauthorized
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.services.librarian.interfaces import ILibraryFileAliasWithParent
from lp.testing import (
login_person,
=== modified file 'lib/lp/services/webapp/publisher.py'
--- lib/lp/services/webapp/publisher.py 2012-09-12 20:19:42 +0000
+++ lib/lp/services/webapp/publisher.py 2012-09-19 14:18:33 +0000
@@ -65,6 +65,7 @@
from zope.traversing.browser.interfaces import IAbsoluteURL
from lp.app.errors import NotFoundError
+from lp.app.interfaces.informationtype import IInformationType
from lp.app.interfaces.launchpad import IPrivacy
from lp.app.versioninfo import revno
from lp.layers import (
@@ -90,7 +91,6 @@
)
from lp.services.webapp.url import urlappend
from lp.services.webapp.vhosts import allvhosts
-from lp.registry.interfaces.informationtype import IInformationType
# Monkeypatch NotFound to always avoid generating OOPS
# from NotFound in web service calls.
=== modified file 'lib/lp/soyuz/scripts/tests/test_queue.py'
--- lib/lp/soyuz/scripts/tests/test_queue.py 2012-08-08 11:48:29 +0000
+++ lib/lp/soyuz/scripts/tests/test_queue.py 2012-09-19 14:18:33 +0000
@@ -17,6 +17,7 @@
from zope.security.interfaces import ForbiddenAttribute
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.archiveuploader.nascentupload import NascentUpload
from lp.archiveuploader.tests import (
datadir,
@@ -28,7 +29,6 @@
BugTaskStatus,
IBugTaskSet,
)
-from lp.registry.enums import InformationType
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.pocket import PackagePublishingPocket
=== modified file 'lib/lp/systemhomes.py'
--- lib/lp/systemhomes.py 2012-08-08 05:22:14 +0000
+++ lib/lp/systemhomes.py 2012-09-19 14:18:33 +0000
@@ -25,6 +25,7 @@
from zope.component import getUtility
from zope.interface import implements
+from lp.app.enums import PRIVATE_INFORMATION_TYPES
from lp.bugs.adapters.bug import convert_to_information_type
from lp.bugs.interfaces.bug import (
CreateBugParams,
@@ -55,7 +56,6 @@
IHWVendorIDSet,
ParameterError,
)
-from lp.registry.enums import PRIVATE_INFORMATION_TYPES
from lp.registry.interfaces.distroseries import IDistroSeriesSet
from lp.registry.interfaces.mailinglist import IMailingListApplication
from lp.registry.interfaces.product import IProductSet
=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py 2012-09-14 18:23:50 +0000
+++ lib/lp/testing/factory.py 2012-09-19 14:18:33 +0000
@@ -63,7 +63,11 @@
removeSecurityProxy,
)
-from lp.app.enums import ServiceUsage
+from lp.app.enums import (
+ InformationType,
+ PUBLIC_INFORMATION_TYPES,
+ ServiceUsage,
+ )
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.archivepublisher.interfaces.publisherconfig import IPublisherConfigSet
from lp.archiveuploader.dscfile import DSCFile
@@ -141,9 +145,7 @@
BugSharingPolicy,
DistroSeriesDifferenceStatus,
DistroSeriesDifferenceType,
- InformationType,
SpecificationSharingPolicy,
- PUBLIC_INFORMATION_TYPES,
TeamMembershipPolicy,
)
from lp.registry.interfaces.accesspolicy import (
=== modified file 'lib/lp/translations/browser/tests/test_productserieslanguage_views.py'
--- lib/lp/translations/browser/tests/test_productserieslanguage_views.py 2012-05-31 03:54:13 +0000
+++ lib/lp/translations/browser/tests/test_productserieslanguage_views.py 2012-09-19 14:18:33 +0000
@@ -5,7 +5,7 @@
from zope.security.proxy import removeSecurityProxy
-from lp.registry.enums import InformationType
+from lp.app.enums import InformationType
from lp.services.webapp.servers import LaunchpadTestRequest
from lp.testing import (
login_person,
=== modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt'
--- lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2012-05-31 03:54:13 +0000
+++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2012-09-19 14:18:33 +0000
@@ -277,7 +277,7 @@
If the branch is private, though the page pretends to non-privileged users
that no synchronization has been set up.
- >>> from lp.registry.enums import InformationType
+ >>> from lp.app.enums import InformationType
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> private_branch = factory.makeBranch(
... product=frobnicator, information_type=InformationType.USERDATA)
=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildjob.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2012-05-24 02:16:59 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2012-09-19 14:18:33 +0000
@@ -8,6 +8,7 @@
from zope.event import notify
from zope.security.proxy import removeSecurityProxy
+from lp.app.enums import InformationType
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJobOld
from lp.buildmaster.interfaces.buildqueue import IBuildQueueSet
@@ -17,7 +18,6 @@
from lp.code.model.branchjob import BranchJob
from lp.code.model.directbranchcommit import DirectBranchCommit
from lp.codehosting.scanner import events
-from lp.registry.enums import InformationType
from lp.services.job.model.job import Job
from lp.services.webapp.interfaces import (
DEFAULT_FLAVOR,
Follow ups