launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01340
[Merge] lp:~wgrant/launchpad/bug-640435-minimise-z.a.publisher into lp:launchpad/devel
William Grant has proposed merging lp:~wgrant/launchpad/bug-640435-minimise-z.a.publisher into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#640435 branch name conflicts with zope.ManageContent
https://bugs.launchpad.net/bugs/640435
zope.app.publisher's configure.zcml registers a view on * named 'manage'. This unused view shadows objects named 'manage', and it OOPSes because Launchpad doesn't have a zope.ManageContent permission (bug #640435).
Some investigation revealed that the only code we use from zope.app.publisher is its XML-RPC support, and that including just the XML-RPC ZCML in our zopeapp.zcml is sufficient. Gary supports this approach.
I also replaced all deprecated zope.app.publisher imports with imports from their new locations, to make it obvious that we're not actually using much of z.a.p.
--
https://code.launchpad.net/~wgrant/launchpad/bug-640435-minimise-z.a.publisher/+merge/37338
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-640435-minimise-z.a.publisher into lp:launchpad/devel.
=== modified file 'lib/canonical/launchpad/webapp/metazcml.py'
--- lib/canonical/launchpad/webapp/metazcml.py 2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/webapp/metazcml.py 2010-10-02 07:08:50 +0000
@@ -15,7 +15,7 @@
import zope.app.form.browser.metadirectives
from zope.app.pagetemplate.engine import TrustedEngine
from zope.app.publication.metaconfigure import publisher
-import zope.app.publisher.browser.metadirectives
+import zope.browserpage.metadirectives
from zope.component import getUtility
from zope.component.security import PublicPermission
from zope.component.zcml import (
@@ -439,7 +439,7 @@
class IPageDirective(
- zope.app.publisher.browser.metadirectives.IPageDirective,
+ zope.browserpage.metadirectives.IPageDirective,
IAssociatedWithAFacet):
"""Extended browser:page directive to have an extra 'facet' attribute."""
@@ -473,14 +473,14 @@
class IPagesPageSubdirective(
- zope.app.publisher.browser.metadirectives.IPagesPageSubdirective,
+ zope.browserpage.metadirectives.IPagesPageSubdirective,
IAssociatedWithAFacet):
"""Extended complex browser:pages directive to have an extra 'facet'
attribute on the inner <browser:page> element."""
class IPagesDirective(
- zope.app.publisher.browser.metadirectives.IPagesDirective,
+ zope.browserpage.metadirectives.IPagesDirective,
IAssociatedWithAFacet):
"""Extend the complex browser:pages directive to have an extra 'facet'
attribute on the outer <browser:pages> element."""
=== modified file 'lib/canonical/lazr/folder.py'
--- lib/canonical/lazr/folder.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/lazr/folder.py 2010-10-02 07:08:50 +0000
@@ -13,16 +13,16 @@
import re
import time
-from zope.interface import implements
+from zope.browserresource.file import setCacheControl
from zope.contenttype import guess_content_type
from zope.datetime import rfc1123_date
-from zope.app.publisher.browser.fileresource import setCacheControl
+from zope.interface import implements
from zope.publisher.interfaces.browser import IBrowserPublisher
from zope.publisher.interfaces import NotFound
class File:
- # Copied from zope.app.publisher.fileresource, which
+ # Copied from zope.browserresource.file, which
# unbelievably throws away the file data, and isn't
# useful extensible.
#
=== modified file 'lib/lp/vostok/browser/tests/test_root.py'
--- lib/lp/vostok/browser/tests/test_root.py 2010-09-25 14:29:32 +0000
+++ lib/lp/vostok/browser/tests/test_root.py 2010-10-02 07:08:50 +0000
@@ -8,7 +8,7 @@
import os
import unittest
-from zope.app.publisher.browser import getDefaultViewName
+from zope.publisher.defaultview import getDefaultViewName
from canonical.launchpad.testing.pages import (
extract_text,
=== modified file 'zopeapp.zcml'
--- zopeapp.zcml 2010-07-21 09:56:38 +0000
+++ zopeapp.zcml 2010-10-02 07:08:50 +0000
@@ -38,7 +38,7 @@
<!--
<include package="zope.app.container" />
-->
- <include package="zope.app.publisher" />
+ <include package="zope.app.publisher.xmlrpc" />
<include package="zope.app.publication" file="meta.zcml" />
<!-- We don't need any of the default publications. -->
Follow ups