launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29656
[Merge] ~cjwatson/launchpad:zcml-namespaces-call into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:zcml-namespaces-call into launchpad:master.
Commit message:
Move ZCML call directive to lp namespace
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/437098
As with commit 57196c1d6a220f00039e027768cc05368135f556, it makes sense to move our local `call` directive to our own namespace rather than poking it into the Zope namespace.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:zcml-namespaces-call into launchpad:master.
diff --git a/lib/lp/services/webapp/meta.zcml b/lib/lp/services/webapp/meta.zcml
index ff4ed67..367512b 100644
--- a/lib/lp/services/webapp/meta.zcml
+++ b/lib/lp/services/webapp/meta.zcml
@@ -26,7 +26,7 @@
/>
<directive
- namespace="http://namespaces.zope.org/zope";
+ namespace="http://namespaces.canonical.com/lp";
name="call"
schema="lp.services.webapp.metazcml.ICallDirective"
handler="lp.services.webapp.metazcml.call"
diff --git a/lib/lp/services/webapp/tests/test_metazcml.py b/lib/lp/services/webapp/tests/test_metazcml.py
index 9cd3bbd..3693fd6 100644
--- a/lib/lp/services/webapp/tests/test_metazcml.py
+++ b/lib/lp/services/webapp/tests/test_metazcml.py
@@ -10,7 +10,7 @@ from lp.testing.fakemethod import FakeMethod
class TestCallDirective(TestCase):
def test_call(self):
directive = """
- <call callable="%(this)s.callable" />
+ <lp:call callable="%(this)s.callable" />
""" % dict(
this=this
)
@@ -21,7 +21,9 @@ class TestCallDirective(TestCase):
callable = FakeMethod()
this = "lp.services.webapp.tests.test_metazcml"
zcml_configure = """
- <configure xmlns="http://namespaces.zope.org/zope";>
+ <configure
+ xmlns="http://namespaces.zope.org/zope";
+ xmlns:lp="http://namespaces.canonical.com/lp";>
<include package="lp.services.webapp" file="meta.zcml" />
%s
</configure>
diff --git a/lib/lp/soyuz/configure.zcml b/lib/lp/soyuz/configure.zcml
index 893878a..81a994c 100644
--- a/lib/lp/soyuz/configure.zcml
+++ b/lib/lp/soyuz/configure.zcml
@@ -830,14 +830,14 @@
interface="lp.soyuz.interfaces.binarypackagerelease.IBinaryPackageReleaseDownloadCount"/>
</class>
- <call
+ <lp:call
callable="lp.archiveuploader.uploadpolicy.register_archive_upload_policy_adapters"
/>
<!-- Although the policies defined in lp.archiveuploader.tests are only
required by tests, they're used when testing scripts manually on
dogfood/staging, so they're registered here. -->
- <call
+ <lp:call
callable="lp.archiveuploader.tests.register_archive_upload_policy_adapters"
/>