Merge lp:~mwhudson/launchpad/remove-unnecessary-ILaunchpadPublicationDirective into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11202
Proposed branch: lp:~mwhudson/launchpad/remove-unnecessary-ILaunchpadPublicationDirective
Merge into: lp:launchpad
Diff against target: 52 lines (+5/-7)
2 files modified
lib/canonical/launchpad/webapp/meta.zcml (+1/-1)
lib/canonical/launchpad/webapp/metazcml.py (+4/-6)
To merge this branch: bzr merge lp:~mwhudson/launchpad/remove-unnecessary-ILaunchpadPublicationDirective
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+30602@code.launchpad.net

Description of the change

Hi,

William pointed out that an interface definition I added wasn't necessary (priority is optional in the superclass and anyway I'd misspelled priority in my interface...).

So let's remove it again.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/webapp/meta.zcml'
--- lib/canonical/launchpad/webapp/meta.zcml 2010-07-16 15:13:50 +0000
+++ lib/canonical/launchpad/webapp/meta.zcml 2010-07-22 02:24:53 +0000
@@ -72,7 +72,7 @@
72 <directive72 <directive
73 namespace="http://namespaces.zope.org/zope"73 namespace="http://namespaces.zope.org/zope"
74 name="publisher"74 name="publisher"
75 schema="canonical.launchpad.webapp.metazcml.ILaunchpadPublicationDirective"75 schema="zope.app.publication.metadirectives.IRequestPublicationDirective"
76 handler="canonical.launchpad.webapp.metazcml.launchpadPublisher"76 handler="canonical.launchpad.webapp.metazcml.launchpadPublisher"
77 />77 />
7878
7979
=== modified file 'lib/canonical/launchpad/webapp/metazcml.py'
--- lib/canonical/launchpad/webapp/metazcml.py 2010-07-16 15:35:45 +0000
+++ lib/canonical/launchpad/webapp/metazcml.py 2010-07-22 02:24:53 +0000
@@ -11,7 +11,6 @@
11from zope.app.file.image import Image11from zope.app.file.image import Image
12from zope.app.pagetemplate.engine import TrustedEngine12from zope.app.pagetemplate.engine import TrustedEngine
13from zope.app.publication.metaconfigure import publisher13from zope.app.publication.metaconfigure import publisher
14from zope.app.publication.metadirectives import IRequestPublicationDirective
15from zope.component import getUtility14from zope.component import getUtility
16from zope.component.security import PublicPermission15from zope.component.security import PublicPermission
17from zope.component.zcml import adapter, handler, utility, view16from zope.component.zcml import adapter, handler, utility, view
@@ -21,7 +20,7 @@
21from zope.publisher.interfaces.browser import (20from zope.publisher.interfaces.browser import (
22 IBrowserPublisher, IBrowserRequest, IDefaultBrowserLayer)21 IBrowserPublisher, IBrowserRequest, IDefaultBrowserLayer)
23from zope.publisher.interfaces.xmlrpc import IXMLRPCRequest22from zope.publisher.interfaces.xmlrpc import IXMLRPCRequest
24from zope.schema import Int, TextLine23from zope.schema import TextLine
25from zope.security.checker import Checker, CheckerPublic24from zope.security.checker import Checker, CheckerPublic
26from zope.security.interfaces import IPermission25from zope.security.interfaces import IPermission
27from zope.security.permission import Permission26from zope.security.permission import Permission
@@ -656,15 +655,14 @@
656 utility(_context, ILaunchpadPermission, permission, name=id)655 utility(_context, ILaunchpadPermission, permission, name=id)
657656
658657
659class ILaunchpadPublicationDirective(IRequestPublicationDirective):
660
661 priorty = Int(required=False)
662
663_arbitrary_priority = 12658_arbitrary_priority = 12
664659
665660
666def launchpadPublisher(_context, name, factory, methods=['*'],661def launchpadPublisher(_context, name, factory, methods=['*'],
667 mimetypes=['*'], priority=None):662 mimetypes=['*'], priority=None):
663 # This overrides zope's definition of the <publisher> directive to supply
664 # an arbitrary unique priority if none is explicitly supplied -- we don't
665 # care about the priority in Launchpad but it needs to be unique.
668 global _arbitrary_priority666 global _arbitrary_priority
669 if priority is None:667 if priority is None:
670 _arbitrary_priority += 1668 _arbitrary_priority += 1