← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:remove-redundant-interfaces into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:remove-redundant-interfaces into launchpad:master.

Commit message:
Remove a number of redundant interface declarations

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/429149

Under `ZOPE_INTERFACE_STRICT_IRO=1`, zope.interface is strict about ensuring that it can compute a C3 resolution order for interfaces, which gives more predictable behaviour in some edge cases (see https://zopeinterface.readthedocs.io/en/latest/api/ro.html).  This means that some previously-valid declaration orders for the interfaces implemented by a class are now rejected.  In particular, having an interface inherit from some parent interfaces and then having classes that declare that they implement those interfaces in a different order is a problem under strict IRO enforcement.

As a preparatory step, remove a number of redundant interface declarations whose order disagreed with the C3 resolution order in some way.  Most of these boil down to either removing `@implementer` declarations that are clearly implied by another one for the same class.  For instance, `IInformationType` inherits from `IPrivacy`, so there's no need to declare that a class implements both; by the same token, it isn't necessary for `Distribution` to explicitly declare that it implements lots of fine-grained interfaces that are already base classes of `IDistribution`.

I also removed a few explicit `@implementer(Interface)` declarations, which used to be needed but are now handled implicitly as of zope.interface 5.0.2; in some cases the explicit declarations caused C3 resolution order issues.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:remove-redundant-interfaces into launchpad:master.
diff --git a/lib/lp/answers/publisher.py b/lib/lp/answers/publisher.py
index 020bdaa..21d1443 100644
--- a/lib/lp/answers/publisher.py
+++ b/lib/lp/answers/publisher.py
@@ -12,10 +12,7 @@ __all__ = [
 
 
 from zope.interface import implementer
-from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
-    IDefaultBrowserLayer,
-)
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from lp.services.webapp.interfaces import IFacet
 from lp.services.webapp.publication import LaunchpadBrowserPublication
@@ -34,7 +31,7 @@ class AnswersFacet:
     default_view = "+questions"
 
 
-class AnswersLayer(IBrowserRequest, IDefaultBrowserLayer):
+class AnswersLayer(IDefaultBrowserLayer):
     """The Answers layer."""
 
 
diff --git a/lib/lp/app/doc/badges.rst b/lib/lp/app/doc/badges.rst
index a152df9..d2759b5 100644
--- a/lib/lp/app/doc/badges.rst
+++ b/lib/lp/app/doc/badges.rst
@@ -84,12 +84,11 @@ The base badge implementation class, `HasBadgeBase`, provides an
 implementation of IHasBadges. HasBadgeBase is also a default adapter
 for Interface, which just provides the privacy badge.
 
-    >>> from zope.interface import Interface, Attribute, implementer
+    >>> from zope.interface import Attribute
     >>> from lp.app.browser.interfaces import IHasBadges
     >>> from lp.app.browser.badge import HasBadgeBase
     >>> from lp.testing import verifyObject
-    >>> @implementer(Interface)
-    ... class PrivateClass:
+    >>> class PrivateClass:
     ...     private = True
     >>> private_object = PrivateClass()
     >>> has_badge_base = HasBadgeBase(private_object)
@@ -165,11 +164,12 @@ accessing or counting of the content object's attributes.  The listing
 views then use a delegating object in order to override the badge
 determination methods to use the results of an alternative query.
 
+    >>> from zope.interface import Interface, implementer
+
     >>> class IFoo(Interface):
     ...     bugs = Attribute('Some linked bugs')
     ...     blueprints = Attribute('Some linked blueprints')
 
-    >>> from zope.interface import implementer
     >>> @implementer(IFoo)
     ... class Foo:
     ...     @property
diff --git a/lib/lp/app/doc/menus.rst b/lib/lp/app/doc/menus.rst
index b6a8c9f..f6539b9 100644
--- a/lib/lp/app/doc/menus.rst
+++ b/lib/lp/app/doc/menus.rst
@@ -1064,11 +1064,7 @@ If we try a navigation menu lookup on an object without a canonical url
 or a navigation menu adapter, then no menu will be returned, and no
 error will be raised by the template.
 
-``@implementer(Interface)`` is needed so the ``IPathAdapter`` can be applied
-to this view.
-
-    >>> @implementer(Interface)
-    ... class MenulessView(LaunchpadView):
+    >>> class MenulessView(LaunchpadView):
     ...     __launchpad_facetname__ = 'cookery'
 
     >>> menuless_view = MenulessView(comment, request)
diff --git a/lib/lp/blueprints/publisher.py b/lib/lp/blueprints/publisher.py
index 1a93f04..a138910 100644
--- a/lib/lp/blueprints/publisher.py
+++ b/lib/lp/blueprints/publisher.py
@@ -12,10 +12,7 @@ __all__ = [
 
 
 from zope.interface import implementer
-from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
-    IDefaultBrowserLayer,
-)
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from lp.services.webapp.interfaces import IFacet
 from lp.services.webapp.publication import LaunchpadBrowserPublication
@@ -34,7 +31,7 @@ class SpecificationsFacet:
     default_view = "+specs"
 
 
-class BlueprintsLayer(IBrowserRequest, IDefaultBrowserLayer):
+class BlueprintsLayer(IDefaultBrowserLayer):
     """The Blueprints layer."""
 
 
diff --git a/lib/lp/bugs/publisher.py b/lib/lp/bugs/publisher.py
index 2348fcf..bdbb00a 100644
--- a/lib/lp/bugs/publisher.py
+++ b/lib/lp/bugs/publisher.py
@@ -12,10 +12,7 @@ __all__ = [
 
 
 from zope.interface import implementer
-from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
-    IDefaultBrowserLayer,
-)
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from lp.services.webapp.interfaces import IFacet, ILaunchpadContainer
 from lp.services.webapp.publication import LaunchpadBrowserPublication
@@ -35,7 +32,7 @@ class BugsFacet:
     default_view = "+bugs"
 
 
-class BugsLayer(IBrowserRequest, IDefaultBrowserLayer):
+class BugsLayer(IDefaultBrowserLayer):
     """The Bugs layer."""
 
 
diff --git a/lib/lp/bugs/vocabularies.py b/lib/lp/bugs/vocabularies.py
index 9ebe341..ed5f2f6 100644
--- a/lib/lp/bugs/vocabularies.py
+++ b/lib/lp/bugs/vocabularies.py
@@ -21,7 +21,7 @@ __all__ = [
 from storm.expr import And, Or
 from zope.component import getUtility
 from zope.interface import implementer
-from zope.schema.interfaces import IVocabulary, IVocabularyTokenized
+from zope.schema.interfaces import IVocabularyTokenized
 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 from zope.security.proxy import removeSecurityProxy
 
@@ -206,7 +206,7 @@ class BugWatchVocabulary(SQLObjectVocabularyBase):
         return SimpleTerm(watch, watch.id, title)
 
 
-@implementer(IVocabulary, IVocabularyTokenized)
+@implementer(IVocabularyTokenized)
 class DistributionUsingMaloneVocabulary:
     """All the distributions that uses Malone officially."""
 
@@ -348,7 +348,7 @@ def milestone_matches_bugtask(milestone, bugtask):
     return False
 
 
-@implementer(IVocabulary, IVocabularyTokenized)
+@implementer(IVocabularyTokenized)
 class BugTaskMilestoneVocabulary:
     """Milestones for a set of bugtasks.
 
diff --git a/lib/lp/charms/interfaces/charmrecipe.py b/lib/lp/charms/interfaces/charmrecipe.py
index 35c60e2..6499998 100644
--- a/lib/lp/charms/interfaces/charmrecipe.py
+++ b/lib/lp/charms/interfaces/charmrecipe.py
@@ -72,7 +72,6 @@ from lp import _
 from lp.app.enums import InformationType
 from lp.app.errors import NameLookupFailed
 from lp.app.interfaces.informationtype import IInformationType
-from lp.app.interfaces.launchpad import IPrivacy
 from lp.app.validators.name import name_validator
 from lp.app.validators.path import path_does_not_escape
 from lp.code.interfaces.gitref import IGitRef
@@ -775,7 +774,6 @@ class ICharmRecipe(
     ICharmRecipeEdit,
     ICharmRecipeEditableAttributes,
     ICharmRecipeAdminAttributes,
-    IPrivacy,
     IInformationType,
 ):
     """A buildable charm recipe."""
diff --git a/lib/lp/code/interfaces/gitref.py b/lib/lp/code/interfaces/gitref.py
index 3064632..577312c 100644
--- a/lib/lp/code/interfaces/gitref.py
+++ b/lib/lp/code/interfaces/gitref.py
@@ -31,7 +31,6 @@ from zope.schema import Bool, Choice, Datetime, List, Text, TextLine
 
 from lp import _
 from lp.app.interfaces.informationtype import IInformationType
-from lp.app.interfaces.launchpad import IPrivacy
 from lp.code.enums import BranchMergeProposalStatus, GitObjectType
 from lp.code.interfaces.hasbranches import IHasMergeProposals
 from lp.code.interfaces.hasrecipes import IHasRecipes
@@ -40,7 +39,7 @@ from lp.services.fields import InlineObject
 from lp.services.webapp.interfaces import ITableBatchNavigator
 
 
-class IGitRefView(IHasMergeProposals, IHasRecipes, IPrivacy, IInformationType):
+class IGitRefView(IHasMergeProposals, IHasRecipes, IInformationType):
     """IGitRef attributes that require launchpad.View permission."""
 
     repository = exported(
diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py
index 262b156..43ed1b0 100644
--- a/lib/lp/code/model/branch.py
+++ b/lib/lp/code/model/branch.py
@@ -39,7 +39,7 @@ from lp.app.errors import (
     UserCannotUnsubscribePerson,
 )
 from lp.app.interfaces.informationtype import IInformationType
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities, IPrivacy
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.interfaces.services import IService
 from lp.blueprints.model.specification import Specification
 from lp.blueprints.model.specificationbranch import SpecificationBranch
@@ -157,7 +157,7 @@ from lp.services.webhooks.model import WebhookTargetMixin
 from lp.snappy.interfaces.snap import ISnapSet
 
 
-@implementer(IBranch, IPrivacy, IInformationType)
+@implementer(IBranch, IInformationType)
 class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
     """A sequence of ordered revisions in Bazaar."""
 
diff --git a/lib/lp/code/model/gitrepository.py b/lib/lp/code/model/gitrepository.py
index 5eac999..64197b3 100644
--- a/lib/lp/code/model/gitrepository.py
+++ b/lib/lp/code/model/gitrepository.py
@@ -46,7 +46,7 @@ from lp.app.errors import (
     UserCannotUnsubscribePerson,
 )
 from lp.app.interfaces.informationtype import IInformationType
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities, IPrivacy
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.interfaces.services import IService
 from lp.charms.interfaces.charmrecipe import ICharmRecipeSet
 from lp.code.adapters.branch import BranchMergeProposalNoPreviewDiffDelta
@@ -254,7 +254,7 @@ def git_repository_modified(repository, event):
     send_git_repository_modified_notifications(repository, event)
 
 
-@implementer(IGitRepository, IHasOwner, IPrivacy, IInformationType)
+@implementer(IGitRepository, IHasOwner, IInformationType)
 class GitRepository(
     StormBase, WebhookTargetMixin, AccessTokenTargetMixin, GitIdentityMixin
 ):
diff --git a/lib/lp/code/publisher.py b/lib/lp/code/publisher.py
index d96e729..a30496c 100644
--- a/lib/lp/code/publisher.py
+++ b/lib/lp/code/publisher.py
@@ -14,10 +14,7 @@ __all__ = [
 
 from zope.component import queryAdapter
 from zope.interface import implementer
-from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
-    IDefaultBrowserLayer,
-)
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from lp.services.webapp.interfaces import IFacet, ILaunchpadContainer
 from lp.services.webapp.publication import LaunchpadBrowserPublication
@@ -37,7 +34,7 @@ class BranchesFacet:
     default_view = "+branches"
 
 
-class CodeLayer(IBrowserRequest, IDefaultBrowserLayer):
+class CodeLayer(IDefaultBrowserLayer):
     """The Code layer."""
 
 
diff --git a/lib/lp/layers.py b/lib/lp/layers.py
index e25de52..6365acc 100644
--- a/lib/lp/layers.py
+++ b/lib/lp/layers.py
@@ -14,7 +14,6 @@ from zope.interface import (
     directlyProvides,
 )
 from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
     IBrowserSkinType,
     IDefaultBrowserLayer,
 )
@@ -28,7 +27,7 @@ def setFirstLayer(request, layer):
     directlyProvides(request, layer, directlyProvidedBy(request))
 
 
-class LaunchpadLayer(IBrowserRequest, IDefaultBrowserLayer):
+class LaunchpadLayer(IDefaultBrowserLayer):
     """The `LaunchpadLayer` layer."""
 
 
diff --git a/lib/lp/registry/model/distribution.py b/lib/lp/registry/model/distribution.py
index 3dd493e..ba8ac3b 100644
--- a/lib/lp/registry/model/distribution.py
+++ b/lib/lp/registry/model/distribution.py
@@ -51,14 +51,7 @@ from lp.app.enums import (
     ServiceUsage,
 )
 from lp.app.errors import NotFoundError, ServiceUsageForbidden
-from lp.app.interfaces.launchpad import (
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
-    ILaunchpadCelebrities,
-    ILaunchpadUsage,
-    IServiceUsage,
-)
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.interfaces.services import IService
 from lp.app.model.launchpad import InformationTypeMixin
 from lp.app.validators.name import sanitize_name, valid_name
@@ -73,7 +66,6 @@ from lp.blueprints.model.specification import (
 from lp.blueprints.model.specificationsearch import search_specifications
 from lp.blueprints.model.sprint import HasSprintsMixin
 from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
-from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
 from lp.bugs.interfaces.bugtarget import (
     BUG_POLICY_ALLOWED_TYPES,
     BUG_POLICY_DEFAULT_TYPES,
@@ -121,7 +113,6 @@ from lp.registry.interfaces.ociproject import (
     OCI_PROJECT_ALLOW_CREATE,
     IOCIProjectSet,
 )
-from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
 from lp.registry.interfaces.person import (
     validate_person,
     validate_person_or_closed_team,
@@ -188,7 +179,6 @@ from lp.soyuz.enums import (
 from lp.soyuz.interfaces.archive import MAIN_ARCHIVE_PURPOSES, IArchiveSet
 from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.publishing import active_publishing_status
 from lp.soyuz.model.archive import Archive
 from lp.soyuz.model.archivefile import ArchiveFile
@@ -227,18 +217,7 @@ specification_policy_default = {
 }
 
 
-@implementer(
-    IBugSummaryDimension,
-    IDistribution,
-    IHasBugSupervisor,
-    IHasBuildRecords,
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
-    IHasOOPSReferences,
-    ILaunchpadUsage,
-    IServiceUsage,
-)
+@implementer(IBugSummaryDimension, IDistribution)
 class Distribution(
     SQLBase,
     BugTargetBase,
diff --git a/lib/lp/registry/model/distroseries.py b/lib/lp/registry/model/distroseries.py
index c3f912d..6a0093a 100644
--- a/lib/lp/registry/model/distroseries.py
+++ b/lib/lp/registry/model/distroseries.py
@@ -24,7 +24,6 @@ from zope.interface import implementer
 
 from lp.app.enums import service_uses_launchpad
 from lp.app.errors import NotFoundError
-from lp.app.interfaces.launchpad import IServiceUsage
 from lp.blueprints.interfaces.specificationtarget import ISpecificationTarget
 from lp.blueprints.model.specification import (
     HasSpecificationsMixin,
@@ -90,7 +89,6 @@ from lp.soyuz.enums import (
 )
 from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 from lp.soyuz.interfaces.binarypackagename import IBinaryPackageName
-from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
 from lp.soyuz.interfaces.distributionjob import (
     IInitializeDistroSeriesJobSource,
 )
@@ -158,9 +156,7 @@ DEFAULT_INDEX_COMPRESSORS = [
 @implementer(
     IBugSummaryDimension,
     IDistroSeries,
-    IHasBuildRecords,
     IHasQueueItems,
-    IServiceUsage,
     ISeriesBugTarget,
 )
 @delegate_to(ISpecificationTarget, context="distribution")
diff --git a/lib/lp/registry/model/person.py b/lib/lp/registry/model/person.py
index db8a777..c2b44b3 100644
--- a/lib/lp/registry/model/person.py
+++ b/lib/lp/registry/model/person.py
@@ -81,12 +81,7 @@ from lp.answers.enums import QuestionStatus
 from lp.answers.interfaces.questionsperson import IQuestionsPerson
 from lp.answers.model.questionsperson import QuestionsPersonMixin
 from lp.app.enums import PRIVATE_INFORMATION_TYPES
-from lp.app.interfaces.launchpad import (
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
-    ILaunchpadCelebrities,
-)
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.validators.email import valid_email
 from lp.app.validators.name import sanitize_name, valid_name
 from lp.blueprints.enums import SpecificationFilter
@@ -425,7 +420,7 @@ _readonly_person_settings = readonly_settings(
 )
 
 
-@implementer(IPerson, IHasIcon, IHasLogo, IHasMugshot)
+@implementer(IPerson)
 @delegate_to(IPersonSettings, context="_person_settings")
 class Person(
     SQLBase,
diff --git a/lib/lp/registry/model/product.py b/lib/lp/registry/model/product.py
index 357e5c4..3d99201 100644
--- a/lib/lp/registry/model/product.py
+++ b/lib/lp/registry/model/product.py
@@ -54,14 +54,7 @@ from lp.app.enums import (
     service_uses_launchpad,
 )
 from lp.app.errors import NotFoundError, ServiceUsageForbidden
-from lp.app.interfaces.launchpad import (
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
-    ILaunchpadCelebrities,
-    ILaunchpadUsage,
-    IServiceUsage,
-)
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.app.interfaces.services import IService
 from lp.app.model.launchpad import InformationTypeMixin
 from lp.blueprints.enums import SpecificationFilter
@@ -74,7 +67,6 @@ from lp.blueprints.model.specification import (
 from lp.blueprints.model.specificationsearch import search_specifications
 from lp.blueprints.model.sprint import HasSprintsMixin
 from lp.bugs.interfaces.bugsummary import IBugSummaryDimension
-from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
 from lp.bugs.interfaces.bugtarget import (
     BUG_POLICY_ALLOWED_TYPES,
     BUG_POLICY_DEFAULT_TYPES,
@@ -114,7 +106,6 @@ from lp.registry.errors import (
     ProprietaryPillar,
 )
 from lp.registry.interfaces.ociproject import IOCIProjectSet
-from lp.registry.interfaces.oopsreferences import IHasOOPSReferences
 from lp.registry.interfaces.person import (
     IPersonSet,
     validate_person,
@@ -252,18 +243,7 @@ specification_policy_default = {
 }
 
 
-@implementer(
-    IBugSummaryDimension,
-    IHasBugSupervisor,
-    IHasCustomLanguageCodes,
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
-    IHasOOPSReferences,
-    ILaunchpadUsage,
-    IProduct,
-    IServiceUsage,
-)
+@implementer(IBugSummaryDimension, IHasCustomLanguageCodes, IProduct)
 class Product(
     SQLBase,
     BugTargetBase,
diff --git a/lib/lp/registry/model/productseries.py b/lib/lp/registry/model/productseries.py
index 16cbb10..40e6d16 100644
--- a/lib/lp/registry/model/productseries.py
+++ b/lib/lp/registry/model/productseries.py
@@ -20,7 +20,7 @@ from zope.interface import implementer
 
 from lp.app.enums import service_uses_launchpad
 from lp.app.errors import NotFoundError
-from lp.app.interfaces.launchpad import ILaunchpadCelebrities, IServiceUsage
+from lp.app.interfaces.launchpad import ILaunchpadCelebrities
 from lp.blueprints.interfaces.specificationtarget import ISpecificationTarget
 from lp.blueprints.model.specification import (
     HasSpecificationsMixin,
@@ -93,9 +93,7 @@ def landmark_key(landmark):
     return date + landmark["name"]
 
 
-@implementer(
-    IBugSummaryDimension, IProductSeries, IServiceUsage, ISeriesBugTarget
-)
+@implementer(IBugSummaryDimension, IProductSeries, ISeriesBugTarget)
 @delegate_to(ISpecificationTarget, context="product")
 class ProductSeries(
     SQLBase,
diff --git a/lib/lp/registry/model/projectgroup.py b/lib/lp/registry/model/projectgroup.py
index b50b11c..09145b7 100644
--- a/lib/lp/registry/model/projectgroup.py
+++ b/lib/lp/registry/model/projectgroup.py
@@ -22,7 +22,6 @@ from lp.answers.model.faq import FAQ, FAQSearch
 from lp.answers.model.question import QuestionTargetSearch
 from lp.app.enums import ServiceUsage
 from lp.app.errors import NotFoundError
-from lp.app.interfaces.launchpad import IHasIcon, IHasLogo, IHasMugshot
 from lp.blueprints.enums import SprintSpecificationStatus
 from lp.blueprints.model.specification import (
     HasSpecificationsMixin,
@@ -86,9 +85,6 @@ from lp.translations.model.translationpolicy import TranslationPolicyMixin
     IBugSummaryDimension,
     IProjectGroup,
     IFAQCollection,
-    IHasIcon,
-    IHasLogo,
-    IHasMugshot,
     ISearchableByQuestionOwner,
 )
 class ProjectGroup(
diff --git a/lib/lp/services/webapp/tests/test_authorization.py b/lib/lp/services/webapp/tests/test_authorization.py
index 96b3f47..3651ba8 100644
--- a/lib/lp/services/webapp/tests/test_authorization.py
+++ b/lib/lp/services/webapp/tests/test_authorization.py
@@ -822,7 +822,6 @@ class TestIterAuthorization(TestCase):
         self.assertEqual(cache_expected, cache)
 
 
-@implementer(Interface)
 class AvailableWithPermissionObject:
     """An object used to test available_with_permission."""
 
diff --git a/lib/lp/services/webapp/vocabulary.py b/lib/lp/services/webapp/vocabulary.py
index fb51fbc..1d965a2 100644
--- a/lib/lp/services/webapp/vocabulary.py
+++ b/lib/lp/services/webapp/vocabulary.py
@@ -29,7 +29,7 @@ from storm.base import Storm
 from storm.expr import Expr
 from storm.store import EmptyResultSet
 from zope.interface import Attribute, Interface, implementer
-from zope.schema.interfaces import IVocabulary, IVocabularyTokenized
+from zope.schema.interfaces import IVocabularyTokenized
 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 from zope.security.proxy import isinstance as zisinstance
 
@@ -73,7 +73,7 @@ class VocabularyFilter(
         return []
 
 
-class IHugeVocabulary(IVocabulary, IVocabularyTokenized):
+class IHugeVocabulary(IVocabularyTokenized):
     """Interface for huge vocabularies.
 
     Items in an IHugeVocabulary should have human readable tokens or the
@@ -265,7 +265,7 @@ class FilteredVocabularyBase:
         return []
 
 
-@implementer(IVocabulary, IVocabularyTokenized)
+@implementer(IVocabularyTokenized)
 class SQLObjectVocabularyBase(FilteredVocabularyBase):
     """A base class for widgets that are rendered to collect values
     for attributes that are SQLObjects, e.g. ForeignKey.
@@ -423,7 +423,7 @@ class NamedSQLObjectVocabulary(SQLObjectVocabularyBase):
         return self.emptySelectResults()
 
 
-@implementer(IVocabulary, IVocabularyTokenized)
+@implementer(IVocabularyTokenized)
 class StormVocabularyBase(FilteredVocabularyBase):
     """A base class for widgets that are rendered to collect values
     for attributes that are Storm references.
diff --git a/lib/lp/snappy/interfaces/snap.py b/lib/lp/snappy/interfaces/snap.py
index dd70dcd..211a1e6 100644
--- a/lib/lp/snappy/interfaces/snap.py
+++ b/lib/lp/snappy/interfaces/snap.py
@@ -77,7 +77,6 @@ from lp import _
 from lp.app.enums import InformationType
 from lp.app.errors import NameLookupFailed
 from lp.app.interfaces.informationtype import IInformationType
-from lp.app.interfaces.launchpad import IPrivacy
 from lp.app.validators.name import name_validator
 from lp.buildmaster.interfaces.processor import IProcessor
 from lp.code.interfaces.branch import IBranch
@@ -1215,7 +1214,6 @@ class ISnap(
     ISnapEdit,
     ISnapEditableAttributes,
     ISnapAdminAttributes,
-    IPrivacy,
     IInformationType,
 ):
     """A buildable snap package."""
diff --git a/lib/lp/translations/publisher.py b/lib/lp/translations/publisher.py
index 300df3f..3ed2de5 100644
--- a/lib/lp/translations/publisher.py
+++ b/lib/lp/translations/publisher.py
@@ -11,10 +11,7 @@ __all__ = [
 
 
 from zope.interface import implementer
-from zope.publisher.interfaces.browser import (
-    IBrowserRequest,
-    IDefaultBrowserLayer,
-)
+from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 from lp.services.webapp.interfaces import IFacet
 from lp.services.webapp.publication import LaunchpadBrowserPublication
@@ -33,7 +30,7 @@ class TranslationsFacet:
     default_view = "+translations"
 
 
-class TranslationsLayer(IBrowserRequest, IDefaultBrowserLayer):
+class TranslationsLayer(IDefaultBrowserLayer):
     """The Translations layer."""