← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/force-bug-enums-into-line into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/force-bug-enums-into-line into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/force-bug-enums-into-line/+merge/97123

The following should illustrate the problem quite well:

% find . -name 'enums.py'
./lib/lp/buildmaster/enums.py
./lib/lp/code/enums.py
./lib/lp/translations/enums.py
./lib/lp/registry/enums.py
./lib/lp/app/enums.py
./lib/lp/soyuz/enums.py
./lib/lp/blueprints/enums.py
./lib/lp/answers/enums.py

And then we have the odd one out:

% find . -name 'enum.py' 
./lib/lp/bugs/enum.py

Fix it to conform.
-- 
https://code.launchpad.net/~stevenk/launchpad/force-bug-enums-into-line/+merge/97123
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/force-bug-enums-into-line into lp:launchpad.
=== modified file 'cronscripts/send-bug-notifications.py'
--- cronscripts/send-bug-notifications.py	2011-12-30 06:47:17 +0000
+++ cronscripts/send-bug-notifications.py	2012-03-13 00:50:24 +0000
@@ -17,7 +17,7 @@
 
 from zope.component import getUtility
 
-from lp.bugs.enum import BugNotificationStatus
+from lp.bugs.enums import BugNotificationStatus
 from lp.bugs.interfaces.bugnotification import IBugNotificationSet
 from lp.bugs.scripts.bugnotification import (
     get_email_notifications,

=== modified file 'lib/lp/_schema_circular_imports.py'
--- lib/lp/_schema_circular_imports.py	2012-01-17 21:45:24 +0000
+++ lib/lp/_schema_circular_imports.py	2012-03-13 00:50:24 +0000
@@ -24,7 +24,7 @@
     IHasSpecifications,
     ISpecificationTarget,
     )
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bug import (
     IBug,
     IFrontPageBugAddForm,

=== modified file 'lib/lp/bugs/adapters/bugchange.py'
--- lib/lp/bugs/adapters/bugchange.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/adapters/bugchange.py	2012-03-13 00:50:24 +0000
@@ -49,7 +49,7 @@
 from zope.interface import implements
 from zope.security.proxy import isinstance as zope_isinstance
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugchange import IBugChange
 from lp.bugs.interfaces.bugtask import (
     IBugTask,

=== modified file 'lib/lp/bugs/adapters/tests/test_bugchange.py'
--- lib/lp/bugs/adapters/tests/test_bugchange.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/adapters/tests/test_bugchange.py	2012-03-13 00:50:24 +0000
@@ -12,7 +12,7 @@
     get_bug_changes,
     )
 from lp.bugs.adapters.bugdelta import BugDelta
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import BugTaskStatus
 from lp.bugs.model.bugtask import BugTaskDelta
 from lp.services.webapp.publisher import canonical_url

=== modified file 'lib/lp/bugs/browser/bug.py'
--- lib/lp/bugs/browser/bug.py	2012-02-20 00:45:53 +0000
+++ lib/lp/bugs/browser/bug.py	2012-03-13 00:50:24 +0000
@@ -71,7 +71,7 @@
 from lp.app.widgets.project import ProjectScopeWidget
 from lp.bugs.browser.bugsubscription import BugPortletSubscribersWithDetails
 from lp.bugs.browser.widgets.bug import BugTagsWidget
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bug import (
     IBug,
     IBugSet,

=== modified file 'lib/lp/bugs/browser/bugsubscription.py'
--- lib/lp/bugs/browser/bugsubscription.py	2012-02-28 04:24:19 +0000
+++ lib/lp/bugs/browser/bugsubscription.py	2012-03-13 00:50:24 +0000
@@ -40,7 +40,7 @@
 from lp.bugs.browser.structuralsubscription import (
     expose_structural_subscription_data_to_js,
     )
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.errors import SubscriptionPrivacyViolation
 from lp.bugs.interfaces.bug import IBug
 from lp.bugs.interfaces.bugsubscription import IBugSubscription

=== modified file 'lib/lp/bugs/browser/bugsubscriptionfilter.py'
--- lib/lp/bugs/browser/bugsubscriptionfilter.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/bugsubscriptionfilter.py	2012-03-13 00:50:24 +0000
@@ -19,7 +19,7 @@
 from lp.app.widgets.itemswidgets import LabeledMultiCheckBoxWidget
 from lp.bugs.browser.bugsubscription import AdvancedSubscriptionMixin
 from lp.bugs.browser.widgets.bug import BugTagsFrozenSetWidget
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugsubscriptionfilter import IBugSubscriptionFilter
 from lp.services.helpers import english_list
 from lp.services.propertycache import cachedproperty

=== modified file 'lib/lp/bugs/browser/tests/test_bug_context_menu.py'
--- lib/lp/bugs/browser/tests/test_bug_context_menu.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_bug_context_menu.py	2012-03-13 00:50:24 +0000
@@ -8,7 +8,7 @@
 from zope.component import getUtility
 
 from lp.bugs.browser.bug import BugContextMenu
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.services.features import get_relevant_feature_controller
 from lp.services.webapp.interfaces import IOpenLaunchBag
 from lp.services.webapp.servers import LaunchpadTestRequest

=== modified file 'lib/lp/bugs/browser/tests/test_bugsubscription_views.py'
--- lib/lp/bugs/browser/tests/test_bugsubscription_views.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_bugsubscription_views.py	2012-03-13 00:50:24 +0000
@@ -19,7 +19,7 @@
     BugSubscriptionListView,
     BugSubscriptionSubscribeSelfView,
     )
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.registry.interfaces.person import (
     IPersonSet,
     PersonVisibility,

=== modified file 'lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_bugsubscriptionfilter.py	2012-03-13 00:50:24 +0000
@@ -17,7 +17,7 @@
 from lp.bugs.browser.structuralsubscription import (
     StructuralSubscriptionNavigation,
     )
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import (
     BugTaskImportance,
     BugTaskStatus,

=== modified file 'lib/lp/bugs/doc/bug-change.txt'
--- lib/lp/bugs/doc/bug-change.txt	2011-12-24 17:49:30 +0000
+++ lib/lp/bugs/doc/bug-change.txt	2012-03-13 00:50:24 +0000
@@ -141,7 +141,7 @@
 
 
     >>> from lp.testing import person_logged_in
-    >>> from lp.bugs.enum import BugNotificationLevel
+    >>> from lp.bugs.enums import BugNotificationLevel
     >>> lifecycle_subscriber = factory.makePerson(
     ...         displayname='Lifecycle subscriber')
     >>> metadata_subscriber = factory.makePerson(

=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
--- lib/lp/bugs/doc/bugnotification-sending.txt	2012-01-20 15:42:44 +0000
+++ lib/lp/bugs/doc/bugnotification-sending.txt	2012-03-13 00:50:24 +0000
@@ -1110,7 +1110,7 @@
 
     >>> flush_notifications()
 
-    >>> from lp.bugs.enum import BugNotificationLevel
+    >>> from lp.bugs.enums import BugNotificationLevel
     >>> from lp.registry.interfaces.product import IProductSet
     >>> firefox = getUtility(IProductSet).getByName('firefox')
     >>> mr_no_privs = getUtility(IPersonSet).getByName('no-priv')

=== modified file 'lib/lp/bugs/doc/bugsubscription.txt'
--- lib/lp/bugs/doc/bugsubscription.txt	2012-03-08 11:51:36 +0000
+++ lib/lp/bugs/doc/bugsubscription.txt	2012-03-13 00:50:24 +0000
@@ -267,7 +267,7 @@
 With this subscription level, No Privileges Person is returned for all
 parameter values of level.
 
-    >>> from lp.bugs.enum import BugNotificationLevel
+    >>> from lp.bugs.enums import BugNotificationLevel
     >>> print_displayname(linux_source_bug.getAlsoNotifiedSubscribers(
     ...     level=BugNotificationLevel.COMMENTS))
     No Privileges Person

=== renamed file 'lib/lp/bugs/enum.py' => 'lib/lp/bugs/enums.py'
--- lib/lp/bugs/enum.py	2011-09-12 20:11:43 +0000
+++ lib/lp/bugs/enums.py	2012-03-13 00:50:24 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
+# Copyright 2010-2012 Canonical Ltd.  This software is licensed under the
 # GNU Affero General Public License version 3 (see the file LICENSE).
 
 """Enums for the Bugs app."""

=== modified file 'lib/lp/bugs/interfaces/bugnotification.py'
--- lib/lp/bugs/interfaces/bugnotification.py	2011-12-24 16:54:44 +0000
+++ lib/lp/bugs/interfaces/bugnotification.py	2012-03-13 00:50:24 +0000
@@ -26,7 +26,7 @@
     )
 
 from lp import _
-from lp.bugs.enum import BugNotificationStatus
+from lp.bugs.enums import BugNotificationStatus
 from lp.bugs.interfaces.bugsubscriptionfilter import IBugSubscriptionFilter
 from lp.registry.interfaces.role import IHasOwner
 from lp.services.fields import BugField

=== modified file 'lib/lp/bugs/interfaces/bugsubscription.py'
--- lib/lp/bugs/interfaces/bugsubscription.py	2011-12-25 03:10:05 +0000
+++ lib/lp/bugs/interfaces/bugsubscription.py	2012-03-13 00:50:24 +0000
@@ -32,7 +32,7 @@
     )
 
 from lp import _
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.services.fields import PersonChoice
 from lp.services.webservice.apihelpers import patch_reference_property
 

=== modified file 'lib/lp/bugs/interfaces/bugsubscriptionfilter.py'
--- lib/lp/bugs/interfaces/bugsubscriptionfilter.py	2011-12-24 16:54:44 +0000
+++ lib/lp/bugs/interfaces/bugsubscriptionfilter.py	2012-03-13 00:50:24 +0000
@@ -31,7 +31,7 @@
     )
 
 from lp import _
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import (
     BugTaskImportance,
     BugTaskStatus,

=== modified file 'lib/lp/bugs/javascript/subscribers.js'
--- lib/lp/bugs/javascript/subscribers.js	2011-10-31 10:10:58 +0000
+++ lib/lp/bugs/javascript/subscribers.js	2012-03-13 00:50:24 +0000
@@ -16,7 +16,7 @@
  * sections that will hold them.
  *
  * These match BugNotificationLevel enum options (as defined in
- * lib/lp/bugs/enum.py).
+ * lib/lp/bugs/enums.py).
  */
 var subscriber_levels = {
     'Discussion': 'Notified of all changes',

=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py	2012-03-08 22:48:17 +0000
+++ lib/lp/bugs/model/bug.py	2012-03-13 00:50:24 +0000
@@ -99,7 +99,7 @@
     SeriesNominated,
     UnsubscribedFromBug,
     )
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.errors import (
     BugCannotBePrivate,
     InvalidDuplicateValue,

=== modified file 'lib/lp/bugs/model/bugnotification.py'
--- lib/lp/bugs/model/bugnotification.py	2012-02-24 01:14:29 +0000
+++ lib/lp/bugs/model/bugnotification.py	2012-03-13 00:50:24 +0000
@@ -37,7 +37,7 @@
 from zope.component import getUtility
 from zope.interface import implements
 
-from lp.bugs.enum import BugNotificationStatus
+from lp.bugs.enums import BugNotificationStatus
 from lp.bugs.interfaces.bugnotification import (
     IBugNotification,
     IBugNotificationFilter,

=== modified file 'lib/lp/bugs/model/bugsubscription.py'
--- lib/lp/bugs/model/bugsubscription.py	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/model/bugsubscription.py	2012-03-13 00:50:24 +0000
@@ -14,7 +14,7 @@
     )
 from zope.interface import implements
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugsubscription import IBugSubscription
 from lp.registry.interfaces.person import validate_person
 from lp.registry.interfaces.role import IPersonRoles

=== modified file 'lib/lp/bugs/model/bugsubscriptionfilter.py'
--- lib/lp/bugs/model/bugsubscriptionfilter.py	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/model/bugsubscriptionfilter.py	2012-03-13 00:50:24 +0000
@@ -23,7 +23,7 @@
     )
 from zope.interface import implements
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugsubscriptionfilter import (
     IBugSubscriptionFilter,
     IBugSubscriptionFilterMute,

=== modified file 'lib/lp/bugs/model/tests/test_bug.py'
--- lib/lp/bugs/model/tests/test_bug.py	2012-02-24 04:00:24 +0000
+++ lib/lp/bugs/model/tests/test_bug.py	2012-03-13 00:50:24 +0000
@@ -15,7 +15,7 @@
 from zope.security.proxy import removeSecurityProxy
 
 from lp.bugs.adapters.bugchange import BugTitleChange
-from lp.bugs.enum import (
+from lp.bugs.enums import (
     BugNotificationLevel,
     BugNotificationStatus,
     )

=== modified file 'lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py'
--- lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/model/tests/test_bugsubscriptionfilter.py	2012-03-13 00:50:24 +0000
@@ -12,7 +12,7 @@
     removeSecurityProxy,
     )
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import (
     BugTaskImportance,
     BugTaskStatus,

=== modified file 'lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py'
--- lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py	2012-03-07 01:59:58 +0000
+++ lib/lp/bugs/model/tests/test_bugsubscriptioninfo.py	2012-03-13 00:50:24 +0000
@@ -13,7 +13,7 @@
 from zope.security.checker import getChecker
 
 from lp.app.interfaces.security import IAuthorization
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.model.bug import (
     BugSubscriberSet,
     BugSubscriptionInfo,

=== modified file 'lib/lp/bugs/scripts/bugnotification.py'
--- lib/lp/bugs/scripts/bugnotification.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/scripts/bugnotification.py	2012-03-13 00:50:24 +0000
@@ -20,7 +20,7 @@
 import transaction
 from zope.component import getUtility
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugnotification import IBugNotificationSet
 from lp.bugs.mail.bugnotificationbuilder import (
     BugNotificationBuilder,

=== modified file 'lib/lp/bugs/subscribers/bug.py'
--- lib/lp/bugs/subscribers/bug.py	2011-12-30 06:14:56 +0000
+++ lib/lp/bugs/subscribers/bug.py	2012-03-13 00:50:24 +0000
@@ -23,7 +23,7 @@
     get_bug_changes,
     )
 from lp.bugs.adapters.bugdelta import BugDelta
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.mail.bugnotificationbuilder import BugNotificationBuilder
 from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients
 from lp.bugs.mail.newbug import generate_bug_add_email

=== modified file 'lib/lp/bugs/subscribers/tests/test_bug.py'
--- lib/lp/bugs/subscribers/tests/test_bug.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/subscribers/tests/test_bug.py	2012-03-13 00:50:24 +0000
@@ -7,7 +7,7 @@
 from testtools.matchers import Is
 
 from lp.bugs.adapters.bugdelta import BugDelta
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import BugTaskStatus
 from lp.bugs.model.bugnotification import (
     BugNotification,

=== modified file 'lib/lp/bugs/tests/test_bug.py'
--- lib/lp/bugs/tests/test_bug.py	2012-03-02 00:19:37 +0000
+++ lib/lp/bugs/tests/test_bug.py	2012-03-13 00:50:24 +0000
@@ -10,7 +10,7 @@
 from zope.interface import providedBy
 from zope.security.proxy import removeSecurityProxy
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bug import (
     CreateBugParams,
     IBugSet,

=== modified file 'lib/lp/bugs/tests/test_bugchanges.py'
--- lib/lp/bugs/tests/test_bugchanges.py	2012-03-08 11:51:36 +0000
+++ lib/lp/bugs/tests/test_bugchanges.py	2012-03-13 00:50:24 +0000
@@ -13,7 +13,7 @@
 from zope.event import notify
 from zope.interface import providedBy
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import (
     BugTaskImportance,
     BugTaskStatus,

=== modified file 'lib/lp/bugs/tests/test_bugsubscription.py'
--- lib/lp/bugs/tests/test_bugsubscription.py	2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/tests/test_bugsubscription.py	2012-03-13 00:50:24 +0000
@@ -12,7 +12,7 @@
     )
 from zope.security.interfaces import Unauthorized
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.registry.interfaces.teammembership import TeamMembershipStatus
 from lp.testing import (
     launchpadlib_for,

=== modified file 'lib/lp/bugs/tests/test_structuralsubscription.py'
--- lib/lp/bugs/tests/test_structuralsubscription.py	2012-01-03 14:18:27 +0000
+++ lib/lp/bugs/tests/test_structuralsubscription.py	2012-03-13 00:50:24 +0000
@@ -13,7 +13,7 @@
 from testtools.matchers import StartsWith
 from zope.security.interfaces import Unauthorized
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.interfaces.bugtask import (
     BugTaskImportance,
     BugTaskStatus,

=== modified file 'lib/lp/services/database/tests/test_bulk.py'
--- lib/lp/services/database/tests/test_bulk.py	2012-02-27 04:29:39 +0000
+++ lib/lp/services/database/tests/test_bulk.py	2012-03-13 00:50:24 +0000
@@ -19,7 +19,7 @@
     proxy,
     )
 
-from lp.bugs.enum import BugNotificationLevel
+from lp.bugs.enums import BugNotificationLevel
 from lp.bugs.model.bug import BugAffectsPerson
 from lp.bugs.model.bugsubscription import BugSubscription
 from lp.code.model.branchjob import (