Merge lp:~rharding/launchpad/updated_product_allowed_types into lp:launchpad
- updated_product_allowed_types
- Merge into devel
Proposed by
Richard Harding
on 2012-09-12
| Status: | Merged |
|---|---|
| Approved by: | Aaron Bentley on 2012-09-12 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15994 |
| Proposed branch: | lp:~rharding/launchpad/updated_product_allowed_types |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~rharding/launchpad/pp_register |
| Diff against target: |
3413 lines (+469/-453) 155 files modified
lib/lp/app/browser/informationtype.py (+2/-4) lib/lp/app/browser/tales.py (+1/-1) lib/lp/app/browser/tests/launchpad-search-pages.txt (+1/-1) lib/lp/app/browser/tests/test_launchpad.py (+2/-4) lib/lp/app/browser/tests/test_linkchecker.py (+1/-1) lib/lp/app/enums.py (+83/-0) lib/lp/app/interfaces/informationtype.py (+1/-1) lib/lp/app/tests/test_information_type_vocabulary.py (+2/-2) lib/lp/app/utilities/__init__.py (+30/-0) lib/lp/app/vocabularies.py (+50/-0) lib/lp/app/vocabularies.zcml (+12/-0) lib/lp/blueprints/browser/specification.py (+5/-5) lib/lp/blueprints/browser/tests/test_specification.py (+2/-4) lib/lp/blueprints/interfaces/specification.py (+1/-1) lib/lp/blueprints/model/specification.py (+7/-7) lib/lp/blueprints/model/tests/test_specification.py (+2/-4) lib/lp/blueprints/tests/test_specification.py (+6/-6) lib/lp/bugs/adapters/bug.py (+1/-1) lib/lp/bugs/browser/bug.py (+2/-2) lib/lp/bugs/browser/bugtarget.py (+10/-12) lib/lp/bugs/browser/bugtask.py (+7/-9) lib/lp/bugs/browser/structuralsubscription.py (+4/-2) lib/lp/bugs/browser/tests/bugtask-search-views.txt (+1/-1) lib/lp/bugs/browser/tests/test_bug_views.py (+2/-4) lib/lp/bugs/browser/tests/test_bugcomment.py (+1/-1) lib/lp/bugs/browser/tests/test_bugs.py (+2/-4) lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py (+1/-1) lib/lp/bugs/browser/tests/test_bugtarget_filebug.py (+5/-6) lib/lp/bugs/browser/tests/test_bugtask.py (+2/-4) lib/lp/bugs/browser/tests/test_bugview.py (+1/-1) lib/lp/bugs/doc/bug-private-by-default.txt (+1/-1) lib/lp/bugs/doc/bug.txt (+1/-1) lib/lp/bugs/doc/bugattachments.txt (+1/-1) lib/lp/bugs/doc/bugnotification-email.txt (+1/-1) lib/lp/bugs/doc/bugnotification-sending.txt (+1/-1) lib/lp/bugs/doc/bugsubscription.txt (+1/-1) lib/lp/bugs/doc/bugsummary.txt (+1/-1) lib/lp/bugs/interfaces/bug.py (+1/-1) lib/lp/bugs/interfaces/bugsubscriptionfilter.py (+1/-1) lib/lp/bugs/interfaces/bugtarget.py (+6/-6) lib/lp/bugs/interfaces/bugtasksearch.py (+1/-1) lib/lp/bugs/mail/bugnotificationbuilder.py (+2/-2) lib/lp/bugs/mail/commands.py (+4/-4) lib/lp/bugs/mail/tests/test_commands.py (+2/-4) lib/lp/bugs/mail/tests/test_handler.py (+2/-4) lib/lp/bugs/model/bug.py (+7/-7) lib/lp/bugs/model/bugsubscriptionfilter.py (+1/-1) lib/lp/bugs/model/bugtask.py (+4/-5) lib/lp/bugs/model/bugtaskflat.py (+1/-1) lib/lp/bugs/model/bugtasksearch.py (+1/-1) lib/lp/bugs/model/tests/test_bug.py (+2/-4) lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py (+1/-1) lib/lp/bugs/model/tests/test_bugsummary.py (+2/-4) lib/lp/bugs/model/tests/test_bugtask.py (+4/-2) lib/lp/bugs/model/tests/test_bugtasksearch.py (+2/-4) lib/lp/bugs/scripts/bugsummaryrebuild.py (+4/-4) lib/lp/bugs/scripts/tests/test_bugnotification.py (+1/-1) lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py (+1/-1) lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt (+2/-1) lib/lp/bugs/tests/test_bug_messages.py (+1/-1) lib/lp/bugs/tests/test_bug_messages_webservice.py (+1/-1) lib/lp/bugs/tests/test_bug_notification_recipients.py (+1/-1) lib/lp/bugs/tests/test_bugbranch.py (+1/-1) lib/lp/bugs/tests/test_bugchanges.py (+1/-1) lib/lp/bugs/tests/test_bugs_webservice.py (+2/-4) lib/lp/bugs/tests/test_bugtaskflat_triggers.py (+1/-1) lib/lp/bugs/tests/test_bugvisibility.py (+1/-1) lib/lp/bugs/tests/test_searchtasks_webservice.py (+1/-1) lib/lp/bugs/tests/test_structuralsubscription.py (+1/-1) lib/lp/bugs/xmlrpc/bug.py (+1/-1) lib/lp/code/browser/branch.py (+3/-5) lib/lp/code/browser/branchlisting.py (+1/-1) lib/lp/code/browser/tests/test_bazaar.py (+1/-1) lib/lp/code/browser/tests/test_branch.py (+2/-4) lib/lp/code/browser/tests/test_branchmergeproposal.py (+1/-1) lib/lp/code/browser/tests/test_branchmergeproposallisting.py (+1/-1) lib/lp/code/browser/tests/test_branchmergequeuelisting.py (+1/-1) lib/lp/code/browser/tests/test_branchsubscription.py (+1/-1) lib/lp/code/browser/tests/test_product.py (+4/-2) lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+1/-1) lib/lp/code/interfaces/branch.py (+1/-1) lib/lp/code/mail/tests/test_branchmergeproposal.py (+1/-1) lib/lp/code/model/branch.py (+6/-6) lib/lp/code/model/branchcollection.py (+4/-4) lib/lp/code/model/branchmergeproposal.py (+1/-1) lib/lp/code/model/branchnamespace.py (+7/-5) lib/lp/code/model/revision.py (+1/-1) lib/lp/code/model/tests/test_branch.py (+5/-3) lib/lp/code/model/tests/test_branchcollection.py (+2/-4) lib/lp/code/model/tests/test_branchjob.py (+1/-1) lib/lp/code/model/tests/test_branchlookup.py (+1/-1) lib/lp/code/model/tests/test_branchmergeproposal.py (+2/-4) lib/lp/code/model/tests/test_branchmergequeuecollection.py (+1/-1) lib/lp/code/model/tests/test_branchnamespace.py (+7/-5) lib/lp/code/model/tests/test_branchpuller.py (+1/-1) lib/lp/code/model/tests/test_branchset.py (+1/-1) lib/lp/code/model/tests/test_branchsubscription.py (+1/-1) lib/lp/code/model/tests/test_branchtarget.py (+1/-1) lib/lp/code/model/tests/test_branchvisibility.py (+1/-1) lib/lp/code/model/tests/test_revision.py (+1/-1) lib/lp/code/model/tests/test_sourcepackagerecipe.py (+1/-1) lib/lp/code/model/tests/test_sourcepackagerecipebuild.py (+1/-1) lib/lp/code/stories/branches/xx-private-branch-listings.txt (+1/-1) lib/lp/code/stories/webservice/xx-branchmergeproposal.txt (+1/-1) lib/lp/code/tests/helpers.py (+1/-1) lib/lp/code/tests/test_branch.py (+1/-1) lib/lp/code/tests/test_branch_access_policy_triggers.py (+1/-1) lib/lp/code/tests/test_branch_webservice.py (+1/-1) lib/lp/code/xmlrpc/tests/test_branch.py (+1/-1) lib/lp/code/xmlrpc/tests/test_codehosting.py (+1/-1) lib/lp/codehosting/codeimport/tests/test_worker.py (+1/-1) lib/lp/codehosting/inmemory.py (+5/-5) lib/lp/codehosting/puller/tests/test_acceptance.py (+1/-1) lib/lp/codehosting/tests/test_rewrite.py (+1/-1) lib/lp/registry/browser/product.py (+9/-9) lib/lp/registry/browser/tests/milestone-views.txt (+1/-1) lib/lp/registry/browser/tests/test_milestone.py (+1/-1) lib/lp/registry/browser/tests/test_peoplemerge.py (+2/-4) lib/lp/registry/browser/tests/test_pillar_sharing.py (+1/-1) lib/lp/registry/browser/tests/test_team.py (+1/-1) lib/lp/registry/enums.py (+0/-99) lib/lp/registry/interfaces/product.py (+1/-7) lib/lp/registry/interfaces/sharingservice.py (+1/-1) lib/lp/registry/model/accesspolicy.py (+2/-2) lib/lp/registry/model/distribution.py (+7/-5) lib/lp/registry/model/person.py (+1/-1) lib/lp/registry/model/product.py (+3/-9) lib/lp/registry/model/sharingjob.py (+1/-1) lib/lp/registry/services/sharingservice.py (+1/-1) lib/lp/registry/services/tests/test_sharingservice.py (+1/-1) lib/lp/registry/stories/product/xx-product-development-focus.txt (+1/-1) lib/lp/registry/tests/test_accesspolicy.py (+2/-4) lib/lp/registry/tests/test_distribution.py (+4/-2) lib/lp/registry/tests/test_distro_webservice.py (+1/-1) lib/lp/registry/tests/test_person.py (+1/-1) lib/lp/registry/tests/test_private_team_visibility.py (+1/-1) lib/lp/registry/tests/test_product.py (+7/-5) lib/lp/registry/tests/test_productjob.py (+2/-4) lib/lp/registry/tests/test_sharingjob.py (+1/-1) lib/lp/registry/tests/test_team.py (+1/-1) lib/lp/registry/tests/test_team_webservice.py (+1/-1) lib/lp/registry/tests/test_teammembership.py (+1/-1) lib/lp/registry/vocabularies.py (+0/-16) lib/lp/registry/vocabularies.zcml (+0/-6) lib/lp/scripts/tests/test_garbo.py (+1/-2) lib/lp/services/feeds/stories/xx-security.txt (+1/-1) lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py (+1/-1) lib/lp/services/webapp/publisher.py (+1/-1) lib/lp/soyuz/scripts/tests/test_queue.py (+1/-1) lib/lp/soyuz/tests/test_processacceptedbugsjob.py (+1/-1) lib/lp/systemhomes.py (+1/-1) lib/lp/testing/factory.py (+5/-3) lib/lp/translations/browser/tests/test_productserieslanguage_views.py (+1/-1) lib/lp/translations/stories/productseries/xx-productseries-translations.txt (+1/-1) lib/lp/translations/tests/test_translationtemplatesbuildjob.py (+1/-1) |
| To merge this branch: | bzr merge lp:~rharding/launchpad/updated_product_allowed_types |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | 2012-09-12 | Approve on 2012-09-12 | |
|
Review via email:
|
|||
Commit Message
Change produuct information types to come from constant vs getAllowed method.
Description of the Change
= Summary =
A constant was added that lists the information types needed for Product.
Change to using that.
== Pre Implementation ==
Discussed on our stand up that this was a simpler method of getting the types
into the choice widget.
== Implementation Notes ==
Simple case of removing the old code, change to the constant from the enums.
To post a comment you must log in.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
| 1 | === modified file 'lib/lp/app/browser/informationtype.py' |
| 2 | --- lib/lp/app/browser/informationtype.py 2012-09-14 00:59:44 +0000 |
| 3 | +++ lib/lp/app/browser/informationtype.py 2012-09-20 17:34:56 +0000 |
| 4 | @@ -8,10 +8,8 @@ |
| 5 | |
| 6 | from lazr.restful.interfaces import IJSONRequestCache |
| 7 | |
| 8 | -from lp.registry.enums import ( |
| 9 | - json_dump_information_types, |
| 10 | - PRIVATE_INFORMATION_TYPES |
| 11 | - ) |
| 12 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 13 | +from lp.app.utilities import json_dump_information_types |
| 14 | |
| 15 | |
| 16 | class InformationTypePortletMixin: |
| 17 | |
| 18 | === modified file 'lib/lp/app/browser/tales.py' |
| 19 | --- lib/lp/app/browser/tales.py 2012-07-23 07:48:51 +0000 |
| 20 | +++ lib/lp/app/browser/tales.py 2012-09-20 17:34:56 +0000 |
| 21 | @@ -47,6 +47,7 @@ |
| 22 | ) |
| 23 | |
| 24 | from lp import _ |
| 25 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 26 | from lp.app.browser.badge import IHasBadges |
| 27 | from lp.app.browser.stringformatter import ( |
| 28 | escape, |
| 29 | @@ -64,7 +65,6 @@ |
| 30 | from lp.buildmaster.enums import BuildStatus |
| 31 | from lp.code.interfaces.branch import IBranch |
| 32 | from lp.layers import LaunchpadLayer |
| 33 | -from lp.registry.enums import PRIVATE_INFORMATION_TYPES |
| 34 | from lp.registry.interfaces.distribution import IDistribution |
| 35 | from lp.registry.interfaces.distributionsourcepackage import ( |
| 36 | IDistributionSourcePackage, |
| 37 | |
| 38 | === modified file 'lib/lp/app/browser/tests/launchpad-search-pages.txt' |
| 39 | --- lib/lp/app/browser/tests/launchpad-search-pages.txt 2012-05-02 05:25:11 +0000 |
| 40 | +++ lib/lp/app/browser/tests/launchpad-search-pages.txt 2012-09-20 17:34:56 +0000 |
| 41 | @@ -115,7 +115,7 @@ |
| 42 | created because he is the owner. |
| 43 | |
| 44 | >>> from lp.services.webapp.interfaces import ILaunchBag |
| 45 | - >>> from lp.registry.enums import InformationType |
| 46 | + >>> from lp.app.enums import InformationType |
| 47 | |
| 48 | >>> login('test@canonical.com') |
| 49 | >>> sample_person = getUtility(ILaunchBag).user |
| 50 | |
| 51 | === modified file 'lib/lp/app/browser/tests/test_launchpad.py' |
| 52 | --- lib/lp/app/browser/tests/test_launchpad.py 2012-08-14 23:27:07 +0000 |
| 53 | +++ lib/lp/app/browser/tests/test_launchpad.py 2012-09-20 17:34:56 +0000 |
| 54 | @@ -17,13 +17,11 @@ |
| 55 | iter_view_registrations, |
| 56 | LaunchpadRootNavigation, |
| 57 | ) |
| 58 | +from lp.app.enums import InformationType |
| 59 | from lp.app.errors import GoneError |
| 60 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 61 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
| 62 | -from lp.registry.enums import ( |
| 63 | - InformationType, |
| 64 | - PersonVisibility, |
| 65 | - ) |
| 66 | +from lp.registry.enums import PersonVisibility |
| 67 | from lp.registry.interfaces.person import IPersonSet |
| 68 | from lp.services.identity.interfaces.account import AccountStatus |
| 69 | from lp.services.webapp import canonical_url |
| 70 | |
| 71 | === modified file 'lib/lp/app/browser/tests/test_linkchecker.py' |
| 72 | --- lib/lp/app/browser/tests/test_linkchecker.py 2012-05-02 05:25:11 +0000 |
| 73 | +++ lib/lp/app/browser/tests/test_linkchecker.py 2012-09-20 17:34:56 +0000 |
| 74 | @@ -11,7 +11,7 @@ |
| 75 | from zope.security.proxy import removeSecurityProxy |
| 76 | |
| 77 | from lp.app.browser.linkchecker import LinkCheckerAPI |
| 78 | -from lp.registry.enums import InformationType |
| 79 | +from lp.app.enums import InformationType |
| 80 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 81 | from lp.testing import TestCaseWithFactory |
| 82 | from lp.testing.layers import DatabaseFunctionalLayer |
| 83 | |
| 84 | === modified file 'lib/lp/app/enums.py' |
| 85 | --- lib/lp/app/enums.py 2012-02-24 06:33:10 +0000 |
| 86 | +++ lib/lp/app/enums.py 2012-09-20 17:34:56 +0000 |
| 87 | @@ -5,6 +5,15 @@ |
| 88 | |
| 89 | __metaclass__ = type |
| 90 | __all__ = [ |
| 91 | + 'FREE_INFORMATION_TYPES', |
| 92 | + 'FREE_PRIVATE_INFORMATION_TYPES', |
| 93 | + 'InformationType', |
| 94 | + 'NON_EMBARGOED_INFORMATION_TYPES', |
| 95 | + 'PRIVATE_INFORMATION_TYPES', |
| 96 | + 'PROPRIETARY_INFORMATION_TYPES', |
| 97 | + 'PUBLIC_INFORMATION_TYPES', |
| 98 | + 'PUBLIC_PROPRIETARY_INFORMATION_TYPES', |
| 99 | + 'SECURITY_INFORMATION_TYPES', |
| 100 | 'ServiceUsage', |
| 101 | 'service_uses_launchpad', |
| 102 | ] |
| 103 | @@ -15,6 +24,80 @@ |
| 104 | ) |
| 105 | |
| 106 | |
| 107 | +class InformationType(DBEnumeratedType): |
| 108 | + """Information Type. |
| 109 | + |
| 110 | + The types used to control which users and teams can see various |
| 111 | + Launchpad artifacts, including bugs and branches. |
| 112 | + """ |
| 113 | + |
| 114 | + PUBLIC = DBItem(1, """ |
| 115 | + Public |
| 116 | + |
| 117 | + Everyone can see this information. |
| 118 | + """) |
| 119 | + |
| 120 | + PUBLICSECURITY = DBItem(2, """ |
| 121 | + Public Security |
| 122 | + |
| 123 | + Everyone can see this security related information. |
| 124 | + """) |
| 125 | + |
| 126 | + PRIVATESECURITY = DBItem(3, """ |
| 127 | + Private Security |
| 128 | + |
| 129 | + Only the security group can see this information. |
| 130 | + """) |
| 131 | + |
| 132 | + USERDATA = DBItem(4, """ |
| 133 | + Private |
| 134 | + |
| 135 | + Only shared with users permitted to see private user information. |
| 136 | + """) |
| 137 | + |
| 138 | + PROPRIETARY = DBItem(5, """ |
| 139 | + Proprietary |
| 140 | + |
| 141 | + Only shared with users permitted to see proprietary information. |
| 142 | + """) |
| 143 | + |
| 144 | + EMBARGOED = DBItem(6, """ |
| 145 | + Embargoed |
| 146 | + |
| 147 | + Only shared with users permitted to see embargoed information. |
| 148 | + """) |
| 149 | + |
| 150 | + |
| 151 | +PUBLIC_INFORMATION_TYPES = ( |
| 152 | + InformationType.PUBLIC, InformationType.PUBLICSECURITY) |
| 153 | + |
| 154 | +PRIVATE_INFORMATION_TYPES = ( |
| 155 | + InformationType.PRIVATESECURITY, InformationType.USERDATA, |
| 156 | + InformationType.PROPRIETARY, InformationType.EMBARGOED) |
| 157 | + |
| 158 | +NON_EMBARGOED_INFORMATION_TYPES = ( |
| 159 | + PUBLIC_INFORMATION_TYPES + |
| 160 | + (InformationType.PRIVATESECURITY, InformationType.USERDATA, |
| 161 | + InformationType.PROPRIETARY)) |
| 162 | + |
| 163 | +SECURITY_INFORMATION_TYPES = ( |
| 164 | + InformationType.PUBLICSECURITY, InformationType.PRIVATESECURITY) |
| 165 | + |
| 166 | +FREE_PRIVATE_INFORMATION_TYPES = ( |
| 167 | + InformationType.PRIVATESECURITY, InformationType.USERDATA) |
| 168 | + |
| 169 | +FREE_INFORMATION_TYPES = ( |
| 170 | + PUBLIC_INFORMATION_TYPES + FREE_PRIVATE_INFORMATION_TYPES) |
| 171 | + |
| 172 | +PROPRIETARY_INFORMATION_TYPES = ( |
| 173 | + InformationType.PROPRIETARY, InformationType.EMBARGOED) |
| 174 | + |
| 175 | +# The information types unrelated to user data or security |
| 176 | +PUBLIC_PROPRIETARY_INFORMATION_TYPES = ( |
| 177 | + (InformationType.PUBLIC,) + PROPRIETARY_INFORMATION_TYPES |
| 178 | +) |
| 179 | + |
| 180 | + |
| 181 | class ServiceUsage(DBEnumeratedType): |
| 182 | """Launchpad application usages. |
| 183 | |
| 184 | |
| 185 | === renamed file 'lib/lp/registry/interfaces/informationtype.py' => 'lib/lp/app/interfaces/informationtype.py' |
| 186 | --- lib/lp/registry/interfaces/informationtype.py 2012-09-12 20:19:42 +0000 |
| 187 | +++ lib/lp/app/interfaces/informationtype.py 2012-09-20 17:34:56 +0000 |
| 188 | @@ -9,8 +9,8 @@ |
| 189 | from zope.schema import Choice |
| 190 | |
| 191 | from lp import _ |
| 192 | +from lp.app.enums import InformationType |
| 193 | from lp.app.interfaces.launchpad import IPrivacy |
| 194 | -from lp.registry.enums import InformationType |
| 195 | |
| 196 | |
| 197 | class IInformationType(IPrivacy): |
| 198 | |
| 199 | === renamed file 'lib/lp/registry/tests/test_information_type_vocabulary.py' => 'lib/lp/app/tests/test_information_type_vocabulary.py' |
| 200 | --- lib/lp/registry/tests/test_information_type_vocabulary.py 2012-07-26 07:55:44 +0000 |
| 201 | +++ lib/lp/app/tests/test_information_type_vocabulary.py 2012-09-20 17:34:56 +0000 |
| 202 | @@ -7,8 +7,8 @@ |
| 203 | |
| 204 | from testtools.matchers import MatchesStructure |
| 205 | |
| 206 | -from lp.registry.enums import InformationType |
| 207 | -from lp.registry.vocabularies import InformationTypeVocabulary |
| 208 | +from lp.app.enums import InformationType |
| 209 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 210 | from lp.testing import TestCase |
| 211 | |
| 212 | |
| 213 | |
| 214 | === modified file 'lib/lp/app/utilities/__init__.py' |
| 215 | --- lib/lp/app/utilities/__init__.py 2012-09-14 00:59:44 +0000 |
| 216 | +++ lib/lp/app/utilities/__init__.py 2012-09-20 17:34:56 +0000 |
| 217 | @@ -0,0 +1,30 @@ |
| 218 | +# Copyright 2012 Canonical Ltd. This software is licensed under the |
| 219 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 220 | + |
| 221 | + |
| 222 | +__all__ = [ |
| 223 | + 'json_dump_information_types', |
| 224 | + ] |
| 225 | + |
| 226 | + |
| 227 | +from lp.app.enums import ( |
| 228 | + InformationType, |
| 229 | + PRIVATE_INFORMATION_TYPES, |
| 230 | + ) |
| 231 | + |
| 232 | + |
| 233 | +def json_dump_information_types(cache, information_types): |
| 234 | + """Dump a dict of the data in the types requested.""" |
| 235 | + dump = {} |
| 236 | + order = list(InformationType.sort_order) |
| 237 | + for term in information_types: |
| 238 | + dump[term.name] = { |
| 239 | + 'value': term.name, |
| 240 | + 'description': term.description, |
| 241 | + 'name': term.title, |
| 242 | + 'order': order.index(term.name), |
| 243 | + 'is_private': (term in PRIVATE_INFORMATION_TYPES), |
| 244 | + 'description_css_class': 'choice-description', |
| 245 | + } |
| 246 | + |
| 247 | + cache.objects['information_type_data'] = dump |
| 248 | |
| 249 | === added file 'lib/lp/app/vocabularies.py' |
| 250 | --- lib/lp/app/vocabularies.py 1970-01-01 00:00:00 +0000 |
| 251 | +++ lib/lp/app/vocabularies.py 2012-09-20 17:34:56 +0000 |
| 252 | @@ -0,0 +1,50 @@ |
| 253 | +# Copyright 2009-2012 Canonical Ltd. This software is licensed under the |
| 254 | +# GNU Affero General Public License version 3 (see the file LICENSE). |
| 255 | + |
| 256 | +"""Vocabularies for content objects. |
| 257 | + |
| 258 | +Vocabularies that represent a set of content objects should be in this module. |
| 259 | +Those vocabularies that are only used for providing a UI are better placed in |
| 260 | +the browser code. |
| 261 | + |
| 262 | +Note that you probably shouldn't be importing stuff from these modules, as it |
| 263 | +is better to have your schema's fields look up the vocabularies by name. Some |
| 264 | +of these vocabularies will only work if looked up by name, as they require |
| 265 | +context to calculate the available options. Obtaining a vocabulary by name |
| 266 | +also avoids circular import issues. |
| 267 | + |
| 268 | +eg. |
| 269 | + |
| 270 | +class IFoo(Interface): |
| 271 | + thingy = Choice(..., vocabulary='Thingies') |
| 272 | + |
| 273 | +The binding of name -> class is done in the configure.zcml |
| 274 | +""" |
| 275 | + |
| 276 | +__metaclass__ = type |
| 277 | + |
| 278 | +__all__ = [ |
| 279 | + 'InformationTypeVocabulary', |
| 280 | + ] |
| 281 | + |
| 282 | + |
| 283 | +from lazr.enum import IEnumeratedType |
| 284 | +from zope.interface import implements |
| 285 | +from zope.schema.vocabulary import ( |
| 286 | + SimpleTerm, |
| 287 | + SimpleVocabulary, |
| 288 | + ) |
| 289 | + |
| 290 | + |
| 291 | +class InformationTypeVocabulary(SimpleVocabulary): |
| 292 | + |
| 293 | + implements(IEnumeratedType) |
| 294 | + |
| 295 | + def __init__(self, types): |
| 296 | + terms = [] |
| 297 | + for type in types: |
| 298 | + term = SimpleTerm(type, type.name, type.title) |
| 299 | + term.name = type.name |
| 300 | + term.description = type.description |
| 301 | + terms.append(term) |
| 302 | + super(InformationTypeVocabulary, self).__init__(terms) |
| 303 | |
| 304 | === added file 'lib/lp/app/vocabularies.zcml' |
| 305 | --- lib/lp/app/vocabularies.zcml 1970-01-01 00:00:00 +0000 |
| 306 | +++ lib/lp/app/vocabularies.zcml 2012-09-20 17:34:56 +0000 |
| 307 | @@ -0,0 +1,12 @@ |
| 308 | +<!-- Copyright 2009-2012 Canonical Ltd. This software is licensed under the |
| 309 | + GNU Affero General Public License version 3 (see the file LICENSE). |
| 310 | +--> |
| 311 | + |
| 312 | +<configure xmlns="http://namespaces.zope.org/zope"> |
| 313 | + <class |
| 314 | + class="lp.app.vocabularies.InformationTypeVocabulary"> |
| 315 | + <require |
| 316 | + permission="zope.Public" |
| 317 | + attributes="name title description"/> |
| 318 | + </class> |
| 319 | +</configure> |
| 320 | |
| 321 | === modified file 'lib/lp/blueprints/browser/specification.py' |
| 322 | --- lib/lp/blueprints/browser/specification.py 2012-09-17 16:30:35 +0000 |
| 323 | +++ lib/lp/blueprints/browser/specification.py 2012-09-20 17:34:56 +0000 |
| 324 | @@ -102,6 +102,11 @@ |
| 325 | DateTimeFormatterAPI, |
| 326 | format_link, |
| 327 | ) |
| 328 | +from lp.app.enums import ( |
| 329 | + PUBLIC_PROPRIETARY_INFORMATION_TYPES, |
| 330 | + ) |
| 331 | +from lp.app.utilities import json_dump_information_types |
| 332 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 333 | from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription |
| 334 | from lp.blueprints.browser.specificationtarget import HasSpecificationsView |
| 335 | from lp.blueprints.enums import ( |
| 336 | @@ -117,13 +122,8 @@ |
| 337 | from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch |
| 338 | from lp.blueprints.interfaces.sprintspecification import ISprintSpecification |
| 339 | from lp.code.interfaces.branchnamespace import IBranchNamespaceSet |
| 340 | -from lp.registry.enums import ( |
| 341 | - json_dump_information_types, |
| 342 | - PUBLIC_PROPRIETARY_INFORMATION_TYPES, |
| 343 | - ) |
| 344 | from lp.registry.interfaces.distribution import IDistribution |
| 345 | from lp.registry.interfaces.product import IProduct |
| 346 | -from lp.registry.vocabularies import InformationTypeVocabulary |
| 347 | from lp.services.config import config |
| 348 | from lp.services.features import getFeatureFlag |
| 349 | from lp.services.fields import WorkItemsText |
| 350 | |
| 351 | === modified file 'lib/lp/blueprints/browser/tests/test_specification.py' |
| 352 | --- lib/lp/blueprints/browser/tests/test_specification.py 2012-09-18 19:55:41 +0000 |
| 353 | +++ lib/lp/blueprints/browser/tests/test_specification.py 2012-09-20 17:34:56 +0000 |
| 354 | @@ -24,6 +24,7 @@ |
| 355 | from zope.security.proxy import removeSecurityProxy |
| 356 | |
| 357 | from lp.app.browser.tales import format_link |
| 358 | +from lp.app.enums import InformationType |
| 359 | from lp.app.interfaces.services import IService |
| 360 | from lp.blueprints.browser import specification |
| 361 | from lp.blueprints.browser.specification import INFORMATION_TYPE_FLAG |
| 362 | @@ -32,10 +33,7 @@ |
| 363 | ISpecification, |
| 364 | ISpecificationSet, |
| 365 | ) |
| 366 | -from lp.registry.enums import ( |
| 367 | - InformationType, |
| 368 | - SpecificationSharingPolicy, |
| 369 | - ) |
| 370 | +from lp.registry.enums import SpecificationSharingPolicy |
| 371 | from lp.registry.interfaces.person import PersonVisibility |
| 372 | from lp.services.features.testing import FeatureFixture |
| 373 | from lp.services.webapp.interfaces import BrowserNotificationLevel |
| 374 | |
| 375 | === modified file 'lib/lp/blueprints/interfaces/specification.py' |
| 376 | --- lib/lp/blueprints/interfaces/specification.py 2012-09-11 19:14:41 +0000 |
| 377 | +++ lib/lp/blueprints/interfaces/specification.py 2012-09-20 17:34:56 +0000 |
| 378 | @@ -48,6 +48,7 @@ |
| 379 | ) |
| 380 | |
| 381 | from lp import _ |
| 382 | +from lp.app.enums import InformationType |
| 383 | from lp.app.interfaces.launchpad import IPrivacy |
| 384 | from lp.app.validators import LaunchpadValidationError |
| 385 | from lp.app.validators.url import valid_webref |
| 386 | @@ -72,7 +73,6 @@ |
| 387 | from lp.blueprints.interfaces.sprint import ISprint |
| 388 | from lp.bugs.interfaces.buglink import IBugLinkTarget |
| 389 | from lp.code.interfaces.branchlink import IHasLinkedBranches |
| 390 | -from lp.registry.enums import InformationType |
| 391 | from lp.registry.interfaces.milestone import IMilestone |
| 392 | from lp.registry.interfaces.person import IPerson |
| 393 | from lp.registry.interfaces.projectgroup import IProjectGroup |
| 394 | |
| 395 | === modified file 'lib/lp/blueprints/model/specification.py' |
| 396 | --- lib/lp/blueprints/model/specification.py 2012-09-16 12:49:11 +0000 |
| 397 | +++ lib/lp/blueprints/model/specification.py 2012-09-20 17:34:56 +0000 |
| 398 | @@ -43,7 +43,13 @@ |
| 399 | from zope.event import notify |
| 400 | from zope.interface import implements |
| 401 | |
| 402 | +from lp.app.enums import ( |
| 403 | + InformationType, |
| 404 | + PRIVATE_INFORMATION_TYPES, |
| 405 | + PUBLIC_INFORMATION_TYPES, |
| 406 | + ) |
| 407 | from lp.app.errors import UserCannotUnsubscribePerson |
| 408 | +from lp.app.interfaces.informationtype import IInformationType |
| 409 | from lp.blueprints.adapters import SpecificationDelta |
| 410 | from lp.blueprints.enums import ( |
| 411 | NewSpecificationDefinitionStatus, |
| 412 | @@ -75,16 +81,10 @@ |
| 413 | from lp.bugs.interfaces.bugtaskfilter import filter_bugtasks_by_context |
| 414 | from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams |
| 415 | from lp.bugs.model.buglinktarget import BugLinkTargetMixin |
| 416 | -from lp.registry.enums import ( |
| 417 | - InformationType, |
| 418 | - PRIVATE_INFORMATION_TYPES, |
| 419 | - PUBLIC_INFORMATION_TYPES, |
| 420 | - SpecificationSharingPolicy, |
| 421 | - ) |
| 422 | +from lp.registry.enums import SpecificationSharingPolicy |
| 423 | from lp.registry.errors import CannotChangeInformationType |
| 424 | from lp.registry.interfaces.distribution import IDistribution |
| 425 | from lp.registry.interfaces.distroseries import IDistroSeries |
| 426 | -from lp.registry.interfaces.informationtype import IInformationType |
| 427 | from lp.registry.interfaces.person import validate_public_person |
| 428 | from lp.registry.interfaces.product import IProduct |
| 429 | from lp.registry.interfaces.productseries import IProductSeries |
| 430 | |
| 431 | === modified file 'lib/lp/blueprints/model/tests/test_specification.py' |
| 432 | --- lib/lp/blueprints/model/tests/test_specification.py 2012-09-14 17:47:45 +0000 |
| 433 | +++ lib/lp/blueprints/model/tests/test_specification.py 2012-09-20 17:34:56 +0000 |
| 434 | @@ -18,16 +18,14 @@ |
| 435 | from zope.security.interfaces import Unauthorized |
| 436 | from zope.security.proxy import removeSecurityProxy |
| 437 | |
| 438 | +from lp.app.enums import InformationType |
| 439 | from lp.app.validators import LaunchpadValidationError |
| 440 | from lp.blueprints.interfaces.specification import ISpecification |
| 441 | from lp.blueprints.interfaces.specificationworkitem import ( |
| 442 | SpecificationWorkItemStatus, |
| 443 | ) |
| 444 | from lp.blueprints.model.specificationworkitem import SpecificationWorkItem |
| 445 | -from lp.registry.enums import ( |
| 446 | - InformationType, |
| 447 | - SpecificationSharingPolicy, |
| 448 | - ) |
| 449 | +from lp.registry.enums import SpecificationSharingPolicy |
| 450 | from lp.registry.errors import CannotChangeInformationType |
| 451 | from lp.registry.model.milestone import Milestone |
| 452 | from lp.services.mail import stub |
| 453 | |
| 454 | === modified file 'lib/lp/blueprints/tests/test_specification.py' |
| 455 | --- lib/lp/blueprints/tests/test_specification.py 2012-09-11 14:06:21 +0000 |
| 456 | +++ lib/lp/blueprints/tests/test_specification.py 2012-09-20 17:34:56 +0000 |
| 457 | @@ -17,6 +17,11 @@ |
| 458 | from zope.security.interfaces import Unauthorized |
| 459 | from zope.security.proxy import removeSecurityProxy |
| 460 | |
| 461 | +from lp.app.enums import ( |
| 462 | + InformationType, |
| 463 | + PRIVATE_INFORMATION_TYPES, |
| 464 | + PUBLIC_INFORMATION_TYPES, |
| 465 | + ) |
| 466 | from lp.app.interfaces.security import IAuthorization |
| 467 | from lp.app.interfaces.services import IService |
| 468 | from lp.blueprints.enums import ( |
| 469 | @@ -26,12 +31,7 @@ |
| 470 | ) |
| 471 | from lp.blueprints.errors import TargetAlreadyHasSpecification |
| 472 | from lp.blueprints.interfaces.specification import ISpecificationSet |
| 473 | -from lp.registry.enums import ( |
| 474 | - InformationType, |
| 475 | - PRIVATE_INFORMATION_TYPES, |
| 476 | - PUBLIC_INFORMATION_TYPES, |
| 477 | - SharingPermission, |
| 478 | - ) |
| 479 | +from lp.registry.enums import SharingPermission |
| 480 | from lp.security import ( |
| 481 | AdminSpecification, |
| 482 | EditSpecificationByRelatedPeople, |
| 483 | |
| 484 | === modified file 'lib/lp/bugs/adapters/bug.py' |
| 485 | --- lib/lp/bugs/adapters/bug.py 2012-07-17 06:34:59 +0000 |
| 486 | +++ lib/lp/bugs/adapters/bug.py 2012-09-20 17:34:56 +0000 |
| 487 | @@ -13,7 +13,7 @@ |
| 488 | from lazr.restful.interfaces import IEntry |
| 489 | from zope.component import getMultiAdapter |
| 490 | |
| 491 | -from lp.registry.enums import InformationType |
| 492 | +from lp.app.enums import InformationType |
| 493 | |
| 494 | |
| 495 | def bugcomment_to_entry(comment, version): |
| 496 | |
| 497 | === modified file 'lib/lp/bugs/browser/bug.py' |
| 498 | --- lib/lp/bugs/browser/bug.py 2012-09-12 02:22:43 +0000 |
| 499 | +++ lib/lp/bugs/browser/bug.py 2012-09-20 17:34:56 +0000 |
| 500 | @@ -71,8 +71,10 @@ |
| 501 | LaunchpadEditFormView, |
| 502 | LaunchpadFormView, |
| 503 | ) |
| 504 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 505 | from lp.app.errors import NotFoundError |
| 506 | from lp.app.interfaces.services import IService |
| 507 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 508 | from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription |
| 509 | from lp.app.widgets.product import GhostCheckBoxWidget |
| 510 | from lp.app.widgets.project import ProjectScopeWidget |
| 511 | @@ -103,9 +105,7 @@ |
| 512 | from lp.bugs.model.structuralsubscription import ( |
| 513 | get_structural_subscriptions_for_bug, |
| 514 | ) |
| 515 | -from lp.registry.enums import PRIVATE_INFORMATION_TYPES |
| 516 | from lp.registry.interfaces.person import IPersonSet |
| 517 | -from lp.registry.vocabularies import InformationTypeVocabulary |
| 518 | from lp.services.fields import DuplicateBug |
| 519 | from lp.services.librarian.browser import ProxiedLibraryFileAlias |
| 520 | from lp.services.mail.mailwrapper import MailWrapper |
| 521 | |
| 522 | === modified file 'lib/lp/bugs/browser/bugtarget.py' |
| 523 | --- lib/lp/bugs/browser/bugtarget.py 2012-09-14 00:59:44 +0000 |
| 524 | +++ lib/lp/bugs/browser/bugtarget.py 2012-09-20 17:34:56 +0000 |
| 525 | @@ -60,7 +60,13 @@ |
| 526 | ) |
| 527 | from lp.app.browser.lazrjs import vocabulary_to_choice_edit_items |
| 528 | from lp.app.browser.stringformatter import FormattersAPI |
| 529 | -from lp.app.enums import ServiceUsage |
| 530 | +from lp.app.enums import ( |
| 531 | + InformationType, |
| 532 | + PRIVATE_INFORMATION_TYPES, |
| 533 | + PUBLIC_INFORMATION_TYPES, |
| 534 | + SECURITY_INFORMATION_TYPES, |
| 535 | + ServiceUsage, |
| 536 | + ) |
| 537 | from lp.app.errors import ( |
| 538 | NotFoundError, |
| 539 | UnexpectedFormData, |
| 540 | @@ -69,7 +75,9 @@ |
| 541 | ILaunchpadCelebrities, |
| 542 | ILaunchpadUsage, |
| 543 | ) |
| 544 | +from lp.app.utilities import json_dump_information_types |
| 545 | from lp.app.validators.name import valid_name_pattern |
| 546 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 547 | from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription |
| 548 | from lp.app.widgets.product import ( |
| 549 | GhostCheckBoxWidget, |
| 550 | @@ -115,13 +123,6 @@ |
| 551 | ProductConfigureBase, |
| 552 | ProductPrivateBugsMixin, |
| 553 | ) |
| 554 | -from lp.registry.enums import ( |
| 555 | - json_dump_information_types, |
| 556 | - InformationType, |
| 557 | - PRIVATE_INFORMATION_TYPES, |
| 558 | - PUBLIC_INFORMATION_TYPES, |
| 559 | - SECURITY_INFORMATION_TYPES, |
| 560 | - ) |
| 561 | from lp.registry.interfaces.distribution import IDistribution |
| 562 | from lp.registry.interfaces.distributionsourcepackage import ( |
| 563 | IDistributionSourcePackage, |
| 564 | @@ -132,10 +133,7 @@ |
| 565 | from lp.registry.interfaces.productseries import IProductSeries |
| 566 | from lp.registry.interfaces.projectgroup import IProjectGroup |
| 567 | from lp.registry.interfaces.sourcepackage import ISourcePackage |
| 568 | -from lp.registry.vocabularies import ( |
| 569 | - InformationTypeVocabulary, |
| 570 | - ValidPersonOrTeamVocabulary, |
| 571 | - ) |
| 572 | +from lp.registry.vocabularies import ValidPersonOrTeamVocabulary |
| 573 | from lp.services.config import config |
| 574 | from lp.services.job.interfaces.job import JobStatus |
| 575 | from lp.services.librarian.browser import ProxiedLibraryFileAlias |
| 576 | |
| 577 | === modified file 'lib/lp/bugs/browser/bugtask.py' |
| 578 | --- lib/lp/bugs/browser/bugtask.py 2012-08-30 12:22:35 +0000 |
| 579 | +++ lib/lp/bugs/browser/bugtask.py 2012-09-20 17:34:56 +0000 |
| 580 | @@ -137,7 +137,11 @@ |
| 581 | PersonFormatterAPI, |
| 582 | ) |
| 583 | from lp.app.browser.vocabulary import vocabulary_filters |
| 584 | -from lp.app.enums import ServiceUsage |
| 585 | +from lp.app.enums import ( |
| 586 | + InformationType, |
| 587 | + PROPRIETARY_INFORMATION_TYPES, |
| 588 | + ServiceUsage, |
| 589 | + ) |
| 590 | from lp.app.errors import ( |
| 591 | NotFoundError, |
| 592 | UnexpectedFormData, |
| 593 | @@ -146,6 +150,7 @@ |
| 594 | ILaunchpadCelebrities, |
| 595 | IServiceUsage, |
| 596 | ) |
| 597 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 598 | from lp.app.widgets.itemswidgets import LabeledMultiCheckBoxWidget |
| 599 | from lp.app.widgets.popup import PersonPickerWidget |
| 600 | from lp.app.widgets.project import ProjectScopeWidget |
| 601 | @@ -222,10 +227,6 @@ |
| 602 | from lp.bugs.model.bugtasksearch import orderby_expression |
| 603 | from lp.code.interfaces.branchcollection import IAllBranches |
| 604 | from lp.layers import FeedsLayer |
| 605 | -from lp.registry.enums import ( |
| 606 | - InformationType, |
| 607 | - PROPRIETARY_INFORMATION_TYPES, |
| 608 | - ) |
| 609 | from lp.registry.interfaces.distribution import ( |
| 610 | IDistribution, |
| 611 | IDistributionSet, |
| 612 | @@ -246,10 +247,7 @@ |
| 613 | from lp.registry.interfaces.projectgroup import IProjectGroup |
| 614 | from lp.registry.interfaces.sourcepackage import ISourcePackage |
| 615 | from lp.registry.model.personroles import PersonRoles |
| 616 | -from lp.registry.vocabularies import ( |
| 617 | - InformationTypeVocabulary, |
| 618 | - MilestoneVocabulary, |
| 619 | - ) |
| 620 | +from lp.registry.vocabularies import MilestoneVocabulary |
| 621 | from lp.services.config import config |
| 622 | from lp.services.features import getFeatureFlag |
| 623 | from lp.services.feeds.browser import ( |
| 624 | |
| 625 | === modified file 'lib/lp/bugs/browser/structuralsubscription.py' |
| 626 | --- lib/lp/bugs/browser/structuralsubscription.py 2012-09-07 20:25:51 +0000 |
| 627 | +++ lib/lp/bugs/browser/structuralsubscription.py 2012-09-20 17:34:56 +0000 |
| 628 | @@ -40,7 +40,10 @@ |
| 629 | custom_widget, |
| 630 | LaunchpadFormView, |
| 631 | ) |
| 632 | -from lp.app.enums import ServiceUsage |
| 633 | +from lp.app.enums import ( |
| 634 | + InformationType, |
| 635 | + ServiceUsage, |
| 636 | + ) |
| 637 | from lp.app.widgets.itemswidgets import LabeledMultiCheckBoxWidget |
| 638 | from lp.bugs.interfaces.bugtask import ( |
| 639 | BugTaskImportance, |
| 640 | @@ -52,7 +55,6 @@ |
| 641 | IStructuralSubscriptionTarget, |
| 642 | IStructuralSubscriptionTargetHelper, |
| 643 | ) |
| 644 | -from lp.registry.enums import InformationType |
| 645 | from lp.registry.interfaces.distribution import IDistribution |
| 646 | from lp.registry.interfaces.distributionsourcepackage import ( |
| 647 | IDistributionSourcePackage, |
| 648 | |
| 649 | === modified file 'lib/lp/bugs/browser/tests/bugtask-search-views.txt' |
| 650 | --- lib/lp/bugs/browser/tests/bugtask-search-views.txt 2012-07-10 09:51:13 +0000 |
| 651 | +++ lib/lp/bugs/browser/tests/bugtask-search-views.txt 2012-09-20 17:34:56 +0000 |
| 652 | @@ -358,7 +358,7 @@ |
| 653 | First we'll change the information type of one of the bugtasks (we are still |
| 654 | logged in from earlier): |
| 655 | |
| 656 | - >>> from lp.registry.enums import InformationType |
| 657 | + >>> from lp.app.enums import InformationType |
| 658 | >>> previous_information_type = open_bugtasks[0].bug.information_type |
| 659 | >>> open_bugtasks[0].bug.transitionToInformationType( |
| 660 | ... InformationType.USERDATA, getUtility(ILaunchBag).user) |
| 661 | |
| 662 | === modified file 'lib/lp/bugs/browser/tests/test_bug_views.py' |
| 663 | --- lib/lp/bugs/browser/tests/test_bug_views.py 2012-09-10 06:45:22 +0000 |
| 664 | +++ lib/lp/bugs/browser/tests/test_bug_views.py 2012-09-20 17:34:56 +0000 |
| 665 | @@ -27,15 +27,13 @@ |
| 666 | from zope.component import getUtility |
| 667 | from zope.security.proxy import removeSecurityProxy |
| 668 | |
| 669 | +from lp.app.enums import InformationType |
| 670 | from lp.bugs.adapters.bugchange import BugAttachmentChange |
| 671 | -from lp.registry.enums import ( |
| 672 | - BugSharingPolicy, |
| 673 | - InformationType, |
| 674 | - ) |
| 675 | from lp.registry.interfaces.accesspolicy import ( |
| 676 | IAccessPolicyGrantSource, |
| 677 | IAccessPolicySource, |
| 678 | ) |
| 679 | +from lp.registry.enums import BugSharingPolicy |
| 680 | from lp.registry.interfaces.person import PersonVisibility |
| 681 | from lp.services.webapp.interfaces import IOpenLaunchBag |
| 682 | from lp.services.webapp.publisher import canonical_url |
| 683 | |
| 684 | === modified file 'lib/lp/bugs/browser/tests/test_bugcomment.py' |
| 685 | --- lib/lp/bugs/browser/tests/test_bugcomment.py 2012-07-24 20:10:02 +0000 |
| 686 | +++ lib/lp/bugs/browser/tests/test_bugcomment.py 2012-09-20 17:34:56 +0000 |
| 687 | @@ -19,6 +19,7 @@ |
| 688 | from zope.component import getUtility |
| 689 | from zope.security.proxy import removeSecurityProxy |
| 690 | |
| 691 | +from lp.app.enums import InformationType |
| 692 | from lp.bugs.browser.bugcomment import ( |
| 693 | BugComment, |
| 694 | group_comments_with_activity, |
| 695 | @@ -28,7 +29,6 @@ |
| 696 | TestHideMessageControlMixin, |
| 697 | TestMessageVisibilityMixin, |
| 698 | ) |
| 699 | -from lp.registry.enums import InformationType |
| 700 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 701 | from lp.services.webapp.publisher import canonical_url |
| 702 | from lp.services.webapp.testing import verifyObject |
| 703 | |
| 704 | === modified file 'lib/lp/bugs/browser/tests/test_bugs.py' |
| 705 | --- lib/lp/bugs/browser/tests/test_bugs.py 2012-08-30 23:50:35 +0000 |
| 706 | +++ lib/lp/bugs/browser/tests/test_bugs.py 2012-09-20 17:34:56 +0000 |
| 707 | @@ -9,13 +9,11 @@ |
| 708 | |
| 709 | from zope.component import getUtility |
| 710 | |
| 711 | +from lp.app.enums import InformationType |
| 712 | from lp.bugs.interfaces.bugtask import BugTaskStatus |
| 713 | from lp.bugs.interfaces.malone import IMaloneApplication |
| 714 | from lp.bugs.publisher import BugsLayer |
| 715 | -from lp.registry.enums import ( |
| 716 | - BugSharingPolicy, |
| 717 | - InformationType, |
| 718 | - ) |
| 719 | +from lp.registry.enums import BugSharingPolicy |
| 720 | from lp.registry.interfaces.product import License |
| 721 | from lp.services.webapp.publisher import canonical_url |
| 722 | from lp.testing import ( |
| 723 | |
| 724 | === modified file 'lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py' |
| 725 | --- lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py 2012-08-07 05:31:42 +0000 |
| 726 | +++ lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py 2012-09-20 17:34:56 +0000 |
| 727 | @@ -14,6 +14,7 @@ |
| 728 | from testtools.matchers import StartsWith |
| 729 | import transaction |
| 730 | |
| 731 | +from lp.app.enums import InformationType |
| 732 | from lp.bugs.browser.structuralsubscription import ( |
| 733 | StructuralSubscriptionNavigation, |
| 734 | ) |
| 735 | @@ -22,7 +23,6 @@ |
| 736 | BugTaskImportance, |
| 737 | BugTaskStatus, |
| 738 | ) |
| 739 | -from lp.registry.enums import InformationType |
| 740 | from lp.services.webapp.publisher import canonical_url |
| 741 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 742 | from lp.testing import ( |
| 743 | |
| 744 | === modified file 'lib/lp/bugs/browser/tests/test_bugtarget_filebug.py' |
| 745 | --- lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-09-13 16:36:54 +0000 |
| 746 | +++ lib/lp/bugs/browser/tests/test_bugtarget_filebug.py 2012-09-20 17:34:56 +0000 |
| 747 | @@ -14,6 +14,10 @@ |
| 748 | ) |
| 749 | from zope.security.proxy import removeSecurityProxy |
| 750 | |
| 751 | +from lp.app.enums import ( |
| 752 | + InformationType, |
| 753 | + PUBLIC_INFORMATION_TYPES, |
| 754 | + ) |
| 755 | from lp.bugs.browser.bugtarget import FileBugViewBase |
| 756 | from lp.bugs.interfaces.bug import ( |
| 757 | IBugAddForm, |
| 758 | @@ -24,12 +28,7 @@ |
| 759 | BugTaskStatus, |
| 760 | ) |
| 761 | from lp.bugs.publisher import BugsLayer |
| 762 | -from lp.registry.enums import ( |
| 763 | - BugSharingPolicy, |
| 764 | - InformationType, |
| 765 | - PRIVATE_INFORMATION_TYPES, |
| 766 | - PUBLIC_INFORMATION_TYPES, |
| 767 | - ) |
| 768 | +from lp.registry.enums import BugSharingPolicy |
| 769 | from lp.registry.interfaces.projectgroup import IProjectGroup |
| 770 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 771 | from lp.testing import ( |
| 772 | |
| 773 | === modified file 'lib/lp/bugs/browser/tests/test_bugtask.py' |
| 774 | --- lib/lp/bugs/browser/tests/test_bugtask.py 2012-09-20 03:59:54 +0000 |
| 775 | +++ lib/lp/bugs/browser/tests/test_bugtask.py 2012-09-20 17:34:56 +0000 |
| 776 | @@ -32,6 +32,7 @@ |
| 777 | from zope.interface import providedBy |
| 778 | from zope.security.proxy import removeSecurityProxy |
| 779 | |
| 780 | +from lp.app.enums import InformationType |
| 781 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 782 | from lp.bugs.adapters.bugchange import BugTaskStatusChange |
| 783 | from lp.bugs.browser.bugtask import ( |
| 784 | @@ -59,10 +60,7 @@ |
| 785 | FeedsLayer, |
| 786 | setFirstLayer, |
| 787 | ) |
| 788 | -from lp.registry.enums import ( |
| 789 | - BugSharingPolicy, |
| 790 | - InformationType, |
| 791 | - ) |
| 792 | +from lp.registry.enums import BugSharingPolicy |
| 793 | from lp.registry.interfaces.person import PersonVisibility |
| 794 | from lp.services.config import config |
| 795 | from lp.services.database.constants import UTC_NOW |
| 796 | |
| 797 | === modified file 'lib/lp/bugs/browser/tests/test_bugview.py' |
| 798 | --- lib/lp/bugs/browser/tests/test_bugview.py 2012-09-13 14:46:33 +0000 |
| 799 | +++ lib/lp/bugs/browser/tests/test_bugview.py 2012-09-20 17:34:56 +0000 |
| 800 | @@ -6,11 +6,11 @@ |
| 801 | from lazr.restful.interfaces import IJSONRequestCache |
| 802 | from zope.security.proxy import removeSecurityProxy |
| 803 | |
| 804 | +from lp.app.enums import InformationType |
| 805 | from lp.bugs.browser.bug import ( |
| 806 | BugInformationTypePortletView, |
| 807 | BugView, |
| 808 | ) |
| 809 | -from lp.registry.enums import InformationType |
| 810 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 811 | from lp.testing import ( |
| 812 | login, |
| 813 | |
| 814 | === modified file 'lib/lp/bugs/doc/bug-private-by-default.txt' |
| 815 | --- lib/lp/bugs/doc/bug-private-by-default.txt 2012-09-07 20:15:30 +0000 |
| 816 | +++ lib/lp/bugs/doc/bug-private-by-default.txt 2012-09-20 17:34:56 +0000 |
| 817 | @@ -5,7 +5,7 @@ |
| 818 | (this is enforced by a DB constraint). |
| 819 | |
| 820 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
| 821 | - >>> from lp.registry.enums import InformationType |
| 822 | + >>> from lp.app.enums import InformationType |
| 823 | >>> from lp.registry.interfaces.person import IPersonSet |
| 824 | >>> from lp.registry.interfaces.product import IProductSet |
| 825 | >>> from lp.testing.dbuser import switch_dbuser |
| 826 | |
| 827 | === modified file 'lib/lp/bugs/doc/bug.txt' |
| 828 | --- lib/lp/bugs/doc/bug.txt 2012-08-30 06:18:38 +0000 |
| 829 | +++ lib/lp/bugs/doc/bug.txt 2012-09-20 17:34:56 +0000 |
| 830 | @@ -90,7 +90,7 @@ |
| 831 | The event can be seen when we file a bug. |
| 832 | |
| 833 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
| 834 | - >>> from lp.registry.enums import InformationType |
| 835 | + >>> from lp.app.enums import InformationType |
| 836 | |
| 837 | >>> steve_harris = factory.makePerson(name='steve-harris') |
| 838 | >>> jukebox = factory.makeProduct() |
| 839 | |
| 840 | === modified file 'lib/lp/bugs/doc/bugattachments.txt' |
| 841 | --- lib/lp/bugs/doc/bugattachments.txt 2012-08-07 02:31:56 +0000 |
| 842 | +++ lib/lp/bugs/doc/bugattachments.txt 2012-09-20 17:34:56 +0000 |
| 843 | @@ -613,7 +613,7 @@ |
| 844 | If an attachment is added to a private bug, the "restricted" flag of |
| 845 | its Librarian file is set. |
| 846 | |
| 847 | - >>> from lp.registry.enums import InformationType |
| 848 | + >>> from lp.app.enums import InformationType |
| 849 | >>> private_bug_owner = factory.makePerson() |
| 850 | >>> ignored = login_person(private_bug_owner) |
| 851 | >>> private_bug = factory.makeBug( |
| 852 | |
| 853 | === modified file 'lib/lp/bugs/doc/bugnotification-email.txt' |
| 854 | --- lib/lp/bugs/doc/bugnotification-email.txt 2012-07-17 06:34:59 +0000 |
| 855 | +++ lib/lp/bugs/doc/bugnotification-email.txt 2012-09-20 17:34:56 +0000 |
| 856 | @@ -36,7 +36,7 @@ |
| 857 | ... IBugDelta, |
| 858 | ... IBugSet, |
| 859 | ... ) |
| 860 | - >>> from lp.registry.enums import InformationType |
| 861 | + >>> from lp.app.enums import InformationType |
| 862 | >>> from lp.registry.interfaces.person import IPersonSet |
| 863 | |
| 864 | |
| 865 | |
| 866 | === modified file 'lib/lp/bugs/doc/bugnotification-sending.txt' |
| 867 | --- lib/lp/bugs/doc/bugnotification-sending.txt 2012-08-23 04:20:48 +0000 |
| 868 | +++ lib/lp/bugs/doc/bugnotification-sending.txt 2012-09-20 17:34:56 +0000 |
| 869 | @@ -336,7 +336,7 @@ |
| 870 | We will need a fresh new bug. |
| 871 | |
| 872 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
| 873 | - >>> from lp.registry.enums import InformationType |
| 874 | + >>> from lp.app.enums import InformationType |
| 875 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
| 876 | >>> ubuntu = getUtility(IDistributionSet).getByName('ubuntu') |
| 877 | >>> description = getUtility(IMessageSet).fromText( |
| 878 | |
| 879 | === modified file 'lib/lp/bugs/doc/bugsubscription.txt' |
| 880 | --- lib/lp/bugs/doc/bugsubscription.txt 2012-09-07 20:26:36 +0000 |
| 881 | +++ lib/lp/bugs/doc/bugsubscription.txt 2012-09-20 17:34:56 +0000 |
| 882 | @@ -48,7 +48,7 @@ |
| 883 | |
| 884 | >>> from lp.services.webapp.interfaces import ILaunchBag |
| 885 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
| 886 | - >>> from lp.registry.enums import InformationType |
| 887 | + >>> from lp.app.enums import InformationType |
| 888 | >>> from lp.registry.interfaces.distribution import IDistributionSet |
| 889 | >>> from lp.registry.interfaces.person import IPersonSet |
| 890 | >>> ubuntu = getUtility(IDistributionSet).getByName("ubuntu") |
| 891 | |
| 892 | === modified file 'lib/lp/bugs/doc/bugsummary.txt' |
| 893 | --- lib/lp/bugs/doc/bugsummary.txt 2012-08-13 19:34:10 +0000 |
| 894 | +++ lib/lp/bugs/doc/bugsummary.txt 2012-09-20 17:34:56 +0000 |
| 895 | @@ -442,7 +442,7 @@ |
| 896 | distribution task. Subscribed to by team_c. |
| 897 | - bug_z is public. |
| 898 | |
| 899 | - >>> from lp.registry.enums import InformationType |
| 900 | + >>> from lp.app.enums import InformationType |
| 901 | >>> distro_p = factory.makeDistribution(name='di-p') |
| 902 | >>> series_p = factory.makeDistroSeries( |
| 903 | ... distribution=distro_p, name='ds-p') |
| 904 | |
| 905 | === modified file 'lib/lp/bugs/interfaces/bug.py' |
| 906 | --- lib/lp/bugs/interfaces/bug.py 2012-09-07 20:25:51 +0000 |
| 907 | +++ lib/lp/bugs/interfaces/bug.py 2012-09-20 17:34:56 +0000 |
| 908 | @@ -66,6 +66,7 @@ |
| 909 | from zope.schema.vocabulary import SimpleVocabulary |
| 910 | |
| 911 | from lp import _ |
| 912 | +from lp.app.enums import InformationType |
| 913 | from lp.app.errors import NotFoundError |
| 914 | from lp.app.interfaces.launchpad import IPrivacy |
| 915 | from lp.app.validators.attachment import attachment_size_constraint |
| 916 | @@ -81,7 +82,6 @@ |
| 917 | from lp.bugs.interfaces.bugwatch import IBugWatch |
| 918 | from lp.bugs.interfaces.cve import ICve |
| 919 | from lp.code.interfaces.branchlink import IHasLinkedBranches |
| 920 | -from lp.registry.enums import InformationType |
| 921 | from lp.registry.interfaces.person import IPerson |
| 922 | from lp.services.fields import ( |
| 923 | BugField, |
| 924 | |
| 925 | === modified file 'lib/lp/bugs/interfaces/bugsubscriptionfilter.py' |
| 926 | --- lib/lp/bugs/interfaces/bugsubscriptionfilter.py 2012-08-02 04:46:31 +0000 |
| 927 | +++ lib/lp/bugs/interfaces/bugsubscriptionfilter.py 2012-09-20 17:34:56 +0000 |
| 928 | @@ -31,13 +31,13 @@ |
| 929 | ) |
| 930 | |
| 931 | from lp import _ |
| 932 | +from lp.app.enums import InformationType |
| 933 | from lp.bugs.enums import BugNotificationLevel |
| 934 | from lp.bugs.interfaces.bugtask import ( |
| 935 | BugTaskImportance, |
| 936 | BugTaskStatus, |
| 937 | ) |
| 938 | from lp.bugs.interfaces.structuralsubscription import IStructuralSubscription |
| 939 | -from lp.registry.enums import InformationType |
| 940 | from lp.services.fields import ( |
| 941 | PersonChoice, |
| 942 | SearchTag, |
| 943 | |
| 944 | === modified file 'lib/lp/bugs/interfaces/bugtarget.py' |
| 945 | --- lib/lp/bugs/interfaces/bugtarget.py 2012-08-31 02:24:18 +0000 |
| 946 | +++ lib/lp/bugs/interfaces/bugtarget.py 2012-09-20 17:34:56 +0000 |
| 947 | @@ -54,6 +54,11 @@ |
| 948 | ) |
| 949 | |
| 950 | from lp import _ |
| 951 | +from lp.app.enums import ( |
| 952 | + FREE_INFORMATION_TYPES, |
| 953 | + InformationType, |
| 954 | + NON_EMBARGOED_INFORMATION_TYPES, |
| 955 | + ) |
| 956 | from lp.bugs.interfaces.bugtask import IBugTask |
| 957 | from lp.bugs.interfaces.bugtasksearch import ( |
| 958 | BugBlueprintSearch, |
| 959 | @@ -61,12 +66,7 @@ |
| 960 | BugTagsSearchCombinator, |
| 961 | IBugTaskSearch, |
| 962 | ) |
| 963 | -from lp.registry.enums import ( |
| 964 | - BugSharingPolicy, |
| 965 | - FREE_INFORMATION_TYPES, |
| 966 | - InformationType, |
| 967 | - NON_EMBARGOED_INFORMATION_TYPES, |
| 968 | - ) |
| 969 | +from lp.registry.enums import BugSharingPolicy |
| 970 | from lp.services.fields import Tag |
| 971 | |
| 972 | |
| 973 | |
| 974 | === modified file 'lib/lp/bugs/interfaces/bugtasksearch.py' |
| 975 | --- lib/lp/bugs/interfaces/bugtasksearch.py 2012-08-07 03:47:15 +0000 |
| 976 | +++ lib/lp/bugs/interfaces/bugtasksearch.py 2012-09-20 17:34:56 +0000 |
| 977 | @@ -41,13 +41,13 @@ |
| 978 | from zope.security.proxy import isinstance as zope_isinstance |
| 979 | |
| 980 | from lp import _ |
| 981 | +from lp.app.enums import InformationType |
| 982 | from lp.bugs.interfaces.bugtask import ( |
| 983 | BugTaskStatusSearch, |
| 984 | BugTaskStatusSearchDisplay, |
| 985 | IBugTask, |
| 986 | UNRESOLVED_BUGTASK_STATUSES, |
| 987 | ) |
| 988 | -from lp.registry.enums import InformationType |
| 989 | from lp.services.fields import SearchTag |
| 990 | from lp.services.searchbuilder import ( |
| 991 | all, |
| 992 | |
| 993 | === modified file 'lib/lp/bugs/mail/bugnotificationbuilder.py' |
| 994 | --- lib/lp/bugs/mail/bugnotificationbuilder.py 2012-04-27 02:26:36 +0000 |
| 995 | +++ lib/lp/bugs/mail/bugnotificationbuilder.py 2012-09-20 17:34:56 +0000 |
| 996 | @@ -17,11 +17,11 @@ |
| 997 | |
| 998 | from zope.component import getUtility |
| 999 | |
| 1000 | -from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1001 | -from lp.registry.enums import ( |
| 1002 | +from lp.app.enums import ( |
| 1003 | PRIVATE_INFORMATION_TYPES, |
| 1004 | SECURITY_INFORMATION_TYPES, |
| 1005 | ) |
| 1006 | +from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1007 | from lp.services.config import config |
| 1008 | from lp.services.helpers import shortlist |
| 1009 | from lp.services.identity.interfaces.emailaddress import IEmailAddressSet |
| 1010 | |
| 1011 | === modified file 'lib/lp/bugs/mail/commands.py' |
| 1012 | --- lib/lp/bugs/mail/commands.py 2012-09-07 21:49:00 +0000 |
| 1013 | +++ lib/lp/bugs/mail/commands.py 2012-09-20 17:34:56 +0000 |
| 1014 | @@ -28,6 +28,10 @@ |
| 1015 | ValidationError, |
| 1016 | ) |
| 1017 | |
| 1018 | +from lp.app.enums import ( |
| 1019 | + InformationType, |
| 1020 | + PUBLIC_INFORMATION_TYPES, |
| 1021 | + ) |
| 1022 | from lp.app.errors import ( |
| 1023 | NotFoundError, |
| 1024 | UserCannotUnsubscribePerson, |
| 1025 | @@ -47,10 +51,6 @@ |
| 1026 | IllegalTarget, |
| 1027 | ) |
| 1028 | from lp.bugs.interfaces.cve import ICveSet |
| 1029 | -from lp.registry.enums import ( |
| 1030 | - InformationType, |
| 1031 | - PUBLIC_INFORMATION_TYPES, |
| 1032 | - ) |
| 1033 | from lp.registry.interfaces.distribution import IDistribution |
| 1034 | from lp.registry.interfaces.distributionsourcepackage import ( |
| 1035 | IDistributionSourcePackage, |
| 1036 | |
| 1037 | === modified file 'lib/lp/bugs/mail/tests/test_commands.py' |
| 1038 | --- lib/lp/bugs/mail/tests/test_commands.py 2012-08-30 05:48:03 +0000 |
| 1039 | +++ lib/lp/bugs/mail/tests/test_commands.py 2012-09-20 17:34:56 +0000 |
| 1040 | @@ -6,6 +6,7 @@ |
| 1041 | IObjectModifiedEvent, |
| 1042 | ) |
| 1043 | |
| 1044 | +from lp.app.enums import InformationType |
| 1045 | from lp.bugs.interfaces.bug import CreateBugParams |
| 1046 | from lp.bugs.mail.commands import ( |
| 1047 | AffectsEmailCommand, |
| 1048 | @@ -20,10 +21,7 @@ |
| 1049 | TagEmailCommand, |
| 1050 | UnsubscribeEmailCommand, |
| 1051 | ) |
| 1052 | -from lp.registry.enums import ( |
| 1053 | - BugSharingPolicy, |
| 1054 | - InformationType, |
| 1055 | - ) |
| 1056 | +from lp.registry.enums import BugSharingPolicy |
| 1057 | from lp.services.mail.interfaces import ( |
| 1058 | BugTargetNotFound, |
| 1059 | EmailProcessingError, |
| 1060 | |
| 1061 | === modified file 'lib/lp/bugs/mail/tests/test_handler.py' |
| 1062 | --- lib/lp/bugs/mail/tests/test_handler.py 2012-08-22 14:23:12 +0000 |
| 1063 | +++ lib/lp/bugs/mail/tests/test_handler.py 2012-09-20 17:34:56 +0000 |
| 1064 | @@ -16,6 +16,7 @@ |
| 1065 | ) |
| 1066 | from zope.security.proxy import removeSecurityProxy |
| 1067 | |
| 1068 | +from lp.app.enums import InformationType |
| 1069 | from lp.bugs.interfaces.bug import IBugSet |
| 1070 | from lp.bugs.mail.commands import ( |
| 1071 | BugEmailCommand, |
| 1072 | @@ -28,10 +29,7 @@ |
| 1073 | MaloneHandler, |
| 1074 | ) |
| 1075 | from lp.bugs.model.bugnotification import BugNotification |
| 1076 | -from lp.registry.enums import ( |
| 1077 | - BugSharingPolicy, |
| 1078 | - InformationType, |
| 1079 | - ) |
| 1080 | +from lp.registry.enums import BugSharingPolicy |
| 1081 | from lp.services.config import config |
| 1082 | from lp.services.identity.interfaces.emailaddress import EmailAddressStatus |
| 1083 | from lp.services.mail import stub |
| 1084 | |
| 1085 | === modified file 'lib/lp/bugs/model/bug.py' |
| 1086 | --- lib/lp/bugs/model/bug.py 2012-09-18 21:56:29 +0000 |
| 1087 | +++ lib/lp/bugs/model/bug.py 2012-09-20 17:34:56 +0000 |
| 1088 | @@ -78,8 +78,14 @@ |
| 1089 | removeSecurityProxy, |
| 1090 | ) |
| 1091 | |
| 1092 | +from lp.app.enums import ( |
| 1093 | + InformationType, |
| 1094 | + PRIVATE_INFORMATION_TYPES, |
| 1095 | + PROPRIETARY_INFORMATION_TYPES, |
| 1096 | + SECURITY_INFORMATION_TYPES, |
| 1097 | + ServiceUsage, |
| 1098 | + ) |
| 1099 | from lp.answers.interfaces.questiontarget import IQuestionTarget |
| 1100 | -from lp.app.enums import ServiceUsage |
| 1101 | from lp.app.errors import ( |
| 1102 | NotFoundError, |
| 1103 | SubscriptionPrivacyViolation, |
| 1104 | @@ -154,12 +160,6 @@ |
| 1105 | ) |
| 1106 | from lp.code.interfaces.branchcollection import IAllBranches |
| 1107 | from lp.hardwaredb.interfaces.hwdb import IHWSubmissionBugSet |
| 1108 | -from lp.registry.enums import ( |
| 1109 | - InformationType, |
| 1110 | - PRIVATE_INFORMATION_TYPES, |
| 1111 | - PROPRIETARY_INFORMATION_TYPES, |
| 1112 | - SECURITY_INFORMATION_TYPES, |
| 1113 | - ) |
| 1114 | from lp.registry.errors import CannotChangeInformationType |
| 1115 | from lp.registry.interfaces.accesspolicy import ( |
| 1116 | IAccessArtifactGrantSource, |
| 1117 | |
| 1118 | === modified file 'lib/lp/bugs/model/bugsubscriptionfilter.py' |
| 1119 | --- lib/lp/bugs/model/bugsubscriptionfilter.py 2012-09-19 05:10:03 +0000 |
| 1120 | +++ lib/lp/bugs/model/bugsubscriptionfilter.py 2012-09-20 17:34:56 +0000 |
| 1121 | @@ -27,6 +27,7 @@ |
| 1122 | ) |
| 1123 | from zope.interface import implements |
| 1124 | |
| 1125 | +from lp.app.enums import InformationType |
| 1126 | from lp.bugs.enums import BugNotificationLevel |
| 1127 | from lp.bugs.interfaces.bugsubscriptionfilter import ( |
| 1128 | IBugSubscriptionFilter, |
| 1129 | @@ -36,7 +37,6 @@ |
| 1130 | BugTaskImportance, |
| 1131 | BugTaskStatus, |
| 1132 | ) |
| 1133 | -from lp.registry.enums import InformationType |
| 1134 | from lp.registry.interfaces.person import validate_person |
| 1135 | from lp.services import searchbuilder |
| 1136 | from lp.services.database.constants import UTC_NOW |
| 1137 | |
| 1138 | === modified file 'lib/lp/bugs/model/bugtask.py' |
| 1139 | --- lib/lp/bugs/model/bugtask.py 2012-09-11 23:40:12 +0000 |
| 1140 | +++ lib/lp/bugs/model/bugtask.py 2012-09-20 17:34:56 +0000 |
| 1141 | @@ -67,7 +67,10 @@ |
| 1142 | ) |
| 1143 | from zope.security.proxy import removeSecurityProxy |
| 1144 | |
| 1145 | -from lp.app.enums import ServiceUsage |
| 1146 | +from lp.app.enums import ( |
| 1147 | + PROPRIETARY_INFORMATION_TYPES, |
| 1148 | + PUBLIC_INFORMATION_TYPES, |
| 1149 | + ) |
| 1150 | from lp.app.errors import NotFoundError |
| 1151 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1152 | from lp.bugs.interfaces.bug import IBugSet |
| 1153 | @@ -93,10 +96,6 @@ |
| 1154 | UserCannotEditBugTaskStatus, |
| 1155 | ) |
| 1156 | from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams |
| 1157 | -from lp.registry.enums import ( |
| 1158 | - PROPRIETARY_INFORMATION_TYPES, |
| 1159 | - PUBLIC_INFORMATION_TYPES, |
| 1160 | - ) |
| 1161 | from lp.registry.interfaces.distribution import ( |
| 1162 | IDistribution, |
| 1163 | IDistributionSet, |
| 1164 | |
| 1165 | === modified file 'lib/lp/bugs/model/bugtaskflat.py' |
| 1166 | --- lib/lp/bugs/model/bugtaskflat.py 2012-07-24 07:24:58 +0000 |
| 1167 | +++ lib/lp/bugs/model/bugtaskflat.py 2012-09-20 17:34:56 +0000 |
| 1168 | @@ -12,12 +12,12 @@ |
| 1169 | Storm, |
| 1170 | ) |
| 1171 | |
| 1172 | +from lp.app.enums import InformationType |
| 1173 | from lp.bugs.interfaces.bugtask import ( |
| 1174 | BugTaskImportance, |
| 1175 | BugTaskStatus, |
| 1176 | BugTaskStatusSearch, |
| 1177 | ) |
| 1178 | -from lp.registry.enums import InformationType |
| 1179 | from lp.services.database.enumcol import EnumCol |
| 1180 | |
| 1181 | |
| 1182 | |
| 1183 | === modified file 'lib/lp/bugs/model/bugtasksearch.py' |
| 1184 | --- lib/lp/bugs/model/bugtasksearch.py 2012-09-17 07:50:51 +0000 |
| 1185 | +++ lib/lp/bugs/model/bugtasksearch.py 2012-09-20 17:34:56 +0000 |
| 1186 | @@ -38,6 +38,7 @@ |
| 1187 | removeSecurityProxy, |
| 1188 | ) |
| 1189 | |
| 1190 | +from lp.app.enums import PUBLIC_INFORMATION_TYPES |
| 1191 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1192 | from lp.blueprints.model.specification import Specification |
| 1193 | from lp.blueprints.model.specificationbug import SpecificationBug |
| 1194 | @@ -68,7 +69,6 @@ |
| 1195 | from lp.bugs.model.bugtask import BugTask |
| 1196 | from lp.bugs.model.bugtaskflat import BugTaskFlat |
| 1197 | from lp.bugs.model.structuralsubscription import StructuralSubscription |
| 1198 | -from lp.registry.enums import PUBLIC_INFORMATION_TYPES |
| 1199 | from lp.registry.interfaces.distribution import IDistribution |
| 1200 | from lp.registry.interfaces.distroseries import IDistroSeries |
| 1201 | from lp.registry.interfaces.milestone import IProjectGroupMilestone |
| 1202 | |
| 1203 | === modified file 'lib/lp/bugs/model/tests/test_bug.py' |
| 1204 | --- lib/lp/bugs/model/tests/test_bug.py 2012-09-18 16:07:51 +0000 |
| 1205 | +++ lib/lp/bugs/model/tests/test_bug.py 2012-09-20 17:34:56 +0000 |
| 1206 | @@ -14,6 +14,7 @@ |
| 1207 | from zope.component import getUtility |
| 1208 | from zope.security.proxy import removeSecurityProxy |
| 1209 | |
| 1210 | +from lp.app.enums import InformationType |
| 1211 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1212 | from lp.bugs.adapters.bugchange import BugTitleChange |
| 1213 | from lp.bugs.enums import ( |
| 1214 | @@ -27,10 +28,7 @@ |
| 1215 | BugNotification, |
| 1216 | BugSubscriptionInfo, |
| 1217 | ) |
| 1218 | -from lp.registry.enums import ( |
| 1219 | - BugSharingPolicy, |
| 1220 | - InformationType, |
| 1221 | - ) |
| 1222 | +from lp.registry.enums import BugSharingPolicy |
| 1223 | from lp.registry.errors import CannotChangeInformationType |
| 1224 | from lp.registry.interfaces.accesspolicy import ( |
| 1225 | IAccessArtifactSource, |
| 1226 | |
| 1227 | === modified file 'lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py' |
| 1228 | --- lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py 2012-08-02 01:52:08 +0000 |
| 1229 | +++ lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py 2012-09-20 17:34:56 +0000 |
| 1230 | @@ -12,6 +12,7 @@ |
| 1231 | removeSecurityProxy, |
| 1232 | ) |
| 1233 | |
| 1234 | +from lp.app.enums import InformationType |
| 1235 | from lp.bugs.enums import BugNotificationLevel |
| 1236 | from lp.bugs.interfaces.bugtask import ( |
| 1237 | BugTaskImportance, |
| 1238 | @@ -24,7 +25,6 @@ |
| 1239 | BugSubscriptionFilterStatus, |
| 1240 | BugSubscriptionFilterTag, |
| 1241 | ) |
| 1242 | -from lp.registry.enums import InformationType |
| 1243 | from lp.services import searchbuilder |
| 1244 | from lp.services.database.lpstorm import IStore |
| 1245 | from lp.testing import ( |
| 1246 | |
| 1247 | === modified file 'lib/lp/bugs/model/tests/test_bugsummary.py' |
| 1248 | --- lib/lp/bugs/model/tests/test_bugsummary.py 2012-08-24 05:09:51 +0000 |
| 1249 | +++ lib/lp/bugs/model/tests/test_bugsummary.py 2012-09-20 17:34:56 +0000 |
| 1250 | @@ -11,6 +11,7 @@ |
| 1251 | from zope.component import getUtility |
| 1252 | from zope.security.proxy import removeSecurityProxy |
| 1253 | |
| 1254 | +from lp.app.enums import InformationType |
| 1255 | from lp.app.interfaces.services import IService |
| 1256 | from lp.bugs.interfaces.bugsummary import IBugSummary |
| 1257 | from lp.bugs.interfaces.bugtask import ( |
| 1258 | @@ -23,10 +24,7 @@ |
| 1259 | get_bugsummary_filter_for_user, |
| 1260 | ) |
| 1261 | from lp.bugs.model.bugtask import BugTask |
| 1262 | -from lp.registry.enums import ( |
| 1263 | - InformationType, |
| 1264 | - SharingPermission, |
| 1265 | - ) |
| 1266 | +from lp.registry.enums import SharingPermission |
| 1267 | from lp.services.database.lpstorm import IMasterStore |
| 1268 | from lp.testing import TestCaseWithFactory |
| 1269 | from lp.testing.dbuser import switch_dbuser |
| 1270 | |
| 1271 | === modified file 'lib/lp/bugs/model/tests/test_bugtask.py' |
| 1272 | --- lib/lp/bugs/model/tests/test_bugtask.py 2012-09-12 00:56:03 +0000 |
| 1273 | +++ lib/lp/bugs/model/tests/test_bugtask.py 2012-09-20 17:34:56 +0000 |
| 1274 | @@ -22,7 +22,10 @@ |
| 1275 | from zope.security.interfaces import Unauthorized as ZopeUnAuthorized |
| 1276 | from zope.security.proxy import removeSecurityProxy |
| 1277 | |
| 1278 | -from lp.app.enums import ServiceUsage |
| 1279 | +from lp.app.enums import ( |
| 1280 | + InformationType, |
| 1281 | + ServiceUsage, |
| 1282 | + ) |
| 1283 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1284 | from lp.blueprints.interfaces.specification import ISpecificationSet |
| 1285 | from lp.bugs.interfaces.bug import ( |
| 1286 | @@ -57,7 +60,6 @@ |
| 1287 | from lp.bugs.tests.bug import create_old_bug |
| 1288 | from lp.registry.enums import ( |
| 1289 | BugSharingPolicy, |
| 1290 | - InformationType, |
| 1291 | TeamMembershipPolicy, |
| 1292 | ) |
| 1293 | from lp.registry.interfaces.accesspolicy import ( |
| 1294 | |
| 1295 | === modified file 'lib/lp/bugs/model/tests/test_bugtasksearch.py' |
| 1296 | --- lib/lp/bugs/model/tests/test_bugtasksearch.py 2012-09-18 04:30:42 +0000 |
| 1297 | +++ lib/lp/bugs/model/tests/test_bugtasksearch.py 2012-09-20 17:34:56 +0000 |
| 1298 | @@ -17,6 +17,7 @@ |
| 1299 | from zope.component import getUtility |
| 1300 | from zope.security.proxy import removeSecurityProxy |
| 1301 | |
| 1302 | +from lp.app.enums import InformationType |
| 1303 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1304 | from lp.app.interfaces.services import IService |
| 1305 | from lp.bugs.errors import InvalidSearchParameters |
| 1306 | @@ -47,10 +48,7 @@ |
| 1307 | HWBus, |
| 1308 | IHWDeviceSet, |
| 1309 | ) |
| 1310 | -from lp.registry.enums import ( |
| 1311 | - InformationType, |
| 1312 | - SharingPermission, |
| 1313 | - ) |
| 1314 | +from lp.registry.enums import SharingPermission |
| 1315 | from lp.registry.interfaces.distribution import ( |
| 1316 | IDistribution, |
| 1317 | IDistributionSet, |
| 1318 | |
| 1319 | === modified file 'lib/lp/bugs/scripts/bugsummaryrebuild.py' |
| 1320 | --- lib/lp/bugs/scripts/bugsummaryrebuild.py 2012-07-30 01:56:54 +0000 |
| 1321 | +++ lib/lp/bugs/scripts/bugsummaryrebuild.py 2012-09-20 17:34:56 +0000 |
| 1322 | @@ -17,6 +17,10 @@ |
| 1323 | from storm.properties import Bool |
| 1324 | import transaction |
| 1325 | |
| 1326 | +from lp.app.enums import ( |
| 1327 | + PRIVATE_INFORMATION_TYPES, |
| 1328 | + PUBLIC_INFORMATION_TYPES, |
| 1329 | + ) |
| 1330 | from lp.bugs.model.bug import BugTag |
| 1331 | from lp.bugs.model.bugsummary import BugSummary |
| 1332 | from lp.bugs.model.bugtask import ( |
| 1333 | @@ -25,10 +29,6 @@ |
| 1334 | BugTask, |
| 1335 | ) |
| 1336 | from lp.bugs.model.bugtaskflat import BugTaskFlat |
| 1337 | -from lp.registry.enums import ( |
| 1338 | - PRIVATE_INFORMATION_TYPES, |
| 1339 | - PUBLIC_INFORMATION_TYPES, |
| 1340 | - ) |
| 1341 | from lp.registry.interfaces.distribution import IDistribution |
| 1342 | from lp.registry.interfaces.distroseries import IDistroSeries |
| 1343 | from lp.registry.interfaces.series import ISeriesMixin |
| 1344 | |
| 1345 | === modified file 'lib/lp/bugs/scripts/tests/test_bugnotification.py' |
| 1346 | --- lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-08-08 11:48:29 +0000 |
| 1347 | +++ lib/lp/bugs/scripts/tests/test_bugnotification.py 2012-09-20 17:34:56 +0000 |
| 1348 | @@ -23,6 +23,7 @@ |
| 1349 | ) |
| 1350 | from zope.interface import implements |
| 1351 | |
| 1352 | +from lp.app.enums import InformationType |
| 1353 | from lp.bugs.adapters.bugchange import ( |
| 1354 | BranchLinkedToBug, |
| 1355 | BranchUnlinkedFromBug, |
| 1356 | @@ -63,7 +64,6 @@ |
| 1357 | notification_comment_batches, |
| 1358 | process_deferred_notifications, |
| 1359 | ) |
| 1360 | -from lp.registry.enums import InformationType |
| 1361 | from lp.registry.interfaces.person import IPersonSet |
| 1362 | from lp.registry.interfaces.product import IProductSet |
| 1363 | from lp.services.config import config |
| 1364 | |
| 1365 | === modified file 'lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py' |
| 1366 | --- lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py 2012-08-08 11:48:29 +0000 |
| 1367 | +++ lib/lp/bugs/scripts/tests/test_bugsummaryrebuild.py 2012-09-20 17:34:56 +0000 |
| 1368 | @@ -8,6 +8,7 @@ |
| 1369 | import transaction |
| 1370 | from zope.component import getUtility |
| 1371 | |
| 1372 | +from lp.app.enums import InformationType |
| 1373 | from lp.bugs.interfaces.bugtask import ( |
| 1374 | BugTaskImportance, |
| 1375 | BugTaskStatus, |
| 1376 | @@ -25,7 +26,6 @@ |
| 1377 | RawBugSummary, |
| 1378 | rebuild_bugsummary_for_target, |
| 1379 | ) |
| 1380 | -from lp.registry.enums import InformationType |
| 1381 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 1382 | from lp.services.database.lpstorm import IStore |
| 1383 | from lp.services.log.logger import BufferLogger |
| 1384 | |
| 1385 | === modified file 'lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt' |
| 1386 | --- lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2012-08-30 05:17:23 +0000 |
| 1387 | +++ lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt 2012-09-20 17:34:56 +0000 |
| 1388 | @@ -206,7 +206,8 @@ |
| 1389 | >>> from lp.services.webapp import canonical_url |
| 1390 | >>> from lp.services.webapp.interfaces import ILaunchBag |
| 1391 | >>> from lp.bugs.interfaces.bug import CreateBugParams |
| 1392 | - >>> from lp.registry.enums import BugSharingPolicy, InformationType |
| 1393 | + >>> from lp.app.enums import InformationType |
| 1394 | + >>> from lp.registry.enums import BugSharingPolicy |
| 1395 | |
| 1396 | >>> def current_user(): |
| 1397 | ... return getUtility(ILaunchBag).user |
| 1398 | |
| 1399 | === modified file 'lib/lp/bugs/tests/test_bug_messages.py' |
| 1400 | --- lib/lp/bugs/tests/test_bug_messages.py 2012-08-08 07:22:51 +0000 |
| 1401 | +++ lib/lp/bugs/tests/test_bug_messages.py 2012-09-20 17:34:56 +0000 |
| 1402 | @@ -7,7 +7,7 @@ |
| 1403 | |
| 1404 | from zope.component import getUtility |
| 1405 | |
| 1406 | -from lp.registry.enums import InformationType |
| 1407 | +from lp.app.enums import InformationType |
| 1408 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 1409 | from lp.testing import ( |
| 1410 | login, |
| 1411 | |
| 1412 | === modified file 'lib/lp/bugs/tests/test_bug_messages_webservice.py' |
| 1413 | --- lib/lp/bugs/tests/test_bug_messages_webservice.py 2012-07-24 20:10:02 +0000 |
| 1414 | +++ lib/lp/bugs/tests/test_bug_messages_webservice.py 2012-09-20 17:34:56 +0000 |
| 1415 | @@ -11,8 +11,8 @@ |
| 1416 | from zope.security.management import endInteraction |
| 1417 | from zope.security.proxy import removeSecurityProxy |
| 1418 | |
| 1419 | +from lp.app.enums import InformationType |
| 1420 | from lp.bugs.interfaces.bugmessage import IBugMessageSet |
| 1421 | -from lp.registry.enums import InformationType |
| 1422 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 1423 | from lp.registry.interfaces.person import IPersonSet |
| 1424 | from lp.testing import ( |
| 1425 | |
| 1426 | === modified file 'lib/lp/bugs/tests/test_bug_notification_recipients.py' |
| 1427 | --- lib/lp/bugs/tests/test_bug_notification_recipients.py 2012-08-08 11:48:29 +0000 |
| 1428 | +++ lib/lp/bugs/tests/test_bug_notification_recipients.py 2012-09-20 17:34:56 +0000 |
| 1429 | @@ -7,7 +7,7 @@ |
| 1430 | |
| 1431 | from zope.component import getUtility |
| 1432 | |
| 1433 | -from lp.registry.enums import InformationType |
| 1434 | +from lp.app.enums import InformationType |
| 1435 | from lp.registry.interfaces.accesspolicy import ( |
| 1436 | IAccessArtifactGrantSource, |
| 1437 | IAccessPolicySource, |
| 1438 | |
| 1439 | === modified file 'lib/lp/bugs/tests/test_bugbranch.py' |
| 1440 | --- lib/lp/bugs/tests/test_bugbranch.py 2012-05-03 01:14:29 +0000 |
| 1441 | +++ lib/lp/bugs/tests/test_bugbranch.py 2012-09-20 17:34:56 +0000 |
| 1442 | @@ -8,6 +8,7 @@ |
| 1443 | from zope.component import getUtility |
| 1444 | from zope.security.interfaces import Unauthorized |
| 1445 | |
| 1446 | +from lp.app.enums import InformationType |
| 1447 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1448 | from lp.bugs.interfaces.bugbranch import ( |
| 1449 | IBugBranch, |
| 1450 | @@ -17,7 +18,6 @@ |
| 1451 | BugBranch, |
| 1452 | BugBranchSet, |
| 1453 | ) |
| 1454 | -from lp.registry.enums import InformationType |
| 1455 | from lp.testing import ( |
| 1456 | anonymous_logged_in, |
| 1457 | celebrity_logged_in, |
| 1458 | |
| 1459 | === modified file 'lib/lp/bugs/tests/test_bugchanges.py' |
| 1460 | --- lib/lp/bugs/tests/test_bugchanges.py 2012-08-08 11:48:29 +0000 |
| 1461 | +++ lib/lp/bugs/tests/test_bugchanges.py 2012-09-20 17:34:56 +0000 |
| 1462 | @@ -16,6 +16,7 @@ |
| 1463 | from zope.event import notify |
| 1464 | from zope.interface import providedBy |
| 1465 | |
| 1466 | +from lp.app.enums import InformationType |
| 1467 | from lp.bugs.enums import BugNotificationLevel |
| 1468 | from lp.bugs.interfaces.bugtask import ( |
| 1469 | BugTaskImportance, |
| 1470 | @@ -24,7 +25,6 @@ |
| 1471 | from lp.bugs.interfaces.cve import ICveSet |
| 1472 | from lp.bugs.model.bugnotification import BugNotification |
| 1473 | from lp.bugs.scripts.bugnotification import construct_email_notifications |
| 1474 | -from lp.registry.enums import InformationType |
| 1475 | from lp.services.features.testing import FeatureFixture |
| 1476 | from lp.services.librarian.browser import ProxiedLibraryFileAlias |
| 1477 | from lp.services.webapp.interfaces import ILaunchBag |
| 1478 | |
| 1479 | === modified file 'lib/lp/bugs/tests/test_bugs_webservice.py' |
| 1480 | --- lib/lp/bugs/tests/test_bugs_webservice.py 2012-09-10 01:33:52 +0000 |
| 1481 | +++ lib/lp/bugs/tests/test_bugs_webservice.py 2012-09-20 17:34:56 +0000 |
| 1482 | @@ -27,12 +27,10 @@ |
| 1483 | from zope.component import getMultiAdapter |
| 1484 | from zope.security.proxy import removeSecurityProxy |
| 1485 | |
| 1486 | +from lp.app.enums import InformationType |
| 1487 | from lp.bugs.browser.bugtask import get_comments_for_bugtask |
| 1488 | from lp.bugs.interfaces.bug import IBug |
| 1489 | -from lp.registry.enums import ( |
| 1490 | - BugSharingPolicy, |
| 1491 | - InformationType, |
| 1492 | - ) |
| 1493 | +from lp.registry.enums import BugSharingPolicy |
| 1494 | from lp.registry.interfaces.product import License |
| 1495 | from lp.services.webapp import snapshot |
| 1496 | from lp.services.webapp.interfaces import OAuthPermission |
| 1497 | |
| 1498 | === modified file 'lib/lp/bugs/tests/test_bugtaskflat_triggers.py' |
| 1499 | --- lib/lp/bugs/tests/test_bugtaskflat_triggers.py 2012-07-17 06:34:59 +0000 |
| 1500 | +++ lib/lp/bugs/tests/test_bugtaskflat_triggers.py 2012-09-20 17:34:56 +0000 |
| 1501 | @@ -10,9 +10,9 @@ |
| 1502 | from zope.component import getUtility |
| 1503 | from zope.security.proxy import removeSecurityProxy |
| 1504 | |
| 1505 | +from lp.app.enums import InformationType |
| 1506 | from lp.bugs.interfaces.bugtask import BugTaskStatus |
| 1507 | from lp.bugs.model.bug import Bug |
| 1508 | -from lp.registry.enums import InformationType |
| 1509 | from lp.registry.interfaces.accesspolicy import ( |
| 1510 | IAccessArtifactGrantSource, |
| 1511 | IAccessArtifactSource, |
| 1512 | |
| 1513 | === modified file 'lib/lp/bugs/tests/test_bugvisibility.py' |
| 1514 | --- lib/lp/bugs/tests/test_bugvisibility.py 2012-08-16 05:18:54 +0000 |
| 1515 | +++ lib/lp/bugs/tests/test_bugvisibility.py 2012-09-20 17:34:56 +0000 |
| 1516 | @@ -3,7 +3,7 @@ |
| 1517 | |
| 1518 | """Tests for visibility of a bug.""" |
| 1519 | |
| 1520 | -from lp.registry.enums import InformationType |
| 1521 | +from lp.app.enums import InformationType |
| 1522 | from lp.testing import ( |
| 1523 | celebrity_logged_in, |
| 1524 | TestCaseWithFactory, |
| 1525 | |
| 1526 | === modified file 'lib/lp/bugs/tests/test_searchtasks_webservice.py' |
| 1527 | --- lib/lp/bugs/tests/test_searchtasks_webservice.py 2012-09-17 08:15:11 +0000 |
| 1528 | +++ lib/lp/bugs/tests/test_searchtasks_webservice.py 2012-09-20 17:34:56 +0000 |
| 1529 | @@ -5,7 +5,7 @@ |
| 1530 | |
| 1531 | __metaclass__ = type |
| 1532 | |
| 1533 | -from lp.registry.enums import InformationType |
| 1534 | +from lp.app.enums import InformationType |
| 1535 | from lp.testing import ( |
| 1536 | person_logged_in, |
| 1537 | TestCaseWithFactory, |
| 1538 | |
| 1539 | === modified file 'lib/lp/bugs/tests/test_structuralsubscription.py' |
| 1540 | --- lib/lp/bugs/tests/test_structuralsubscription.py 2012-09-19 05:10:03 +0000 |
| 1541 | +++ lib/lp/bugs/tests/test_structuralsubscription.py 2012-09-20 17:34:56 +0000 |
| 1542 | @@ -13,6 +13,7 @@ |
| 1543 | from testtools.matchers import StartsWith |
| 1544 | from zope.security.interfaces import Unauthorized |
| 1545 | |
| 1546 | +from lp.app.enums import InformationType |
| 1547 | from lp.bugs.enums import BugNotificationLevel |
| 1548 | from lp.bugs.interfaces.bugtask import ( |
| 1549 | BugTaskImportance, |
| 1550 | @@ -30,7 +31,6 @@ |
| 1551 | get_structural_subscriptions, |
| 1552 | get_structural_subscriptions_for_bug, |
| 1553 | ) |
| 1554 | -from lp.registry.enums import InformationType |
| 1555 | from lp.services.database.decoratedresultset import DecoratedResultSet |
| 1556 | from lp.testing import ( |
| 1557 | anonymous_logged_in, |
| 1558 | |
| 1559 | === modified file 'lib/lp/bugs/xmlrpc/bug.py' |
| 1560 | --- lib/lp/bugs/xmlrpc/bug.py 2012-07-31 01:55:07 +0000 |
| 1561 | +++ lib/lp/bugs/xmlrpc/bug.py 2012-09-20 17:34:56 +0000 |
| 1562 | @@ -12,10 +12,10 @@ |
| 1563 | from zope.component import getUtility |
| 1564 | from zope.interface import implements |
| 1565 | |
| 1566 | +from lp.app.enums import InformationType |
| 1567 | from lp.app.errors import NotFoundError |
| 1568 | from lp.bugs.interfaces.bug import CreateBugParams |
| 1569 | from lp.bugs.interfaces.externalbugtracker import IExternalBugTrackerTokenAPI |
| 1570 | -from lp.registry.enums import InformationType |
| 1571 | from lp.registry.interfaces.distribution import IDistributionSet |
| 1572 | from lp.registry.interfaces.person import IPersonSet |
| 1573 | from lp.registry.interfaces.product import IProductSet |
| 1574 | |
| 1575 | === modified file 'lib/lp/code/browser/branch.py' |
| 1576 | --- lib/lp/code/browser/branch.py 2012-09-20 09:45:23 +0000 |
| 1577 | +++ lib/lp/code/browser/branch.py 2012-09-20 17:34:56 +0000 |
| 1578 | @@ -74,6 +74,7 @@ |
| 1579 | from zope.traversing.interfaces import IPathAdapter |
| 1580 | |
| 1581 | from lp import _ |
| 1582 | +from lp.app.enums import InformationType |
| 1583 | from lp.app.browser.informationtype import InformationTypePortletMixin |
| 1584 | from lp.app.browser.launchpad import Hierarchy |
| 1585 | from lp.app.browser.launchpadform import ( |
| 1586 | @@ -85,6 +86,7 @@ |
| 1587 | from lp.app.browser.lazrjs import EnumChoiceWidget |
| 1588 | from lp.app.errors import NotFoundError |
| 1589 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1590 | +from lp.app.vocabularies import InformationTypeVocabulary |
| 1591 | from lp.app.widgets.itemswidgets import LaunchpadRadioWidgetWithDescription |
| 1592 | from lp.app.widgets.suggestion import TargetBranchWidget |
| 1593 | from lp.blueprints.interfaces.specificationbranch import ISpecificationBranch |
| 1594 | @@ -126,13 +128,9 @@ |
| 1595 | from lp.code.interfaces.branchmergeproposal import IBranchMergeProposal |
| 1596 | from lp.code.interfaces.branchtarget import IBranchTarget |
| 1597 | from lp.code.interfaces.codereviewvote import ICodeReviewVoteReference |
| 1598 | -from lp.registry.enums import InformationType |
| 1599 | from lp.registry.interfaces.person import IPersonSet |
| 1600 | from lp.registry.interfaces.productseries import IProductSeries |
| 1601 | -from lp.registry.vocabularies import ( |
| 1602 | - InformationTypeVocabulary, |
| 1603 | - UserTeamsParticipationPlusSelfVocabulary, |
| 1604 | - ) |
| 1605 | +from lp.registry.vocabularies import UserTeamsParticipationPlusSelfVocabulary |
| 1606 | from lp.services import searchbuilder |
| 1607 | from lp.services.config import config |
| 1608 | from lp.services.database.constants import UTC_NOW |
| 1609 | |
| 1610 | === modified file 'lib/lp/code/browser/branchlisting.py' |
| 1611 | --- lib/lp/code/browser/branchlisting.py 2012-07-24 06:39:54 +0000 |
| 1612 | +++ lib/lp/code/browser/branchlisting.py 2012-09-20 17:34:56 +0000 |
| 1613 | @@ -52,6 +52,7 @@ |
| 1614 | from zope.schema import Choice |
| 1615 | |
| 1616 | from lp import _ |
| 1617 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 1618 | from lp.app.browser.badge import ( |
| 1619 | Badge, |
| 1620 | HasBadgeBase, |
| 1621 | @@ -99,7 +100,6 @@ |
| 1622 | ProductDownloadFileMixin, |
| 1623 | SortSeriesMixin, |
| 1624 | ) |
| 1625 | -from lp.registry.enums import PRIVATE_INFORMATION_TYPES |
| 1626 | from lp.registry.interfaces.person import ( |
| 1627 | IPerson, |
| 1628 | IPersonSet, |
| 1629 | |
| 1630 | === modified file 'lib/lp/code/browser/tests/test_bazaar.py' |
| 1631 | --- lib/lp/code/browser/tests/test_bazaar.py 2012-05-31 03:54:13 +0000 |
| 1632 | +++ lib/lp/code/browser/tests/test_bazaar.py 2012-09-20 17:34:56 +0000 |
| 1633 | @@ -7,8 +7,8 @@ |
| 1634 | |
| 1635 | from zope.security.proxy import removeSecurityProxy |
| 1636 | |
| 1637 | +from lp.app.enums import InformationType |
| 1638 | from lp.code.browser.bazaar import BazaarApplicationView |
| 1639 | -from lp.registry.enums import InformationType |
| 1640 | from lp.services.webapp.authorization import check_permission |
| 1641 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 1642 | from lp.testing import ( |
| 1643 | |
| 1644 | === modified file 'lib/lp/code/browser/tests/test_branch.py' |
| 1645 | --- lib/lp/code/browser/tests/test_branch.py 2012-09-20 09:45:23 +0000 |
| 1646 | +++ lib/lp/code/browser/tests/test_branch.py 2012-09-20 17:34:56 +0000 |
| 1647 | @@ -14,6 +14,7 @@ |
| 1648 | from zope.publisher.interfaces import NotFound |
| 1649 | from zope.security.proxy import removeSecurityProxy |
| 1650 | |
| 1651 | +from lp.app.enums import InformationType |
| 1652 | from lp.app.interfaces.headings import IRootContext |
| 1653 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1654 | from lp.bugs.interfaces.bugtask import ( |
| 1655 | @@ -35,10 +36,7 @@ |
| 1656 | BranchType, |
| 1657 | BranchVisibilityRule, |
| 1658 | ) |
| 1659 | -from lp.registry.enums import ( |
| 1660 | - BranchSharingPolicy, |
| 1661 | - InformationType, |
| 1662 | - ) |
| 1663 | +from lp.registry.enums import BranchSharingPolicy |
| 1664 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 1665 | from lp.registry.interfaces.person import PersonVisibility |
| 1666 | from lp.services.config import config |
| 1667 | |
| 1668 | === modified file 'lib/lp/code/browser/tests/test_branchmergeproposal.py' |
| 1669 | --- lib/lp/code/browser/tests/test_branchmergeproposal.py 2012-08-14 23:27:07 +0000 |
| 1670 | +++ lib/lp/code/browser/tests/test_branchmergeproposal.py 2012-09-20 17:34:56 +0000 |
| 1671 | @@ -30,6 +30,7 @@ |
| 1672 | from zope.security.interfaces import Unauthorized |
| 1673 | from zope.security.proxy import removeSecurityProxy |
| 1674 | |
| 1675 | +from lp.app.enums import InformationType |
| 1676 | from lp.code.browser.branch import RegisterBranchMergeProposalView |
| 1677 | from lp.code.browser.branchmergeproposal import ( |
| 1678 | BranchMergeProposalAddVoteView, |
| 1679 | @@ -54,7 +55,6 @@ |
| 1680 | make_merge_proposal_without_reviewers, |
| 1681 | ) |
| 1682 | from lp.registry.enums import ( |
| 1683 | - InformationType, |
| 1684 | PersonVisibility, |
| 1685 | TeamMembershipPolicy, |
| 1686 | ) |
| 1687 | |
| 1688 | === modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py' |
| 1689 | --- lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2012-05-31 03:54:13 +0000 |
| 1690 | +++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2012-09-20 17:34:56 +0000 |
| 1691 | @@ -14,6 +14,7 @@ |
| 1692 | import transaction |
| 1693 | from zope.security.proxy import removeSecurityProxy |
| 1694 | |
| 1695 | +from lp.app.enums import InformationType |
| 1696 | from lp.code.browser.branchmergeproposallisting import ( |
| 1697 | ActiveReviewsView, |
| 1698 | BranchMergeProposalListingItem, |
| 1699 | @@ -23,7 +24,6 @@ |
| 1700 | BranchMergeProposalStatus, |
| 1701 | CodeReviewVote, |
| 1702 | ) |
| 1703 | -from lp.registry.enums import InformationType |
| 1704 | from lp.registry.model.personproduct import PersonProduct |
| 1705 | from lp.services.database.sqlbase import flush_database_caches |
| 1706 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 1707 | |
| 1708 | === modified file 'lib/lp/code/browser/tests/test_branchmergequeuelisting.py' |
| 1709 | --- lib/lp/code/browser/tests/test_branchmergequeuelisting.py 2012-05-31 03:54:13 +0000 |
| 1710 | +++ lib/lp/code/browser/tests/test_branchmergequeuelisting.py 2012-09-20 17:34:56 +0000 |
| 1711 | @@ -11,7 +11,7 @@ |
| 1712 | import soupmatchers |
| 1713 | from zope.security.proxy import removeSecurityProxy |
| 1714 | |
| 1715 | -from lp.registry.enums import InformationType |
| 1716 | +from lp.app.enums import InformationType |
| 1717 | from lp.services.features.model import ( |
| 1718 | FeatureFlag, |
| 1719 | getFeatureStore, |
| 1720 | |
| 1721 | === modified file 'lib/lp/code/browser/tests/test_branchsubscription.py' |
| 1722 | --- lib/lp/code/browser/tests/test_branchsubscription.py 2012-06-21 01:40:52 +0000 |
| 1723 | +++ lib/lp/code/browser/tests/test_branchsubscription.py 2012-09-20 17:34:56 +0000 |
| 1724 | @@ -5,7 +5,7 @@ |
| 1725 | |
| 1726 | __metaclass__ = type |
| 1727 | |
| 1728 | -from lp.registry.enums import InformationType |
| 1729 | +from lp.app.enums import InformationType |
| 1730 | from lp.services.webapp.interfaces import IPrimaryContext |
| 1731 | from lp.testing import ( |
| 1732 | person_logged_in, |
| 1733 | |
| 1734 | === modified file 'lib/lp/code/browser/tests/test_product.py' |
| 1735 | --- lib/lp/code/browser/tests/test_product.py 2012-08-29 03:19:38 +0000 |
| 1736 | +++ lib/lp/code/browser/tests/test_product.py 2012-09-20 17:34:56 +0000 |
| 1737 | @@ -14,14 +14,16 @@ |
| 1738 | import pytz |
| 1739 | from zope.component import getUtility |
| 1740 | |
| 1741 | -from lp.app.enums import ServiceUsage |
| 1742 | +from lp.app.enums import ( |
| 1743 | + InformationType, |
| 1744 | + ServiceUsage, |
| 1745 | + ) |
| 1746 | from lp.code.enums import ( |
| 1747 | BranchType, |
| 1748 | BranchVisibilityRule, |
| 1749 | ) |
| 1750 | from lp.code.interfaces.revision import IRevisionSet |
| 1751 | from lp.code.publisher import CodeLayer |
| 1752 | -from lp.registry.enums import InformationType |
| 1753 | from lp.services.webapp import canonical_url |
| 1754 | from lp.testing import ( |
| 1755 | ANONYMOUS, |
| 1756 | |
| 1757 | === modified file 'lib/lp/code/browser/tests/test_sourcepackagerecipe.py' |
| 1758 | --- lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2012-08-16 02:45:38 +0000 |
| 1759 | +++ lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2012-09-20 17:34:56 +0000 |
| 1760 | @@ -21,6 +21,7 @@ |
| 1761 | from zope.security.interfaces import Unauthorized |
| 1762 | from zope.security.proxy import removeSecurityProxy |
| 1763 | |
| 1764 | +from lp.app.enums import InformationType |
| 1765 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1766 | from lp.buildmaster.enums import BuildStatus |
| 1767 | from lp.code.browser.sourcepackagerecipe import ( |
| 1768 | @@ -34,7 +35,6 @@ |
| 1769 | ) |
| 1770 | from lp.code.interfaces.sourcepackagerecipe import MINIMAL_RECIPE_TEXT |
| 1771 | from lp.code.tests.helpers import recipe_parser_newest_version |
| 1772 | -from lp.registry.enums import InformationType |
| 1773 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 1774 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 1775 | from lp.registry.interfaces.series import SeriesStatus |
| 1776 | |
| 1777 | === modified file 'lib/lp/code/interfaces/branch.py' |
| 1778 | --- lib/lp/code/interfaces/branch.py 2012-09-14 01:21:13 +0000 |
| 1779 | +++ lib/lp/code/interfaces/branch.py 2012-09-20 17:34:56 +0000 |
| 1780 | @@ -69,6 +69,7 @@ |
| 1781 | TextLine, |
| 1782 | ) |
| 1783 | |
| 1784 | +from lp.app.enums import InformationType |
| 1785 | from lp import _ |
| 1786 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1787 | from lp.app.validators import LaunchpadValidationError |
| 1788 | @@ -91,7 +92,6 @@ |
| 1789 | from lp.code.interfaces.hasbranches import IHasMergeProposals |
| 1790 | from lp.code.interfaces.hasrecipes import IHasRecipes |
| 1791 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
| 1792 | -from lp.registry.enums import InformationType |
| 1793 | from lp.registry.interfaces.person import IPerson |
| 1794 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 1795 | from lp.registry.interfaces.role import IHasOwner |
| 1796 | |
| 1797 | === modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py' |
| 1798 | --- lib/lp/code/mail/tests/test_branchmergeproposal.py 2012-09-18 04:51:46 +0000 |
| 1799 | +++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2012-09-20 17:34:56 +0000 |
| 1800 | @@ -13,6 +13,7 @@ |
| 1801 | from zope.interface import providedBy |
| 1802 | from zope.security.proxy import removeSecurityProxy |
| 1803 | |
| 1804 | +from lp.app.enums import InformationType |
| 1805 | from lp.code.enums import ( |
| 1806 | BranchMergeProposalStatus, |
| 1807 | BranchSubscriptionNotificationLevel, |
| 1808 | @@ -30,7 +31,6 @@ |
| 1809 | from lp.code.model.codereviewvote import CodeReviewVoteReference |
| 1810 | from lp.code.model.diff import PreviewDiff |
| 1811 | from lp.code.subscribers.branchmergeproposal import merge_proposal_modified |
| 1812 | -from lp.registry.enums import InformationType |
| 1813 | from lp.services.database.lpstorm import IStore |
| 1814 | from lp.services.webapp import canonical_url |
| 1815 | from lp.testing import ( |
| 1816 | |
| 1817 | === modified file 'lib/lp/code/model/branch.py' |
| 1818 | --- lib/lp/code/model/branch.py 2012-09-19 04:39:40 +0000 |
| 1819 | +++ lib/lp/code/model/branch.py 2012-09-20 17:34:56 +0000 |
| 1820 | @@ -53,6 +53,11 @@ |
| 1821 | ) |
| 1822 | |
| 1823 | from lp import _ |
| 1824 | +from lp.app.enums import ( |
| 1825 | + InformationType, |
| 1826 | + PRIVATE_INFORMATION_TYPES, |
| 1827 | + PUBLIC_INFORMATION_TYPES, |
| 1828 | + ) |
| 1829 | from lp.app.errors import ( |
| 1830 | SubscriptionPrivacyViolation, |
| 1831 | UserCannotUnsubscribePerson, |
| 1832 | @@ -132,12 +137,7 @@ |
| 1833 | ) |
| 1834 | from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch |
| 1835 | from lp.codehosting.safe_open import safe_open |
| 1836 | -from lp.registry.enums import ( |
| 1837 | - InformationType, |
| 1838 | - PersonVisibility, |
| 1839 | - PRIVATE_INFORMATION_TYPES, |
| 1840 | - PUBLIC_INFORMATION_TYPES, |
| 1841 | - ) |
| 1842 | +from lp.registry.enums import PersonVisibility |
| 1843 | from lp.registry.errors import CannotChangeInformationType |
| 1844 | from lp.registry.interfaces.accesspolicy import ( |
| 1845 | IAccessArtifactGrantSource, |
| 1846 | |
| 1847 | === modified file 'lib/lp/code/model/branchcollection.py' |
| 1848 | --- lib/lp/code/model/branchcollection.py 2012-08-07 02:31:56 +0000 |
| 1849 | +++ lib/lp/code/model/branchcollection.py 2012-09-20 17:34:56 +0000 |
| 1850 | @@ -31,6 +31,10 @@ |
| 1851 | from zope.component import getUtility |
| 1852 | from zope.interface import implements |
| 1853 | |
| 1854 | +from lp.app.enums import ( |
| 1855 | + PRIVATE_INFORMATION_TYPES, |
| 1856 | + PUBLIC_INFORMATION_TYPES, |
| 1857 | + ) |
| 1858 | from lp.bugs.interfaces.bugtask import IBugTaskSet |
| 1859 | from lp.bugs.interfaces.bugtaskfilter import filter_bugtasks_by_context |
| 1860 | from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams |
| 1861 | @@ -59,10 +63,6 @@ |
| 1862 | from lp.code.model.codereviewvote import CodeReviewVoteReference |
| 1863 | from lp.code.model.revision import Revision |
| 1864 | from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch |
| 1865 | -from lp.registry.enums import ( |
| 1866 | - PRIVATE_INFORMATION_TYPES, |
| 1867 | - PUBLIC_INFORMATION_TYPES, |
| 1868 | - ) |
| 1869 | from lp.registry.model.distribution import Distribution |
| 1870 | from lp.registry.model.distroseries import DistroSeries |
| 1871 | from lp.registry.model.person import ( |
| 1872 | |
| 1873 | === modified file 'lib/lp/code/model/branchmergeproposal.py' |
| 1874 | --- lib/lp/code/model/branchmergeproposal.py 2012-08-31 20:06:10 +0000 |
| 1875 | +++ lib/lp/code/model/branchmergeproposal.py 2012-09-20 17:34:56 +0000 |
| 1876 | @@ -38,6 +38,7 @@ |
| 1877 | from zope.event import notify |
| 1878 | from zope.interface import implements |
| 1879 | |
| 1880 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 1881 | from lp.code.enums import ( |
| 1882 | BranchMergeProposalStatus, |
| 1883 | BranchSubscriptionDiffSize, |
| 1884 | @@ -76,7 +77,6 @@ |
| 1885 | IncrementalDiff, |
| 1886 | PreviewDiff, |
| 1887 | ) |
| 1888 | -from lp.registry.enums import PRIVATE_INFORMATION_TYPES |
| 1889 | from lp.registry.interfaces.person import ( |
| 1890 | IPerson, |
| 1891 | IPersonSet, |
| 1892 | |
| 1893 | === modified file 'lib/lp/code/model/branchnamespace.py' |
| 1894 | --- lib/lp/code/model/branchnamespace.py 2012-09-06 00:01:38 +0000 |
| 1895 | +++ lib/lp/code/model/branchnamespace.py 2012-09-20 17:34:56 +0000 |
| 1896 | @@ -20,6 +20,13 @@ |
| 1897 | from zope.interface import implements |
| 1898 | from zope.security.proxy import removeSecurityProxy |
| 1899 | |
| 1900 | +from lp.app.enums import ( |
| 1901 | + FREE_INFORMATION_TYPES, |
| 1902 | + FREE_PRIVATE_INFORMATION_TYPES, |
| 1903 | + InformationType, |
| 1904 | + NON_EMBARGOED_INFORMATION_TYPES, |
| 1905 | + PUBLIC_INFORMATION_TYPES, |
| 1906 | + ) |
| 1907 | from lp.app.interfaces.services import IService |
| 1908 | from lp.code.enums import ( |
| 1909 | BranchLifecycleStatus, |
| 1910 | @@ -48,12 +55,7 @@ |
| 1911 | from lp.code.model.branch import Branch |
| 1912 | from lp.registry.enums import ( |
| 1913 | BranchSharingPolicy, |
| 1914 | - FREE_INFORMATION_TYPES, |
| 1915 | - FREE_PRIVATE_INFORMATION_TYPES, |
| 1916 | - InformationType, |
| 1917 | - NON_EMBARGOED_INFORMATION_TYPES, |
| 1918 | PersonVisibility, |
| 1919 | - PUBLIC_INFORMATION_TYPES, |
| 1920 | ) |
| 1921 | from lp.registry.errors import ( |
| 1922 | NoSuchDistroSeries, |
| 1923 | |
| 1924 | === modified file 'lib/lp/code/model/revision.py' |
| 1925 | --- lib/lp/code/model/revision.py 2012-06-07 04:52:02 +0000 |
| 1926 | +++ lib/lp/code/model/revision.py 2012-09-20 17:34:56 +0000 |
| 1927 | @@ -48,6 +48,7 @@ |
| 1928 | from zope.interface import implements |
| 1929 | from zope.security.proxy import removeSecurityProxy |
| 1930 | |
| 1931 | +from lp.app.enums import PUBLIC_INFORMATION_TYPES |
| 1932 | from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING |
| 1933 | from lp.code.interfaces.revision import ( |
| 1934 | IRevision, |
| 1935 | @@ -56,7 +57,6 @@ |
| 1936 | IRevisionProperty, |
| 1937 | IRevisionSet, |
| 1938 | ) |
| 1939 | -from lp.registry.enums import PUBLIC_INFORMATION_TYPES |
| 1940 | from lp.registry.interfaces.person import validate_public_person |
| 1941 | from lp.registry.interfaces.product import IProduct |
| 1942 | from lp.registry.interfaces.projectgroup import IProjectGroup |
| 1943 | |
| 1944 | === modified file 'lib/lp/code/model/tests/test_branch.py' |
| 1945 | --- lib/lp/code/model/tests/test_branch.py 2012-09-19 04:39:40 +0000 |
| 1946 | +++ lib/lp/code/model/tests/test_branch.py 2012-09-20 17:34:56 +0000 |
| 1947 | @@ -30,6 +30,11 @@ |
| 1948 | from zope.security.proxy import removeSecurityProxy |
| 1949 | |
| 1950 | from lp import _ |
| 1951 | +from lp.app.enums import ( |
| 1952 | + InformationType, |
| 1953 | + PRIVATE_INFORMATION_TYPES, |
| 1954 | + PUBLIC_INFORMATION_TYPES, |
| 1955 | + ) |
| 1956 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1957 | from lp.blueprints.enums import NewSpecificationDefinitionStatus |
| 1958 | from lp.blueprints.interfaces.specification import ISpecificationSet |
| 1959 | @@ -114,10 +119,7 @@ |
| 1960 | from lp.codehosting.vfs.branchfs import get_real_branch_path |
| 1961 | from lp.registry.enums import ( |
| 1962 | BranchSharingPolicy, |
| 1963 | - InformationType, |
| 1964 | PersonVisibility, |
| 1965 | - PRIVATE_INFORMATION_TYPES, |
| 1966 | - PUBLIC_INFORMATION_TYPES, |
| 1967 | TeamMembershipPolicy, |
| 1968 | ) |
| 1969 | from lp.registry.errors import CannotChangeInformationType |
| 1970 | |
| 1971 | === modified file 'lib/lp/code/model/tests/test_branchcollection.py' |
| 1972 | --- lib/lp/code/model/tests/test_branchcollection.py 2012-09-06 00:01:38 +0000 |
| 1973 | +++ lib/lp/code/model/tests/test_branchcollection.py 2012-09-20 17:34:56 +0000 |
| 1974 | @@ -13,6 +13,7 @@ |
| 1975 | from zope.component import getUtility |
| 1976 | from zope.security.proxy import removeSecurityProxy |
| 1977 | |
| 1978 | +from lp.app.enums import InformationType |
| 1979 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 1980 | from lp.app.interfaces.services import IService |
| 1981 | from lp.code.enums import ( |
| 1982 | @@ -32,10 +33,7 @@ |
| 1983 | from lp.code.model.branch import Branch |
| 1984 | from lp.code.model.branchcollection import GenericBranchCollection |
| 1985 | from lp.code.tests.helpers import remove_all_sample_data_branches |
| 1986 | -from lp.registry.enums import ( |
| 1987 | - InformationType, |
| 1988 | - PersonVisibility, |
| 1989 | - ) |
| 1990 | +from lp.registry.enums import PersonVisibility |
| 1991 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 1992 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 1993 | from lp.services.webapp.interfaces import ( |
| 1994 | |
| 1995 | === modified file 'lib/lp/code/model/tests/test_branchjob.py' |
| 1996 | --- lib/lp/code/model/tests/test_branchjob.py 2012-08-27 08:11:27 +0000 |
| 1997 | +++ lib/lp/code/model/tests/test_branchjob.py 2012-09-20 17:34:56 +0000 |
| 1998 | @@ -28,6 +28,7 @@ |
| 1999 | from zope.component import getUtility |
| 2000 | from zope.security.proxy import removeSecurityProxy |
| 2001 | |
| 2002 | +from lp.app.enums import InformationType |
| 2003 | from lp.code.bzr import ( |
| 2004 | branch_revision_history, |
| 2005 | BranchFormat, |
| 2006 | @@ -65,7 +66,6 @@ |
| 2007 | from lp.code.model.revision import RevisionSet |
| 2008 | from lp.code.model.tests.test_branch import create_knit |
| 2009 | from lp.codehosting.vfs import branch_id_to_path |
| 2010 | -from lp.registry.enums import InformationType |
| 2011 | from lp.scripts.helpers import TransactionFreeOperation |
| 2012 | from lp.services.config import config |
| 2013 | from lp.services.database.constants import UTC_NOW |
| 2014 | |
| 2015 | === modified file 'lib/lp/code/model/tests/test_branchlookup.py' |
| 2016 | --- lib/lp/code/model/tests/test_branchlookup.py 2012-07-18 15:39:35 +0000 |
| 2017 | +++ lib/lp/code/model/tests/test_branchlookup.py 2012-09-20 17:34:56 +0000 |
| 2018 | @@ -9,6 +9,7 @@ |
| 2019 | from zope.component import getUtility |
| 2020 | from zope.security.proxy import removeSecurityProxy |
| 2021 | |
| 2022 | +from lp.app.enums import InformationType |
| 2023 | from lp.code.errors import ( |
| 2024 | CannotHaveLinkedBranch, |
| 2025 | InvalidNamespace, |
| 2026 | @@ -27,7 +28,6 @@ |
| 2027 | compose_public_url, |
| 2028 | ) |
| 2029 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
| 2030 | -from lp.registry.enums import InformationType |
| 2031 | from lp.registry.errors import ( |
| 2032 | NoSuchDistroSeries, |
| 2033 | NoSuchSourcePackageName, |
| 2034 | |
| 2035 | === modified file 'lib/lp/code/model/tests/test_branchmergeproposal.py' |
| 2036 | --- lib/lp/code/model/tests/test_branchmergeproposal.py 2012-08-31 20:05:51 +0000 |
| 2037 | +++ lib/lp/code/model/tests/test_branchmergeproposal.py 2012-09-20 17:34:56 +0000 |
| 2038 | @@ -23,6 +23,7 @@ |
| 2039 | from zope.component import getUtility |
| 2040 | from zope.security.proxy import removeSecurityProxy |
| 2041 | |
| 2042 | +from lp.app.enums import InformationType |
| 2043 | from lp.app.interfaces.launchpad import IPrivacy |
| 2044 | from lp.code.enums import ( |
| 2045 | BranchMergeProposalStatus, |
| 2046 | @@ -62,10 +63,7 @@ |
| 2047 | add_revision_to_branch, |
| 2048 | make_merge_proposal_without_reviewers, |
| 2049 | ) |
| 2050 | -from lp.registry.enums import ( |
| 2051 | - InformationType, |
| 2052 | - TeamMembershipPolicy, |
| 2053 | - ) |
| 2054 | +from lp.registry.enums import TeamMembershipPolicy |
| 2055 | from lp.registry.interfaces.person import IPersonSet |
| 2056 | from lp.registry.interfaces.product import IProductSet |
| 2057 | from lp.services.database.constants import UTC_NOW |
| 2058 | |
| 2059 | === modified file 'lib/lp/code/model/tests/test_branchmergequeuecollection.py' |
| 2060 | --- lib/lp/code/model/tests/test_branchmergequeuecollection.py 2012-05-31 03:54:13 +0000 |
| 2061 | +++ lib/lp/code/model/tests/test_branchmergequeuecollection.py 2012-09-20 17:34:56 +0000 |
| 2062 | @@ -8,6 +8,7 @@ |
| 2063 | from zope.component import getUtility |
| 2064 | from zope.security.proxy import removeSecurityProxy |
| 2065 | |
| 2066 | +from lp.app.enums import InformationType |
| 2067 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2068 | from lp.code.interfaces.branchmergequeuecollection import ( |
| 2069 | IAllBranchMergeQueues, |
| 2070 | @@ -18,7 +19,6 @@ |
| 2071 | from lp.code.model.branchmergequeuecollection import ( |
| 2072 | GenericBranchMergeQueueCollection, |
| 2073 | ) |
| 2074 | -from lp.registry.enums import InformationType |
| 2075 | from lp.services.database.lpstorm import IMasterStore |
| 2076 | from lp.testing import TestCaseWithFactory |
| 2077 | from lp.testing.layers import DatabaseFunctionalLayer |
| 2078 | |
| 2079 | === modified file 'lib/lp/code/model/tests/test_branchnamespace.py' |
| 2080 | --- lib/lp/code/model/tests/test_branchnamespace.py 2012-09-06 00:01:38 +0000 |
| 2081 | +++ lib/lp/code/model/tests/test_branchnamespace.py 2012-09-20 17:34:56 +0000 |
| 2082 | @@ -8,6 +8,13 @@ |
| 2083 | from zope.component import getUtility |
| 2084 | from zope.security.proxy import removeSecurityProxy |
| 2085 | |
| 2086 | +from lp.app.enums import ( |
| 2087 | + FREE_INFORMATION_TYPES, |
| 2088 | + FREE_PRIVATE_INFORMATION_TYPES, |
| 2089 | + InformationType, |
| 2090 | + NON_EMBARGOED_INFORMATION_TYPES, |
| 2091 | + PUBLIC_INFORMATION_TYPES, |
| 2092 | + ) |
| 2093 | from lp.app.interfaces.services import IService |
| 2094 | from lp.app.validators import LaunchpadValidationError |
| 2095 | from lp.code.enums import ( |
| 2096 | @@ -38,12 +45,7 @@ |
| 2097 | ) |
| 2098 | from lp.registry.enums import ( |
| 2099 | BranchSharingPolicy, |
| 2100 | - FREE_INFORMATION_TYPES, |
| 2101 | - FREE_PRIVATE_INFORMATION_TYPES, |
| 2102 | - InformationType, |
| 2103 | - NON_EMBARGOED_INFORMATION_TYPES, |
| 2104 | PersonVisibility, |
| 2105 | - PUBLIC_INFORMATION_TYPES, |
| 2106 | SharingPermission, |
| 2107 | TeamMembershipPolicy, |
| 2108 | ) |
| 2109 | |
| 2110 | === modified file 'lib/lp/code/model/tests/test_branchpuller.py' |
| 2111 | --- lib/lp/code/model/tests/test_branchpuller.py 2012-05-31 03:54:13 +0000 |
| 2112 | +++ lib/lp/code/model/tests/test_branchpuller.py 2012-09-20 17:34:56 +0000 |
| 2113 | @@ -15,9 +15,9 @@ |
| 2114 | from zope.component import getUtility |
| 2115 | from zope.security.proxy import removeSecurityProxy |
| 2116 | |
| 2117 | +from lp.app.enums import InformationType |
| 2118 | from lp.code.enums import BranchType |
| 2119 | from lp.code.interfaces.branchpuller import IBranchPuller |
| 2120 | -from lp.registry.enums import InformationType |
| 2121 | from lp.services.database.constants import UTC_NOW |
| 2122 | from lp.testing import ( |
| 2123 | login_person, |
| 2124 | |
| 2125 | === modified file 'lib/lp/code/model/tests/test_branchset.py' |
| 2126 | --- lib/lp/code/model/tests/test_branchset.py 2012-05-31 03:54:13 +0000 |
| 2127 | +++ lib/lp/code/model/tests/test_branchset.py 2012-09-20 17:34:56 +0000 |
| 2128 | @@ -8,9 +8,9 @@ |
| 2129 | from testtools.matchers import LessThan |
| 2130 | from zope.security.proxy import removeSecurityProxy |
| 2131 | |
| 2132 | +from lp.app.enums import InformationType |
| 2133 | from lp.code.interfaces.branch import IBranchSet |
| 2134 | from lp.code.model.branch import BranchSet |
| 2135 | -from lp.registry.enums import InformationType |
| 2136 | from lp.testing import ( |
| 2137 | login_person, |
| 2138 | logout, |
| 2139 | |
| 2140 | === modified file 'lib/lp/code/model/tests/test_branchsubscription.py' |
| 2141 | --- lib/lp/code/model/tests/test_branchsubscription.py 2012-09-18 16:32:01 +0000 |
| 2142 | +++ lib/lp/code/model/tests/test_branchsubscription.py 2012-09-20 17:34:56 +0000 |
| 2143 | @@ -8,6 +8,7 @@ |
| 2144 | |
| 2145 | from zope.component import getUtility |
| 2146 | |
| 2147 | +from lp.app.enums import InformationType |
| 2148 | from lp.app.errors import ( |
| 2149 | SubscriptionPrivacyViolation, |
| 2150 | UserCannotUnsubscribePerson, |
| 2151 | @@ -17,7 +18,6 @@ |
| 2152 | BranchSubscriptionNotificationLevel, |
| 2153 | CodeReviewNotificationLevel, |
| 2154 | ) |
| 2155 | -from lp.registry.enums import InformationType |
| 2156 | from lp.testing import ( |
| 2157 | person_logged_in, |
| 2158 | TestCaseWithFactory, |
| 2159 | |
| 2160 | === modified file 'lib/lp/code/model/tests/test_branchtarget.py' |
| 2161 | --- lib/lp/code/model/tests/test_branchtarget.py 2012-05-31 03:54:13 +0000 |
| 2162 | +++ lib/lp/code/model/tests/test_branchtarget.py 2012-09-20 17:34:56 +0000 |
| 2163 | @@ -7,6 +7,7 @@ |
| 2164 | |
| 2165 | from zope.security.proxy import removeSecurityProxy |
| 2166 | |
| 2167 | +from lp.app.enums import InformationType |
| 2168 | from lp.code.enums import ( |
| 2169 | BranchType, |
| 2170 | RevisionControlSystems, |
| 2171 | @@ -19,7 +20,6 @@ |
| 2172 | PersonBranchTarget, |
| 2173 | ProductBranchTarget, |
| 2174 | ) |
| 2175 | -from lp.registry.enums import InformationType |
| 2176 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2177 | from lp.services.webapp import canonical_url |
| 2178 | from lp.services.webapp.interfaces import IPrimaryContext |
| 2179 | |
| 2180 | === modified file 'lib/lp/code/model/tests/test_branchvisibility.py' |
| 2181 | --- lib/lp/code/model/tests/test_branchvisibility.py 2012-08-13 19:34:10 +0000 |
| 2182 | +++ lib/lp/code/model/tests/test_branchvisibility.py 2012-09-20 17:34:56 +0000 |
| 2183 | @@ -18,6 +18,7 @@ |
| 2184 | ) |
| 2185 | from zope.security.proxy import removeSecurityProxy |
| 2186 | |
| 2187 | +from lp.app.enums import InformationType |
| 2188 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2189 | from lp.app.interfaces.security import IAuthorization |
| 2190 | from lp.code.enums import ( |
| 2191 | @@ -26,7 +27,6 @@ |
| 2192 | CodeReviewNotificationLevel, |
| 2193 | ) |
| 2194 | from lp.code.interfaces.branch import IBranchSet |
| 2195 | -from lp.registry.enums import InformationType |
| 2196 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 2197 | from lp.registry.interfaces.role import IPersonRoles |
| 2198 | from lp.security import AccessBranch |
| 2199 | |
| 2200 | === modified file 'lib/lp/code/model/tests/test_revision.py' |
| 2201 | --- lib/lp/code/model/tests/test_revision.py 2012-06-07 04:52:02 +0000 |
| 2202 | +++ lib/lp/code/model/tests/test_revision.py 2012-09-20 17:34:56 +0000 |
| 2203 | @@ -19,6 +19,7 @@ |
| 2204 | from zope.component import getUtility |
| 2205 | from zope.security.proxy import removeSecurityProxy |
| 2206 | |
| 2207 | +from lp.app.enums import InformationType |
| 2208 | from lp.code.enums import BranchLifecycleStatus |
| 2209 | from lp.code.interfaces.branchlookup import IBranchLookup |
| 2210 | from lp.code.interfaces.revision import IRevisionSet |
| 2211 | @@ -26,7 +27,6 @@ |
| 2212 | RevisionCache, |
| 2213 | RevisionSet, |
| 2214 | ) |
| 2215 | -from lp.registry.enums import InformationType |
| 2216 | from lp.registry.model.karma import Karma |
| 2217 | from lp.scripts.garbo import RevisionAuthorEmailLinker |
| 2218 | from lp.services.database.lpstorm import IMasterObject |
| 2219 | |
| 2220 | === modified file 'lib/lp/code/model/tests/test_sourcepackagerecipe.py' |
| 2221 | --- lib/lp/code/model/tests/test_sourcepackagerecipe.py 2012-09-05 05:08:26 +0000 |
| 2222 | +++ lib/lp/code/model/tests/test_sourcepackagerecipe.py 2012-09-20 17:34:56 +0000 |
| 2223 | @@ -22,6 +22,7 @@ |
| 2224 | from zope.security.interfaces import Unauthorized |
| 2225 | from zope.security.proxy import removeSecurityProxy |
| 2226 | |
| 2227 | +from lp.app.enums import InformationType |
| 2228 | from lp.buildmaster.enums import BuildStatus |
| 2229 | from lp.buildmaster.interfaces.buildqueue import IBuildQueue |
| 2230 | from lp.buildmaster.model.buildqueue import BuildQueue |
| 2231 | @@ -51,7 +52,6 @@ |
| 2232 | ) |
| 2233 | from lp.code.model.sourcepackagerecipedata import SourcePackageRecipeData |
| 2234 | from lp.code.tests.helpers import recipe_parser_newest_version |
| 2235 | -from lp.registry.enums import InformationType |
| 2236 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2237 | from lp.registry.interfaces.series import SeriesStatus |
| 2238 | from lp.services.database.bulk import load_referencing |
| 2239 | |
| 2240 | === modified file 'lib/lp/code/model/tests/test_sourcepackagerecipebuild.py' |
| 2241 | --- lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2012-05-24 02:16:59 +0000 |
| 2242 | +++ lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2012-09-20 17:34:56 +0000 |
| 2243 | @@ -18,6 +18,7 @@ |
| 2244 | from zope.component import getUtility |
| 2245 | from zope.security.proxy import removeSecurityProxy |
| 2246 | |
| 2247 | +from lp.app.enums import InformationType |
| 2248 | from lp.app.errors import NotFoundError |
| 2249 | from lp.buildmaster.enums import BuildStatus |
| 2250 | from lp.buildmaster.interfaces.buildqueue import IBuildQueue |
| 2251 | @@ -38,7 +39,6 @@ |
| 2252 | SourcePackageRecipeBuildMailer, |
| 2253 | ) |
| 2254 | from lp.code.model.sourcepackagerecipebuild import SourcePackageRecipeBuild |
| 2255 | -from lp.registry.enums import InformationType |
| 2256 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2257 | from lp.registry.interfaces.series import SeriesStatus |
| 2258 | from lp.services.database.lpstorm import IStore |
| 2259 | |
| 2260 | === modified file 'lib/lp/code/stories/branches/xx-private-branch-listings.txt' |
| 2261 | --- lib/lp/code/stories/branches/xx-private-branch-listings.txt 2012-06-20 17:17:58 +0000 |
| 2262 | +++ lib/lp/code/stories/branches/xx-private-branch-listings.txt 2012-09-20 17:34:56 +0000 |
| 2263 | @@ -25,7 +25,7 @@ |
| 2264 | >>> from zope.component import getUtility |
| 2265 | >>> from lp.services.database.sqlbase import flush_database_updates |
| 2266 | >>> from lp.code.enums import BranchType |
| 2267 | - >>> from lp.registry.enums import InformationType |
| 2268 | + >>> from lp.app.enums import InformationType |
| 2269 | >>> from lp.registry.interfaces.person import IPersonSet |
| 2270 | >>> from lp.registry.interfaces.product import IProductSet |
| 2271 | >>> login('no-priv@canonical.com') |
| 2272 | |
| 2273 | === modified file 'lib/lp/code/stories/webservice/xx-branchmergeproposal.txt' |
| 2274 | --- lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2012-06-07 04:52:02 +0000 |
| 2275 | +++ lib/lp/code/stories/webservice/xx-branchmergeproposal.txt 2012-09-20 17:34:56 +0000 |
| 2276 | @@ -420,7 +420,7 @@ |
| 2277 | |
| 2278 | >>> login('admin@canonical.com') |
| 2279 | >>> from zope.security.proxy import removeSecurityProxy |
| 2280 | - >>> from lp.registry.enums import InformationType |
| 2281 | + >>> from lp.app.enums import InformationType |
| 2282 | >>> branch_owner = fixit_proposal.source_branch.owner |
| 2283 | >>> removeSecurityProxy( |
| 2284 | ... fixit_proposal.source_branch).transitionToInformationType( |
| 2285 | |
| 2286 | === modified file 'lib/lp/code/tests/helpers.py' |
| 2287 | --- lib/lp/code/tests/helpers.py 2012-05-31 03:54:13 +0000 |
| 2288 | +++ lib/lp/code/tests/helpers.py 2012-09-20 17:34:56 +0000 |
| 2289 | @@ -30,6 +30,7 @@ |
| 2290 | removeSecurityProxy, |
| 2291 | ) |
| 2292 | |
| 2293 | +from lp.app.enums import InformationType |
| 2294 | from lp.code.interfaces.branchmergeproposal import ( |
| 2295 | IBranchMergeProposalJobSource, |
| 2296 | ) |
| 2297 | @@ -38,7 +39,6 @@ |
| 2298 | from lp.code.model.seriessourcepackagebranch import ( |
| 2299 | SeriesSourcePackageBranchSet, |
| 2300 | ) |
| 2301 | -from lp.registry.enums import InformationType |
| 2302 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2303 | from lp.registry.interfaces.series import SeriesStatus |
| 2304 | from lp.services.database.sqlbase import cursor |
| 2305 | |
| 2306 | === modified file 'lib/lp/code/tests/test_branch.py' |
| 2307 | --- lib/lp/code/tests/test_branch.py 2012-06-07 10:28:18 +0000 |
| 2308 | +++ lib/lp/code/tests/test_branch.py 2012-09-20 17:34:56 +0000 |
| 2309 | @@ -7,6 +7,7 @@ |
| 2310 | from zope.security.proxy import removeSecurityProxy |
| 2311 | |
| 2312 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2313 | +from lp.app.enums import InformationType |
| 2314 | from lp.code.enums import ( |
| 2315 | BranchSubscriptionDiffSize, |
| 2316 | BranchSubscriptionNotificationLevel, |
| 2317 | @@ -14,7 +15,6 @@ |
| 2318 | ) |
| 2319 | from lp.code.interfaces.codehosting import SUPPORTED_SCHEMES |
| 2320 | from lp.code.tests.helpers import make_official_package_branch |
| 2321 | -from lp.registry.enums import InformationType |
| 2322 | from lp.services.webapp.authorization import check_permission |
| 2323 | from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet |
| 2324 | from lp.testing import ( |
| 2325 | |
| 2326 | === modified file 'lib/lp/code/tests/test_branch_access_policy_triggers.py' |
| 2327 | --- lib/lp/code/tests/test_branch_access_policy_triggers.py 2012-07-10 10:58:27 +0000 |
| 2328 | +++ lib/lp/code/tests/test_branch_access_policy_triggers.py 2012-09-20 17:34:56 +0000 |
| 2329 | @@ -5,8 +5,8 @@ |
| 2330 | |
| 2331 | from zope.security.proxy import removeSecurityProxy |
| 2332 | |
| 2333 | +from lp.app.enums import InformationType |
| 2334 | from lp.code.model.branch import Branch |
| 2335 | -from lp.registry.enums import InformationType |
| 2336 | from lp.services.database.lpstorm import IStore |
| 2337 | from lp.testing import TestCaseWithFactory |
| 2338 | from lp.testing.layers import DatabaseFunctionalLayer |
| 2339 | |
| 2340 | === modified file 'lib/lp/code/tests/test_branch_webservice.py' |
| 2341 | --- lib/lp/code/tests/test_branch_webservice.py 2012-05-31 03:54:13 +0000 |
| 2342 | +++ lib/lp/code/tests/test_branch_webservice.py 2012-09-20 17:34:56 +0000 |
| 2343 | @@ -8,9 +8,9 @@ |
| 2344 | from zope.security.management import endInteraction |
| 2345 | from zope.security.proxy import removeSecurityProxy |
| 2346 | |
| 2347 | +from lp.app.enums import InformationType |
| 2348 | from lp.code.interfaces.branch import IBranchSet |
| 2349 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
| 2350 | -from lp.registry.enums import InformationType |
| 2351 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2352 | from lp.testing import ( |
| 2353 | api_url, |
| 2354 | |
| 2355 | === modified file 'lib/lp/code/xmlrpc/tests/test_branch.py' |
| 2356 | --- lib/lp/code/xmlrpc/tests/test_branch.py 2012-05-31 03:54:13 +0000 |
| 2357 | +++ lib/lp/code/xmlrpc/tests/test_branch.py 2012-09-20 17:34:56 +0000 |
| 2358 | @@ -12,11 +12,11 @@ |
| 2359 | from lazr.uri import URI |
| 2360 | from zope.security.proxy import removeSecurityProxy |
| 2361 | |
| 2362 | +from lp.app.enums import InformationType |
| 2363 | from lp.code.enums import BranchType |
| 2364 | from lp.code.interfaces.codehosting import BRANCH_ALIAS_PREFIX |
| 2365 | from lp.code.interfaces.linkedbranch import ICanHasLinkedBranch |
| 2366 | from lp.code.xmlrpc.branch import PublicCodehostingAPI |
| 2367 | -from lp.registry.enums import InformationType |
| 2368 | from lp.services.xmlrpc import LaunchpadFault |
| 2369 | from lp.testing import ( |
| 2370 | person_logged_in, |
| 2371 | |
| 2372 | === modified file 'lib/lp/code/xmlrpc/tests/test_codehosting.py' |
| 2373 | --- lib/lp/code/xmlrpc/tests/test_codehosting.py 2012-05-31 03:54:13 +0000 |
| 2374 | +++ lib/lp/code/xmlrpc/tests/test_codehosting.py 2012-09-20 17:34:56 +0000 |
| 2375 | @@ -16,6 +16,7 @@ |
| 2376 | from zope.component import getUtility |
| 2377 | from zope.security.proxy import removeSecurityProxy |
| 2378 | |
| 2379 | +from lp.app.enums import InformationType |
| 2380 | from lp.app.errors import NotFoundError |
| 2381 | from lp.code.bzr import ( |
| 2382 | BranchFormat, |
| 2383 | @@ -43,7 +44,6 @@ |
| 2384 | run_with_login, |
| 2385 | ) |
| 2386 | from lp.codehosting.inmemory import InMemoryFrontend |
| 2387 | -from lp.registry.enums import InformationType |
| 2388 | from lp.services.database.constants import UTC_NOW |
| 2389 | from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet |
| 2390 | from lp.services.webapp.interfaces import ILaunchBag |
| 2391 | |
| 2392 | === modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py' |
| 2393 | --- lib/lp/codehosting/codeimport/tests/test_worker.py 2012-06-26 08:19:13 +0000 |
| 2394 | +++ lib/lp/codehosting/codeimport/tests/test_worker.py 2012-09-20 17:34:56 +0000 |
| 2395 | @@ -48,6 +48,7 @@ |
| 2396 | import subvertpy.client |
| 2397 | import subvertpy.ra |
| 2398 | |
| 2399 | +from lp.app.enums import InformationType |
| 2400 | from lp.code.interfaces.codehosting import ( |
| 2401 | branch_id_alias, |
| 2402 | compose_public_url, |
| 2403 | @@ -87,7 +88,6 @@ |
| 2404 | SafeBranchOpener, |
| 2405 | ) |
| 2406 | from lp.codehosting.tests.helpers import create_branch_with_one_revision |
| 2407 | -from lp.registry.enums import InformationType |
| 2408 | from lp.services.config import config |
| 2409 | from lp.services.log.logger import BufferLogger |
| 2410 | from lp.testing import ( |
| 2411 | |
| 2412 | === modified file 'lib/lp/codehosting/inmemory.py' |
| 2413 | --- lib/lp/codehosting/inmemory.py 2012-07-04 18:06:32 +0000 |
| 2414 | +++ lib/lp/codehosting/inmemory.py 2012-09-20 17:34:56 +0000 |
| 2415 | @@ -23,6 +23,11 @@ |
| 2416 | ) |
| 2417 | from zope.interface import implementer |
| 2418 | |
| 2419 | +from lp.app.enums import ( |
| 2420 | + InformationType, |
| 2421 | + PRIVATE_INFORMATION_TYPES, |
| 2422 | + PUBLIC_INFORMATION_TYPES, |
| 2423 | + ) |
| 2424 | from lp.app.validators import LaunchpadValidationError |
| 2425 | from lp.app.validators.name import valid_name |
| 2426 | from lp.code.bzr import ( |
| 2427 | @@ -50,11 +55,6 @@ |
| 2428 | ProductBranchTarget, |
| 2429 | ) |
| 2430 | from lp.code.xmlrpc.codehosting import datetime_from_tuple |
| 2431 | -from lp.registry.enums import ( |
| 2432 | - InformationType, |
| 2433 | - PRIVATE_INFORMATION_TYPES, |
| 2434 | - PUBLIC_INFORMATION_TYPES, |
| 2435 | - ) |
| 2436 | from lp.registry.errors import InvalidName |
| 2437 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 2438 | from lp.services.database.constants import UTC_NOW |
| 2439 | |
| 2440 | === modified file 'lib/lp/codehosting/puller/tests/test_acceptance.py' |
| 2441 | --- lib/lp/codehosting/puller/tests/test_acceptance.py 2012-05-31 03:54:13 +0000 |
| 2442 | +++ lib/lp/codehosting/puller/tests/test_acceptance.py 2012-09-20 17:34:56 +0000 |
| 2443 | @@ -27,12 +27,12 @@ |
| 2444 | from zope.component import getUtility |
| 2445 | from zope.security.proxy import removeSecurityProxy |
| 2446 | |
| 2447 | +from lp.app.enums import InformationType |
| 2448 | from lp.code.enums import BranchType |
| 2449 | from lp.code.interfaces.branchtarget import IBranchTarget |
| 2450 | from lp.codehosting.puller.tests import PullerBranchTestCase |
| 2451 | from lp.codehosting.tests.helpers import LoomTestMixin |
| 2452 | from lp.codehosting.vfs import get_lp_server |
| 2453 | -from lp.registry.enums import InformationType |
| 2454 | from lp.services.config import config |
| 2455 | from lp.services.scripts.interfaces.scriptactivity import IScriptActivitySet |
| 2456 | from lp.testing.layers import ZopelessAppServerLayer |
| 2457 | |
| 2458 | === modified file 'lib/lp/codehosting/tests/test_rewrite.py' |
| 2459 | --- lib/lp/codehosting/tests/test_rewrite.py 2012-06-29 21:41:59 +0000 |
| 2460 | +++ lib/lp/codehosting/tests/test_rewrite.py 2012-09-20 17:34:56 +0000 |
| 2461 | @@ -13,10 +13,10 @@ |
| 2462 | import transaction |
| 2463 | from zope.security.proxy import removeSecurityProxy |
| 2464 | |
| 2465 | +from lp.app.enums import InformationType |
| 2466 | from lp.code.interfaces.codehosting import branch_id_alias |
| 2467 | from lp.codehosting.rewrite import BranchRewriter |
| 2468 | from lp.codehosting.vfs import branch_id_to_path |
| 2469 | -from lp.registry.enums import InformationType |
| 2470 | from lp.services.config import config |
| 2471 | from lp.services.log.logger import BufferLogger |
| 2472 | from lp.testing import ( |
| 2473 | |
| 2474 | === modified file 'lib/lp/registry/browser/product.py' |
| 2475 | --- lib/lp/registry/browser/product.py 2012-09-14 00:59:44 +0000 |
| 2476 | +++ lib/lp/registry/browser/product.py 2012-09-20 17:34:56 +0000 |
| 2477 | @@ -108,10 +108,15 @@ |
| 2478 | format_link, |
| 2479 | MenuAPI, |
| 2480 | ) |
| 2481 | -from lp.app.enums import ServiceUsage |
| 2482 | +from lp.app.enums import ( |
| 2483 | + InformationType, |
| 2484 | + PUBLIC_PROPRIETARY_INFORMATION_TYPES, |
| 2485 | + ServiceUsage, |
| 2486 | + ) |
| 2487 | from lp.app.errors import NotFoundError |
| 2488 | from lp.app.interfaces.headings import IEditableContextTitle |
| 2489 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2490 | +from lp.app.utilities import json_dump_information_types |
| 2491 | from lp.app.widgets.date import DateWidget |
| 2492 | from lp.app.widgets.itemswidgets import ( |
| 2493 | CheckBoxMatrixWidget, |
| 2494 | @@ -158,10 +163,6 @@ |
| 2495 | PillarViewMixin, |
| 2496 | ) |
| 2497 | from lp.registry.browser.productseries import get_series_branch_error |
| 2498 | -from lp.registry.enums import ( |
| 2499 | - json_dump_information_types, |
| 2500 | - InformationType, |
| 2501 | - ) |
| 2502 | from lp.registry.interfaces.pillar import IPillarNameSet |
| 2503 | from lp.registry.interfaces.product import ( |
| 2504 | IProduct, |
| 2505 | @@ -2027,12 +2028,11 @@ |
| 2506 | def initialize(self): |
| 2507 | # The JSON cache must be populated before the super call, since |
| 2508 | # the form is rendered during LaunchpadFormView's initialize() |
| 2509 | - # when an action is invokved. |
| 2510 | + # when an action is invoked. |
| 2511 | if IProductSet.providedBy(self.context): |
| 2512 | cache = IJSONRequestCache(self.request) |
| 2513 | - json_dump_information_types( |
| 2514 | - cache, |
| 2515 | - self.context.getAllowedProductInformationTypes()) |
| 2516 | + json_dump_information_types(cache, |
| 2517 | + PUBLIC_PROPRIETARY_INFORMATION_TYPES) |
| 2518 | super(ProjectAddStepTwo, self).initialize() |
| 2519 | |
| 2520 | @property |
| 2521 | |
| 2522 | === modified file 'lib/lp/registry/browser/tests/milestone-views.txt' |
| 2523 | --- lib/lp/registry/browser/tests/milestone-views.txt 2012-08-08 11:48:29 +0000 |
| 2524 | +++ lib/lp/registry/browser/tests/milestone-views.txt 2012-09-20 17:34:56 +0000 |
| 2525 | @@ -737,7 +737,7 @@ |
| 2526 | |
| 2527 | >>> ignored = login_person(owner) |
| 2528 | >>> milestone = firefox_1_0.newMilestone('1.0.13') |
| 2529 | - >>> from lp.registry.enums import InformationType |
| 2530 | + >>> from lp.app.enums import InformationType |
| 2531 | >>> private_bug = factory.makeBug( |
| 2532 | ... target=firefox, information_type=InformationType.USERDATA) |
| 2533 | >>> private_bugtask = bug.bugtasks[0] |
| 2534 | |
| 2535 | === modified file 'lib/lp/registry/browser/tests/test_milestone.py' |
| 2536 | --- lib/lp/registry/browser/tests/test_milestone.py 2012-08-13 19:34:10 +0000 |
| 2537 | +++ lib/lp/registry/browser/tests/test_milestone.py 2012-09-20 17:34:56 +0000 |
| 2538 | @@ -10,10 +10,10 @@ |
| 2539 | from testtools.matchers import LessThan |
| 2540 | from zope.component import getUtility |
| 2541 | |
| 2542 | +from lp.app.enums import InformationType |
| 2543 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2544 | from lp.bugs.interfaces.bugtask import IBugTaskSet |
| 2545 | from lp.bugs.interfaces.bugtasksearch import BugTaskSearchParams |
| 2546 | -from lp.registry.enums import InformationType |
| 2547 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 2548 | from lp.registry.model.milestonetag import ProjectGroupMilestoneTag |
| 2549 | from lp.services.config import config |
| 2550 | |
| 2551 | === modified file 'lib/lp/registry/browser/tests/test_peoplemerge.py' |
| 2552 | --- lib/lp/registry/browser/tests/test_peoplemerge.py 2012-09-17 02:53:26 +0000 |
| 2553 | +++ lib/lp/registry/browser/tests/test_peoplemerge.py 2012-09-20 17:34:56 +0000 |
| 2554 | @@ -7,10 +7,8 @@ |
| 2555 | from zope.component import getUtility |
| 2556 | from zope.security.proxy import removeSecurityProxy |
| 2557 | |
| 2558 | -from lp.registry.enums import ( |
| 2559 | - InformationType, |
| 2560 | - TeamMembershipPolicy, |
| 2561 | - ) |
| 2562 | +from lp.app.enums import InformationType |
| 2563 | +from lp.registry.enums import TeamMembershipPolicy |
| 2564 | from lp.registry.interfaces.person import IPersonSet |
| 2565 | from lp.registry.interfaces.persontransferjob import IPersonMergeJobSource |
| 2566 | from lp.services.identity.interfaces.emailaddress import EmailAddressStatus |
| 2567 | |
| 2568 | === modified file 'lib/lp/registry/browser/tests/test_pillar_sharing.py' |
| 2569 | --- lib/lp/registry/browser/tests/test_pillar_sharing.py 2012-09-14 13:24:20 +0000 |
| 2570 | +++ lib/lp/registry/browser/tests/test_pillar_sharing.py 2012-09-20 17:34:56 +0000 |
| 2571 | @@ -19,11 +19,11 @@ |
| 2572 | from zope.component import getUtility |
| 2573 | from zope.traversing.browser.absoluteurl import absoluteURL |
| 2574 | |
| 2575 | +from lp.app.enums import InformationType |
| 2576 | from lp.app.interfaces.services import IService |
| 2577 | from lp.registry.enums import ( |
| 2578 | BranchSharingPolicy, |
| 2579 | BugSharingPolicy, |
| 2580 | - InformationType, |
| 2581 | ) |
| 2582 | from lp.registry.interfaces.accesspolicy import IAccessPolicyGrantFlatSource |
| 2583 | from lp.registry.model.pillar import PillarPerson |
| 2584 | |
| 2585 | === modified file 'lib/lp/registry/browser/tests/test_team.py' |
| 2586 | --- lib/lp/registry/browser/tests/test_team.py 2012-09-03 22:17:09 +0000 |
| 2587 | +++ lib/lp/registry/browser/tests/test_team.py 2012-09-20 17:34:56 +0000 |
| 2588 | @@ -11,6 +11,7 @@ |
| 2589 | from zope.component import getUtility |
| 2590 | from zope.security.proxy import removeSecurityProxy |
| 2591 | |
| 2592 | +from lp.app.enums import InformationType |
| 2593 | from lp.registry.browser.team import ( |
| 2594 | TeamIndexMenu, |
| 2595 | TeamMailingListArchiveView, |
| 2596 | @@ -19,7 +20,6 @@ |
| 2597 | from lp.registry.enums import ( |
| 2598 | EXCLUSIVE_TEAM_POLICY, |
| 2599 | INCLUSIVE_TEAM_POLICY, |
| 2600 | - InformationType, |
| 2601 | PersonVisibility, |
| 2602 | TeamMembershipPolicy, |
| 2603 | TeamMembershipRenewalPolicy, |
| 2604 | |
| 2605 | === modified file 'lib/lp/registry/enums.py' |
| 2606 | --- lib/lp/registry/enums.py 2012-09-16 12:49:11 +0000 |
| 2607 | +++ lib/lp/registry/enums.py 2012-09-20 17:34:56 +0000 |
| 2608 | @@ -10,20 +10,10 @@ |
| 2609 | 'DistroSeriesDifferenceStatus', |
| 2610 | 'DistroSeriesDifferenceType', |
| 2611 | 'EXCLUSIVE_TEAM_POLICY', |
| 2612 | - 'FREE_INFORMATION_TYPES', |
| 2613 | - 'FREE_PRIVATE_INFORMATION_TYPES', |
| 2614 | 'INCLUSIVE_TEAM_POLICY', |
| 2615 | - 'InformationType', |
| 2616 | - 'json_dump_information_types', |
| 2617 | - 'NON_EMBARGOED_INFORMATION_TYPES', |
| 2618 | 'PersonTransferJobType', |
| 2619 | 'PersonVisibility', |
| 2620 | - 'PRIVATE_INFORMATION_TYPES', |
| 2621 | - 'PROPRIETARY_INFORMATION_TYPES', |
| 2622 | - 'PUBLIC_INFORMATION_TYPES', |
| 2623 | - 'PUBLIC_PROPRIETARY_INFORMATION_TYPES', |
| 2624 | 'ProductJobType', |
| 2625 | - 'SECURITY_INFORMATION_TYPES', |
| 2626 | 'SharingPermission', |
| 2627 | 'SpecificationSharingPolicy', |
| 2628 | 'TeamMembershipPolicy', |
| 2629 | @@ -36,95 +26,6 @@ |
| 2630 | ) |
| 2631 | |
| 2632 | |
| 2633 | -class InformationType(DBEnumeratedType): |
| 2634 | - """Information Type. |
| 2635 | - |
| 2636 | - The types used to control which users and teams can see various |
| 2637 | - Launchpad artifacts, including bugs and branches. |
| 2638 | - """ |
| 2639 | - |
| 2640 | - PUBLIC = DBItem(1, """ |
| 2641 | - Public |
| 2642 | - |
| 2643 | - Everyone can see this information. |
| 2644 | - """) |
| 2645 | - |
| 2646 | - PUBLICSECURITY = DBItem(2, """ |
| 2647 | - Public Security |
| 2648 | - |
| 2649 | - Everyone can see this security related information. |
| 2650 | - """) |
| 2651 | - |
| 2652 | - PRIVATESECURITY = DBItem(3, """ |
| 2653 | - Private Security |
| 2654 | - |
| 2655 | - Only the security group can see this information. |
| 2656 | - """) |
| 2657 | - |
| 2658 | - USERDATA = DBItem(4, """ |
| 2659 | - Private |
| 2660 | - |
| 2661 | - Only shared with users permitted to see private user information. |
| 2662 | - """) |
| 2663 | - |
| 2664 | - PROPRIETARY = DBItem(5, """ |
| 2665 | - Proprietary |
| 2666 | - |
| 2667 | - Only shared with users permitted to see proprietary information. |
| 2668 | - """) |
| 2669 | - |
| 2670 | - EMBARGOED = DBItem(6, """ |
| 2671 | - Embargoed |
| 2672 | - |
| 2673 | - Only shared with users permitted to see embargoed information. |
| 2674 | - """) |
| 2675 | - |
| 2676 | - |
| 2677 | -PUBLIC_INFORMATION_TYPES = ( |
| 2678 | - InformationType.PUBLIC, InformationType.PUBLICSECURITY) |
| 2679 | - |
| 2680 | -PRIVATE_INFORMATION_TYPES = ( |
| 2681 | - InformationType.PRIVATESECURITY, InformationType.USERDATA, |
| 2682 | - InformationType.PROPRIETARY, InformationType.EMBARGOED) |
| 2683 | - |
| 2684 | -NON_EMBARGOED_INFORMATION_TYPES = ( |
| 2685 | - PUBLIC_INFORMATION_TYPES + |
| 2686 | - (InformationType.PRIVATESECURITY, InformationType.USERDATA, |
| 2687 | - InformationType.PROPRIETARY)) |
| 2688 | - |
| 2689 | -SECURITY_INFORMATION_TYPES = ( |
| 2690 | - InformationType.PUBLICSECURITY, InformationType.PRIVATESECURITY) |
| 2691 | - |
| 2692 | -FREE_PRIVATE_INFORMATION_TYPES = ( |
| 2693 | - InformationType.PRIVATESECURITY, InformationType.USERDATA) |
| 2694 | - |
| 2695 | -FREE_INFORMATION_TYPES = ( |
| 2696 | - PUBLIC_INFORMATION_TYPES + FREE_PRIVATE_INFORMATION_TYPES) |
| 2697 | - |
| 2698 | -PROPRIETARY_INFORMATION_TYPES = ( |
| 2699 | - InformationType.PROPRIETARY, InformationType.EMBARGOED) |
| 2700 | - |
| 2701 | -# The information types unrelated to user data or security |
| 2702 | -PUBLIC_PROPRIETARY_INFORMATION_TYPES = ( |
| 2703 | - (InformationType.PUBLIC,) + PROPRIETARY_INFORMATION_TYPES |
| 2704 | -) |
| 2705 | - |
| 2706 | - |
| 2707 | -def json_dump_information_types(cache, information_types): |
| 2708 | - """Dump a dict of the data in the types requested.""" |
| 2709 | - dump = {} |
| 2710 | - order = list(InformationType.sort_order) |
| 2711 | - for term in information_types: |
| 2712 | - dump[term.name] = { |
| 2713 | - 'value': term.name, |
| 2714 | - 'description': term.description, |
| 2715 | - 'name': term.title, |
| 2716 | - 'order': order.index(term.name), |
| 2717 | - 'is_private': (term not in PUBLIC_INFORMATION_TYPES), 'description_css_class': 'choice-description', |
| 2718 | - } |
| 2719 | - |
| 2720 | - cache.objects['information_type_data'] = dump |
| 2721 | - |
| 2722 | class SharingPermission(DBEnumeratedType): |
| 2723 | """Sharing permission. |
| 2724 | |
| 2725 | |
| 2726 | === modified file 'lib/lp/registry/interfaces/product.py' |
| 2727 | --- lib/lp/registry/interfaces/product.py 2012-09-19 05:15:39 +0000 |
| 2728 | +++ lib/lp/registry/interfaces/product.py 2012-09-20 17:34:56 +0000 |
| 2729 | @@ -72,6 +72,7 @@ |
| 2730 | from zope.schema.vocabulary import SimpleVocabulary |
| 2731 | |
| 2732 | from lp import _ |
| 2733 | +from lp.app.enums import InformationType |
| 2734 | from lp.answers.interfaces.questiontarget import IQuestionTarget |
| 2735 | from lp.app.errors import NameLookupFailed |
| 2736 | from lp.app.interfaces.headings import IRootContext |
| 2737 | @@ -109,7 +110,6 @@ |
| 2738 | BranchSharingPolicy, |
| 2739 | BugSharingPolicy, |
| 2740 | SpecificationSharingPolicy, |
| 2741 | - InformationType, |
| 2742 | ) |
| 2743 | from lp.registry.interfaces.announcement import IMakesAnnouncements |
| 2744 | from lp.registry.interfaces.commercialsubscription import ( |
| 2745 | @@ -998,12 +998,6 @@ |
| 2746 | returned. |
| 2747 | """ |
| 2748 | |
| 2749 | - def getAllowedProductInformationTypes(): |
| 2750 | - """Get the information types that a project can have. |
| 2751 | - |
| 2752 | - :return: A sequence of `InformationType`s. |
| 2753 | - """ |
| 2754 | - |
| 2755 | @call_with(owner=REQUEST_USER) |
| 2756 | @rename_parameters_as( |
| 2757 | displayname='display_name', project='project_group', |
| 2758 | |
| 2759 | === modified file 'lib/lp/registry/interfaces/sharingservice.py' |
| 2760 | --- lib/lp/registry/interfaces/sharingservice.py 2012-09-18 16:41:02 +0000 |
| 2761 | +++ lib/lp/registry/interfaces/sharingservice.py 2012-09-20 17:34:56 +0000 |
| 2762 | @@ -27,6 +27,7 @@ |
| 2763 | ) |
| 2764 | |
| 2765 | from lp import _ |
| 2766 | +from lp.app.enums import InformationType |
| 2767 | from lp.app.interfaces.services import IService |
| 2768 | from lp.blueprints.interfaces.specification import ISpecification |
| 2769 | from lp.bugs.interfaces.bug import IBug |
| 2770 | @@ -34,7 +35,6 @@ |
| 2771 | from lp.registry.enums import ( |
| 2772 | BranchSharingPolicy, |
| 2773 | BugSharingPolicy, |
| 2774 | - InformationType, |
| 2775 | SharingPermission, |
| 2776 | SpecificationSharingPolicy, |
| 2777 | ) |
| 2778 | |
| 2779 | === modified file 'lib/lp/registry/model/accesspolicy.py' |
| 2780 | --- lib/lp/registry/model/accesspolicy.py 2012-09-18 18:18:28 +0000 |
| 2781 | +++ lib/lp/registry/model/accesspolicy.py 2012-09-20 17:34:56 +0000 |
| 2782 | @@ -34,11 +34,11 @@ |
| 2783 | from zope.component import getUtility |
| 2784 | from zope.interface import implements |
| 2785 | |
| 2786 | -from lp.registry.enums import ( |
| 2787 | +from lp.app.enums import ( |
| 2788 | InformationType, |
| 2789 | PUBLIC_INFORMATION_TYPES, |
| 2790 | - SharingPermission, |
| 2791 | ) |
| 2792 | +from lp.registry.enums import SharingPermission |
| 2793 | from lp.registry.interfaces.accesspolicy import ( |
| 2794 | IAccessArtifact, |
| 2795 | IAccessArtifactGrant, |
| 2796 | |
| 2797 | === modified file 'lib/lp/registry/model/distribution.py' |
| 2798 | --- lib/lp/registry/model/distribution.py 2012-09-13 21:58:12 +0000 |
| 2799 | +++ lib/lp/registry/model/distribution.py 2012-09-20 17:34:56 +0000 |
| 2800 | @@ -48,7 +48,13 @@ |
| 2801 | QuestionTargetMixin, |
| 2802 | QuestionTargetSearch, |
| 2803 | ) |
| 2804 | -from lp.app.enums import ServiceUsage |
| 2805 | +from lp.app.enums import ( |
| 2806 | + FREE_INFORMATION_TYPES, |
| 2807 | + InformationType, |
| 2808 | + PRIVATE_INFORMATION_TYPES, |
| 2809 | + PUBLIC_INFORMATION_TYPES, |
| 2810 | + ServiceUsage, |
| 2811 | + ) |
| 2812 | from lp.app.errors import NotFoundError |
| 2813 | from lp.app.interfaces.launchpad import ( |
| 2814 | IHasIcon, |
| 2815 | @@ -93,10 +99,6 @@ |
| 2816 | from lp.registry.enums import ( |
| 2817 | BranchSharingPolicy, |
| 2818 | BugSharingPolicy, |
| 2819 | - FREE_INFORMATION_TYPES, |
| 2820 | - InformationType, |
| 2821 | - PRIVATE_INFORMATION_TYPES, |
| 2822 | - PUBLIC_INFORMATION_TYPES, |
| 2823 | SpecificationSharingPolicy, |
| 2824 | ) |
| 2825 | from lp.registry.errors import NoSuchDistroSeries |
| 2826 | |
| 2827 | === modified file 'lib/lp/registry/model/person.py' |
| 2828 | --- lib/lp/registry/model/person.py 2012-09-14 05:49:32 +0000 |
| 2829 | +++ lib/lp/registry/model/person.py 2012-09-20 17:34:56 +0000 |
| 2830 | @@ -108,6 +108,7 @@ |
| 2831 | ) |
| 2832 | |
| 2833 | from lp import _ |
| 2834 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 2835 | from lp.answers.model.questionsperson import QuestionsPersonMixin |
| 2836 | from lp.app.interfaces.launchpad import ( |
| 2837 | IHasIcon, |
| 2838 | @@ -152,7 +153,6 @@ |
| 2839 | EXCLUSIVE_TEAM_POLICY, |
| 2840 | INCLUSIVE_TEAM_POLICY, |
| 2841 | PersonVisibility, |
| 2842 | - PRIVATE_INFORMATION_TYPES, |
| 2843 | TeamMembershipPolicy, |
| 2844 | TeamMembershipRenewalPolicy, |
| 2845 | ) |
| 2846 | |
| 2847 | === modified file 'lib/lp/registry/model/product.py' |
| 2848 | --- lib/lp/registry/model/product.py 2012-09-19 05:15:39 +0000 |
| 2849 | +++ lib/lp/registry/model/product.py 2012-09-20 17:34:56 +0000 |
| 2850 | @@ -66,6 +66,9 @@ |
| 2851 | QuestionTargetSearch, |
| 2852 | ) |
| 2853 | from lp.app.enums import ( |
| 2854 | + FREE_INFORMATION_TYPES, |
| 2855 | + InformationType, |
| 2856 | + PRIVATE_INFORMATION_TYPES, |
| 2857 | service_uses_launchpad, |
| 2858 | ServiceUsage, |
| 2859 | ) |
| 2860 | @@ -121,9 +124,6 @@ |
| 2861 | from lp.registry.enums import ( |
| 2862 | BranchSharingPolicy, |
| 2863 | BugSharingPolicy, |
| 2864 | - FREE_INFORMATION_TYPES, |
| 2865 | - InformationType, |
| 2866 | - PRIVATE_INFORMATION_TYPES, |
| 2867 | SpecificationSharingPolicy, |
| 2868 | ) |
| 2869 | from lp.registry.errors import CommercialSubscribersOnly |
| 2870 | @@ -1589,12 +1589,6 @@ |
| 2871 | results = results.limit(num_products) |
| 2872 | return results |
| 2873 | |
| 2874 | - def getAllowedProductInformationTypes(self): |
| 2875 | - """See `IProductSet`.""" |
| 2876 | - return (InformationType.PUBLIC, |
| 2877 | - InformationType.EMBARGOED, |
| 2878 | - InformationType.PROPRIETARY) |
| 2879 | - |
| 2880 | def createProduct(self, owner, name, displayname, title, summary, |
| 2881 | description=None, project=None, homepageurl=None, |
| 2882 | screenshotsurl=None, wikiurl=None, |
| 2883 | |
| 2884 | === modified file 'lib/lp/registry/model/sharingjob.py' |
| 2885 | --- lib/lp/registry/model/sharingjob.py 2012-07-13 04:42:34 +0000 |
| 2886 | +++ lib/lp/registry/model/sharingjob.py 2012-09-20 17:34:56 +0000 |
| 2887 | @@ -41,6 +41,7 @@ |
| 2888 | implements, |
| 2889 | ) |
| 2890 | |
| 2891 | +from lp.app.enums import InformationType |
| 2892 | from lp.bugs.interfaces.bug import ( |
| 2893 | IBug, |
| 2894 | IBugSet, |
| 2895 | @@ -55,7 +56,6 @@ |
| 2896 | get_branch_privacy_filter, |
| 2897 | ) |
| 2898 | from lp.code.model.branchsubscription import BranchSubscription |
| 2899 | -from lp.registry.enums import InformationType |
| 2900 | from lp.registry.interfaces.person import IPersonSet |
| 2901 | from lp.registry.interfaces.product import IProduct |
| 2902 | from lp.registry.interfaces.sharingjob import ( |
| 2903 | |
| 2904 | === modified file 'lib/lp/registry/services/sharingservice.py' |
| 2905 | --- lib/lp/registry/services/sharingservice.py 2012-09-18 16:32:01 +0000 |
| 2906 | +++ lib/lp/registry/services/sharingservice.py 2012-09-20 17:34:56 +0000 |
| 2907 | @@ -27,6 +27,7 @@ |
| 2908 | from zope.security.interfaces import Unauthorized |
| 2909 | from zope.traversing.browser.absoluteurl import absoluteURL |
| 2910 | |
| 2911 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 2912 | from lp.app.browser.tales import ObjectImageDisplayAPI |
| 2913 | from lp.blueprints.model.specification import Specification |
| 2914 | from lp.bugs.interfaces.bugtask import IBugTaskSet |
| 2915 | @@ -35,7 +36,6 @@ |
| 2916 | from lp.registry.enums import ( |
| 2917 | BranchSharingPolicy, |
| 2918 | BugSharingPolicy, |
| 2919 | - PRIVATE_INFORMATION_TYPES, |
| 2920 | SharingPermission, |
| 2921 | SpecificationSharingPolicy, |
| 2922 | ) |
| 2923 | |
| 2924 | === modified file 'lib/lp/registry/services/tests/test_sharingservice.py' |
| 2925 | --- lib/lp/registry/services/tests/test_sharingservice.py 2012-09-18 16:32:01 +0000 |
| 2926 | +++ lib/lp/registry/services/tests/test_sharingservice.py 2012-09-20 17:34:56 +0000 |
| 2927 | @@ -13,6 +13,7 @@ |
| 2928 | from zope.security.proxy import removeSecurityProxy |
| 2929 | from zope.traversing.browser.absoluteurl import absoluteURL |
| 2930 | |
| 2931 | +from lp.app.enums import InformationType |
| 2932 | from lp.app.interfaces.services import IService |
| 2933 | from lp.blueprints.interfaces.specification import ISpecification |
| 2934 | from lp.bugs.interfaces.bug import IBug |
| 2935 | @@ -24,7 +25,6 @@ |
| 2936 | from lp.registry.enums import ( |
| 2937 | BranchSharingPolicy, |
| 2938 | BugSharingPolicy, |
| 2939 | - InformationType, |
| 2940 | SharingPermission, |
| 2941 | SpecificationSharingPolicy, |
| 2942 | ) |
| 2943 | |
| 2944 | === modified file 'lib/lp/registry/stories/product/xx-product-development-focus.txt' |
| 2945 | --- lib/lp/registry/stories/product/xx-product-development-focus.txt 2012-07-06 07:39:40 +0000 |
| 2946 | +++ lib/lp/registry/stories/product/xx-product-development-focus.txt 2012-09-20 17:34:56 +0000 |
| 2947 | @@ -146,7 +146,7 @@ |
| 2948 | appears as if there is no series branch set. |
| 2949 | |
| 2950 | >>> login('admin@canonical.com') |
| 2951 | - >>> from lp.registry.enums import InformationType |
| 2952 | + >>> from lp.app.enums import InformationType |
| 2953 | >>> branch.transitionToInformationType( |
| 2954 | ... InformationType.USERDATA, branch.owner, verify_policy=False) |
| 2955 | >>> logout() |
| 2956 | |
| 2957 | === modified file 'lib/lp/registry/tests/test_accesspolicy.py' |
| 2958 | --- lib/lp/registry/tests/test_accesspolicy.py 2012-09-04 10:35:22 +0000 |
| 2959 | +++ lib/lp/registry/tests/test_accesspolicy.py 2012-09-20 17:34:56 +0000 |
| 2960 | @@ -7,10 +7,8 @@ |
| 2961 | from testtools.matchers import AllMatch |
| 2962 | from zope.component import getUtility |
| 2963 | |
| 2964 | -from lp.registry.enums import ( |
| 2965 | - InformationType, |
| 2966 | - SharingPermission, |
| 2967 | - ) |
| 2968 | +from lp.app.enums import InformationType |
| 2969 | +from lp.registry.enums import SharingPermission |
| 2970 | from lp.registry.interfaces.accesspolicy import ( |
| 2971 | IAccessArtifact, |
| 2972 | IAccessArtifactGrant, |
| 2973 | |
| 2974 | === modified file 'lib/lp/registry/tests/test_distribution.py' |
| 2975 | --- lib/lp/registry/tests/test_distribution.py 2012-09-13 15:41:25 +0000 |
| 2976 | +++ lib/lp/registry/tests/test_distribution.py 2012-09-20 17:34:56 +0000 |
| 2977 | @@ -23,7 +23,10 @@ |
| 2978 | from zope.security.interfaces import Unauthorized |
| 2979 | from zope.security.proxy import removeSecurityProxy |
| 2980 | |
| 2981 | -from lp.app.enums import ServiceUsage |
| 2982 | +from lp.app.enums import ( |
| 2983 | + InformationType, |
| 2984 | + ServiceUsage, |
| 2985 | + ) |
| 2986 | from lp.app.errors import NotFoundError |
| 2987 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 2988 | from lp.registry.enums import ( |
| 2989 | @@ -31,7 +34,6 @@ |
| 2990 | BugSharingPolicy, |
| 2991 | EXCLUSIVE_TEAM_POLICY, |
| 2992 | INCLUSIVE_TEAM_POLICY, |
| 2993 | - InformationType, |
| 2994 | ) |
| 2995 | from lp.registry.errors import ( |
| 2996 | InclusiveTeamLinkageError, |
| 2997 | |
| 2998 | === modified file 'lib/lp/registry/tests/test_distro_webservice.py' |
| 2999 | --- lib/lp/registry/tests/test_distro_webservice.py 2012-08-13 19:34:10 +0000 |
| 3000 | +++ lib/lp/registry/tests/test_distro_webservice.py 2012-09-20 17:34:56 +0000 |
| 3001 | @@ -11,6 +11,7 @@ |
| 3002 | from zope.security.management import endInteraction |
| 3003 | from zope.security.proxy import removeSecurityProxy |
| 3004 | |
| 3005 | +from lp.app.enums import InformationType |
| 3006 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3007 | from lp.code.enums import ( |
| 3008 | BranchSubscriptionDiffSize, |
| 3009 | @@ -20,7 +21,6 @@ |
| 3010 | from lp.code.model.seriessourcepackagebranch import ( |
| 3011 | SeriesSourcePackageBranchSet, |
| 3012 | ) |
| 3013 | -from lp.registry.enums import InformationType |
| 3014 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 3015 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 3016 | from lp.testing import ( |
| 3017 | |
| 3018 | === modified file 'lib/lp/registry/tests/test_person.py' |
| 3019 | --- lib/lp/registry/tests/test_person.py 2012-09-07 18:06:37 +0000 |
| 3020 | +++ lib/lp/registry/tests/test_person.py 2012-09-20 17:34:56 +0000 |
| 3021 | @@ -21,6 +21,7 @@ |
| 3022 | from zope.security.interfaces import Unauthorized |
| 3023 | from zope.security.proxy import removeSecurityProxy |
| 3024 | |
| 3025 | +from lp.app.enums import InformationType |
| 3026 | from lp.answers.model.answercontact import AnswerContact |
| 3027 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3028 | from lp.blueprints.model.specification import Specification |
| 3029 | @@ -30,7 +31,6 @@ |
| 3030 | ) |
| 3031 | from lp.bugs.model.bug import Bug |
| 3032 | from lp.registry.enums import ( |
| 3033 | - InformationType, |
| 3034 | PersonVisibility, |
| 3035 | TeamMembershipPolicy, |
| 3036 | ) |
| 3037 | |
| 3038 | === modified file 'lib/lp/registry/tests/test_private_team_visibility.py' |
| 3039 | --- lib/lp/registry/tests/test_private_team_visibility.py 2012-08-13 21:33:47 +0000 |
| 3040 | +++ lib/lp/registry/tests/test_private_team_visibility.py 2012-09-20 17:34:56 +0000 |
| 3041 | @@ -20,8 +20,8 @@ |
| 3042 | from zope.component import getUtility |
| 3043 | from zope.security.interfaces import Unauthorized |
| 3044 | |
| 3045 | +from lp.app.enums import InformationType |
| 3046 | from lp.registry.enums import ( |
| 3047 | - InformationType, |
| 3048 | PersonVisibility, |
| 3049 | TeamMembershipPolicy, |
| 3050 | ) |
| 3051 | |
| 3052 | === modified file 'lib/lp/registry/tests/test_product.py' |
| 3053 | --- lib/lp/registry/tests/test_product.py 2012-09-13 16:07:03 +0000 |
| 3054 | +++ lib/lp/registry/tests/test_product.py 2012-09-20 17:34:56 +0000 |
| 3055 | @@ -15,7 +15,11 @@ |
| 3056 | from zope.security.proxy import removeSecurityProxy |
| 3057 | |
| 3058 | from lp.answers.interfaces.faqtarget import IFAQTarget |
| 3059 | -from lp.app.enums import ServiceUsage |
| 3060 | +from lp.app.enums import ( |
| 3061 | + FREE_INFORMATION_TYPES, |
| 3062 | + InformationType, |
| 3063 | + ServiceUsage, |
| 3064 | + ) |
| 3065 | from lp.app.interfaces.launchpad import ( |
| 3066 | IHasIcon, |
| 3067 | IHasLogo, |
| 3068 | @@ -28,12 +32,10 @@ |
| 3069 | from lp.bugs.interfaces.bugsummary import IBugSummaryDimension |
| 3070 | from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor |
| 3071 | from lp.registry.enums import ( |
| 3072 | + EXCLUSIVE_TEAM_POLICY, |
| 3073 | + INCLUSIVE_TEAM_POLICY, |
| 3074 | BranchSharingPolicy, |
| 3075 | BugSharingPolicy, |
| 3076 | - EXCLUSIVE_TEAM_POLICY, |
| 3077 | - FREE_INFORMATION_TYPES, |
| 3078 | - INCLUSIVE_TEAM_POLICY, |
| 3079 | - InformationType, |
| 3080 | SpecificationSharingPolicy, |
| 3081 | ) |
| 3082 | from lp.registry.errors import ( |
| 3083 | |
| 3084 | === modified file 'lib/lp/registry/tests/test_productjob.py' |
| 3085 | --- lib/lp/registry/tests/test_productjob.py 2012-08-13 19:34:10 +0000 |
| 3086 | +++ lib/lp/registry/tests/test_productjob.py 2012-09-20 17:34:56 +0000 |
| 3087 | @@ -21,11 +21,9 @@ |
| 3088 | ) |
| 3089 | from zope.security.proxy import removeSecurityProxy |
| 3090 | |
| 3091 | +from lp.app.enums import InformationType |
| 3092 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3093 | -from lp.registry.enums import ( |
| 3094 | - InformationType, |
| 3095 | - ProductJobType, |
| 3096 | - ) |
| 3097 | +from lp.registry.enums import ProductJobType |
| 3098 | from lp.registry.interfaces.person import TeamMembershipPolicy |
| 3099 | from lp.registry.interfaces.product import License |
| 3100 | from lp.registry.interfaces.productjob import ( |
| 3101 | |
| 3102 | === modified file 'lib/lp/registry/tests/test_sharingjob.py' |
| 3103 | --- lib/lp/registry/tests/test_sharingjob.py 2012-08-13 19:34:10 +0000 |
| 3104 | +++ lib/lp/registry/tests/test_sharingjob.py 2012-09-20 17:34:56 +0000 |
| 3105 | @@ -11,12 +11,12 @@ |
| 3106 | from zope.component import getUtility |
| 3107 | from zope.security.proxy import removeSecurityProxy |
| 3108 | |
| 3109 | +from lp.app.enums import InformationType |
| 3110 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3111 | from lp.code.enums import ( |
| 3112 | BranchSubscriptionNotificationLevel, |
| 3113 | CodeReviewNotificationLevel, |
| 3114 | ) |
| 3115 | -from lp.registry.enums import InformationType |
| 3116 | from lp.registry.interfaces.accesspolicy import ( |
| 3117 | IAccessArtifactGrantSource, |
| 3118 | IAccessPolicySource, |
| 3119 | |
| 3120 | === modified file 'lib/lp/registry/tests/test_team.py' |
| 3121 | --- lib/lp/registry/tests/test_team.py 2012-08-21 04:04:47 +0000 |
| 3122 | +++ lib/lp/registry/tests/test_team.py 2012-09-20 17:34:56 +0000 |
| 3123 | @@ -10,10 +10,10 @@ |
| 3124 | from zope.interface.exceptions import Invalid |
| 3125 | from zope.security.proxy import removeSecurityProxy |
| 3126 | |
| 3127 | +from lp.app.enums import InformationType |
| 3128 | from lp.registry.enums import ( |
| 3129 | EXCLUSIVE_TEAM_POLICY, |
| 3130 | INCLUSIVE_TEAM_POLICY, |
| 3131 | - InformationType, |
| 3132 | PersonTransferJobType, |
| 3133 | PersonVisibility, |
| 3134 | TeamMembershipPolicy, |
| 3135 | |
| 3136 | === modified file 'lib/lp/registry/tests/test_team_webservice.py' |
| 3137 | --- lib/lp/registry/tests/test_team_webservice.py 2012-08-14 23:37:21 +0000 |
| 3138 | +++ lib/lp/registry/tests/test_team_webservice.py 2012-09-20 17:34:56 +0000 |
| 3139 | @@ -11,8 +11,8 @@ |
| 3140 | ) |
| 3141 | import transaction |
| 3142 | |
| 3143 | +from lp.app.enums import InformationType |
| 3144 | from lp.registry.enums import ( |
| 3145 | - InformationType, |
| 3146 | PersonVisibility, |
| 3147 | TeamMembershipPolicy, |
| 3148 | ) |
| 3149 | |
| 3150 | === modified file 'lib/lp/registry/tests/test_teammembership.py' |
| 3151 | --- lib/lp/registry/tests/test_teammembership.py 2012-08-24 05:09:51 +0000 |
| 3152 | +++ lib/lp/registry/tests/test_teammembership.py 2012-09-20 17:34:56 +0000 |
| 3153 | @@ -22,9 +22,9 @@ |
| 3154 | from zope.component import getUtility |
| 3155 | from zope.security.proxy import removeSecurityProxy |
| 3156 | |
| 3157 | +from lp.app.enums import InformationType |
| 3158 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3159 | from lp.registry.enums import ( |
| 3160 | - InformationType, |
| 3161 | TeamMembershipPolicy, |
| 3162 | TeamMembershipRenewalPolicy, |
| 3163 | ) |
| 3164 | |
| 3165 | === modified file 'lib/lp/registry/vocabularies.py' |
| 3166 | --- lib/lp/registry/vocabularies.py 2012-08-20 04:49:45 +0000 |
| 3167 | +++ lib/lp/registry/vocabularies.py 2012-09-20 17:34:56 +0000 |
| 3168 | @@ -39,7 +39,6 @@ |
| 3169 | 'FeaturedProjectVocabulary', |
| 3170 | 'FilteredDistroSeriesVocabulary', |
| 3171 | 'FilteredProductSeriesVocabulary', |
| 3172 | - 'InformationTypeVocabulary', |
| 3173 | 'KarmaCategoryVocabulary', |
| 3174 | 'MilestoneVocabulary', |
| 3175 | 'NewPillarGranteeVocabulary', |
| 3176 | @@ -65,7 +64,6 @@ |
| 3177 | |
| 3178 | from operator import attrgetter |
| 3179 | |
| 3180 | -from lazr.enum import IEnumeratedType |
| 3181 | from lazr.restful.interfaces import IReference |
| 3182 | from lazr.restful.utils import safe_hasattr |
| 3183 | from sqlobject import ( |
| 3184 | @@ -2252,17 +2250,3 @@ |
| 3185 | SQL('DistributionSourcePackage.id = SearchableDSP.id')) |
| 3186 | |
| 3187 | return CountableIterator(dsps.count(), dsps, self.toTerm) |
| 3188 | - |
| 3189 | - |
| 3190 | -class InformationTypeVocabulary(SimpleVocabulary): |
| 3191 | - |
| 3192 | - implements(IEnumeratedType) |
| 3193 | - |
| 3194 | - def __init__(self, types): |
| 3195 | - terms = [] |
| 3196 | - for type in types: |
| 3197 | - term = SimpleTerm(type, type.name, type.title) |
| 3198 | - term.name = type.name |
| 3199 | - term.description = type.description |
| 3200 | - terms.append(term) |
| 3201 | - super(InformationTypeVocabulary, self).__init__(terms) |
| 3202 | |
| 3203 | === modified file 'lib/lp/registry/vocabularies.zcml' |
| 3204 | --- lib/lp/registry/vocabularies.zcml 2012-08-20 04:16:45 +0000 |
| 3205 | +++ lib/lp/registry/vocabularies.zcml 2012-09-20 17:34:56 +0000 |
| 3206 | @@ -544,10 +544,4 @@ |
| 3207 | permission="zope.Public" |
| 3208 | attributes="name title description"/> |
| 3209 | </class> |
| 3210 | - <class |
| 3211 | - class="lp.registry.vocabularies.InformationTypeVocabulary"> |
| 3212 | - <require |
| 3213 | - permission="zope.Public" |
| 3214 | - attributes="name title description"/> |
| 3215 | - </class> |
| 3216 | </configure> |
| 3217 | |
| 3218 | === modified file 'lib/lp/scripts/tests/test_garbo.py' |
| 3219 | --- lib/lp/scripts/tests/test_garbo.py 2012-09-12 13:17:41 +0000 |
| 3220 | +++ lib/lp/scripts/tests/test_garbo.py 2012-09-20 17:34:56 +0000 |
| 3221 | @@ -35,6 +35,7 @@ |
| 3222 | from zope.component import getUtility |
| 3223 | from zope.security.proxy import removeSecurityProxy |
| 3224 | |
| 3225 | +from lp.app.enums import InformationType |
| 3226 | from lp.answers.model.answercontact import AnswerContact |
| 3227 | from lp.bugs.model.bugnotification import ( |
| 3228 | BugNotification, |
| 3229 | @@ -55,11 +56,9 @@ |
| 3230 | from lp.registry.enums import ( |
| 3231 | BranchSharingPolicy, |
| 3232 | BugSharingPolicy, |
| 3233 | - InformationType, |
| 3234 | ) |
| 3235 | from lp.registry.interfaces.accesspolicy import IAccessPolicySource |
| 3236 | from lp.registry.interfaces.person import IPersonSet |
| 3237 | -from lp.registry.interfaces.product import IProductSet |
| 3238 | from lp.registry.model.product import Product |
| 3239 | from lp.scripts.garbo import ( |
| 3240 | AntiqueSessionPruner, |
| 3241 | |
| 3242 | === modified file 'lib/lp/services/feeds/stories/xx-security.txt' |
| 3243 | --- lib/lp/services/feeds/stories/xx-security.txt 2012-05-14 06:28:17 +0000 |
| 3244 | +++ lib/lp/services/feeds/stories/xx-security.txt 2012-09-20 17:34:56 +0000 |
| 3245 | @@ -9,7 +9,7 @@ |
| 3246 | >>> from lp.services.database.lpstorm import IStore |
| 3247 | >>> import transaction |
| 3248 | >>> from lp.bugs.model.bug import Bug |
| 3249 | - >>> from lp.registry.enums import InformationType |
| 3250 | + >>> from lp.app.enums import InformationType |
| 3251 | >>> IStore(Bug).find(Bug).set(information_type=InformationType.USERDATA) |
| 3252 | >>> transaction.commit() |
| 3253 | |
| 3254 | |
| 3255 | === modified file 'lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py' |
| 3256 | --- lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py 2012-05-02 05:25:11 +0000 |
| 3257 | +++ lib/lp/services/librarian/tests/test_libraryfilealias_with_parent.py 2012-09-20 17:34:56 +0000 |
| 3258 | @@ -8,7 +8,7 @@ |
| 3259 | from zope.component import getMultiAdapter |
| 3260 | from zope.security.interfaces import Unauthorized |
| 3261 | |
| 3262 | -from lp.registry.enums import InformationType |
| 3263 | +from lp.app.enums import InformationType |
| 3264 | from lp.services.librarian.interfaces import ILibraryFileAliasWithParent |
| 3265 | from lp.testing import ( |
| 3266 | login_person, |
| 3267 | |
| 3268 | === modified file 'lib/lp/services/webapp/publisher.py' |
| 3269 | --- lib/lp/services/webapp/publisher.py 2012-09-12 20:19:42 +0000 |
| 3270 | +++ lib/lp/services/webapp/publisher.py 2012-09-20 17:34:56 +0000 |
| 3271 | @@ -65,6 +65,7 @@ |
| 3272 | from zope.traversing.browser.interfaces import IAbsoluteURL |
| 3273 | |
| 3274 | from lp.app.errors import NotFoundError |
| 3275 | +from lp.app.interfaces.informationtype import IInformationType |
| 3276 | from lp.app.interfaces.launchpad import IPrivacy |
| 3277 | from lp.app.versioninfo import revno |
| 3278 | from lp.layers import ( |
| 3279 | @@ -90,7 +91,6 @@ |
| 3280 | ) |
| 3281 | from lp.services.webapp.url import urlappend |
| 3282 | from lp.services.webapp.vhosts import allvhosts |
| 3283 | -from lp.registry.interfaces.informationtype import IInformationType |
| 3284 | |
| 3285 | # Monkeypatch NotFound to always avoid generating OOPS |
| 3286 | # from NotFound in web service calls. |
| 3287 | |
| 3288 | === modified file 'lib/lp/soyuz/scripts/tests/test_queue.py' |
| 3289 | --- lib/lp/soyuz/scripts/tests/test_queue.py 2012-09-19 23:38:13 +0000 |
| 3290 | +++ lib/lp/soyuz/scripts/tests/test_queue.py 2012-09-20 17:34:56 +0000 |
| 3291 | @@ -17,6 +17,7 @@ |
| 3292 | from zope.security.interfaces import ForbiddenAttribute |
| 3293 | from zope.security.proxy import removeSecurityProxy |
| 3294 | |
| 3295 | +from lp.app.enums import InformationType |
| 3296 | from lp.archiveuploader.nascentupload import NascentUpload |
| 3297 | from lp.archiveuploader.tests import ( |
| 3298 | datadir, |
| 3299 | @@ -28,7 +29,6 @@ |
| 3300 | BugTaskStatus, |
| 3301 | IBugTaskSet, |
| 3302 | ) |
| 3303 | -from lp.registry.enums import InformationType |
| 3304 | from lp.registry.interfaces.distribution import IDistributionSet |
| 3305 | from lp.registry.interfaces.person import IPersonSet |
| 3306 | from lp.registry.interfaces.pocket import PackagePublishingPocket |
| 3307 | |
| 3308 | === modified file 'lib/lp/soyuz/tests/test_processacceptedbugsjob.py' |
| 3309 | --- lib/lp/soyuz/tests/test_processacceptedbugsjob.py 2012-09-02 00:11:13 +0000 |
| 3310 | +++ lib/lp/soyuz/tests/test_processacceptedbugsjob.py 2012-09-20 17:34:56 +0000 |
| 3311 | @@ -10,8 +10,8 @@ |
| 3312 | from zope.component import getUtility |
| 3313 | from zope.security.proxy import removeSecurityProxy |
| 3314 | |
| 3315 | +from lp.app.enums import InformationType |
| 3316 | from lp.bugs.interfaces.bugtask import BugTaskStatus |
| 3317 | -from lp.registry.enums import InformationType |
| 3318 | from lp.registry.interfaces.series import SeriesStatus |
| 3319 | from lp.services.config import config |
| 3320 | from lp.services.features.testing import FeatureFixture |
| 3321 | |
| 3322 | === modified file 'lib/lp/systemhomes.py' |
| 3323 | --- lib/lp/systemhomes.py 2012-08-08 05:22:14 +0000 |
| 3324 | +++ lib/lp/systemhomes.py 2012-09-20 17:34:56 +0000 |
| 3325 | @@ -25,6 +25,7 @@ |
| 3326 | from zope.component import getUtility |
| 3327 | from zope.interface import implements |
| 3328 | |
| 3329 | +from lp.app.enums import PRIVATE_INFORMATION_TYPES |
| 3330 | from lp.bugs.adapters.bug import convert_to_information_type |
| 3331 | from lp.bugs.interfaces.bug import ( |
| 3332 | CreateBugParams, |
| 3333 | @@ -55,7 +56,6 @@ |
| 3334 | IHWVendorIDSet, |
| 3335 | ParameterError, |
| 3336 | ) |
| 3337 | -from lp.registry.enums import PRIVATE_INFORMATION_TYPES |
| 3338 | from lp.registry.interfaces.distroseries import IDistroSeriesSet |
| 3339 | from lp.registry.interfaces.mailinglist import IMailingListApplication |
| 3340 | from lp.registry.interfaces.product import IProductSet |
| 3341 | |
| 3342 | === modified file 'lib/lp/testing/factory.py' |
| 3343 | --- lib/lp/testing/factory.py 2012-09-18 20:20:35 +0000 |
| 3344 | +++ lib/lp/testing/factory.py 2012-09-20 17:34:56 +0000 |
| 3345 | @@ -63,7 +63,11 @@ |
| 3346 | removeSecurityProxy, |
| 3347 | ) |
| 3348 | |
| 3349 | -from lp.app.enums import ServiceUsage |
| 3350 | +from lp.app.enums import ( |
| 3351 | + InformationType, |
| 3352 | + PUBLIC_INFORMATION_TYPES, |
| 3353 | + ServiceUsage, |
| 3354 | + ) |
| 3355 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3356 | from lp.archivepublisher.interfaces.publisherconfig import IPublisherConfigSet |
| 3357 | from lp.archiveuploader.dscfile import DSCFile |
| 3358 | @@ -141,9 +145,7 @@ |
| 3359 | BugSharingPolicy, |
| 3360 | DistroSeriesDifferenceStatus, |
| 3361 | DistroSeriesDifferenceType, |
| 3362 | - InformationType, |
| 3363 | SpecificationSharingPolicy, |
| 3364 | - PUBLIC_INFORMATION_TYPES, |
| 3365 | TeamMembershipPolicy, |
| 3366 | ) |
| 3367 | from lp.registry.interfaces.accesspolicy import ( |
| 3368 | |
| 3369 | === modified file 'lib/lp/translations/browser/tests/test_productserieslanguage_views.py' |
| 3370 | --- lib/lp/translations/browser/tests/test_productserieslanguage_views.py 2012-05-31 03:54:13 +0000 |
| 3371 | +++ lib/lp/translations/browser/tests/test_productserieslanguage_views.py 2012-09-20 17:34:56 +0000 |
| 3372 | @@ -5,7 +5,7 @@ |
| 3373 | |
| 3374 | from zope.security.proxy import removeSecurityProxy |
| 3375 | |
| 3376 | -from lp.registry.enums import InformationType |
| 3377 | +from lp.app.enums import InformationType |
| 3378 | from lp.services.webapp.servers import LaunchpadTestRequest |
| 3379 | from lp.testing import ( |
| 3380 | login_person, |
| 3381 | |
| 3382 | === modified file 'lib/lp/translations/stories/productseries/xx-productseries-translations.txt' |
| 3383 | --- lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2012-05-31 03:54:13 +0000 |
| 3384 | +++ lib/lp/translations/stories/productseries/xx-productseries-translations.txt 2012-09-20 17:34:56 +0000 |
| 3385 | @@ -277,7 +277,7 @@ |
| 3386 | If the branch is private, though the page pretends to non-privileged users |
| 3387 | that no synchronization has been set up. |
| 3388 | |
| 3389 | - >>> from lp.registry.enums import InformationType |
| 3390 | + >>> from lp.app.enums import InformationType |
| 3391 | >>> login('foo.bar@canonical.com') |
| 3392 | >>> private_branch = factory.makeBranch( |
| 3393 | ... product=frobnicator, information_type=InformationType.USERDATA) |
| 3394 | |
| 3395 | === modified file 'lib/lp/translations/tests/test_translationtemplatesbuildjob.py' |
| 3396 | --- lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2012-05-24 02:16:59 +0000 |
| 3397 | +++ lib/lp/translations/tests/test_translationtemplatesbuildjob.py 2012-09-20 17:34:56 +0000 |
| 3398 | @@ -8,6 +8,7 @@ |
| 3399 | from zope.event import notify |
| 3400 | from zope.security.proxy import removeSecurityProxy |
| 3401 | |
| 3402 | +from lp.app.enums import InformationType |
| 3403 | from lp.app.interfaces.launchpad import ILaunchpadCelebrities |
| 3404 | from lp.buildmaster.interfaces.buildfarmjob import IBuildFarmJobOld |
| 3405 | from lp.buildmaster.interfaces.buildqueue import IBuildQueueSet |
| 3406 | @@ -17,7 +18,6 @@ |
| 3407 | from lp.code.model.branchjob import BranchJob |
| 3408 | from lp.code.model.directbranchcommit import DirectBranchCommit |
| 3409 | from lp.codehosting.scanner import events |
| 3410 | -from lp.registry.enums import InformationType |
| 3411 | from lp.services.job.model.job import Job |
| 3412 | from lp.services.webapp.interfaces import ( |
| 3413 | DEFAULT_FLAVOR, |
