[Checkins] SVN: zope.traversing/trunk/ Added a traverer for
++skin++ for XMLRPC skins (IXMLRPCSkinType). This also
Christian Zagrodnick
cz at gocept.com
Thu Aug 9 10:10:30 EDT 2007
Log message for revision 78730:
Added a traverer for ++skin++ for XMLRPC skins (IXMLRPCSkinType). This also
means that the normal ++skin++ namespace handler is only bound to
IBrowserRequest.
Changed:
A zope.traversing/trunk/CHANGES.txt
U zope.traversing/trunk/setup.py
U zope.traversing/trunk/src/zope/traversing/configure.zcml
U zope.traversing/trunk/src/zope/traversing/namespace.py
U zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py
-=-
Added: zope.traversing/trunk/CHANGES.txt
===================================================================
--- zope.traversing/trunk/CHANGES.txt (rev 0)
+++ zope.traversing/trunk/CHANGES.txt 2007-08-09 14:10:30 UTC (rev 78730)
@@ -0,0 +1,10 @@
+=======
+Changes
+=======
+
+3.5
+===
+
+- Added a traverer for ++skin++ for XMLRPC skins (IXMLRPCSkinType). This also
+ means that the normal ++skin++ namespace handler is only bound to
+ IBrowserRequest.
Property changes on: zope.traversing/trunk/CHANGES.txt
___________________________________________________________________
Name: svn:keywords
+ Id Rev Date
Name: svn:eol-style
+ native
Modified: zope.traversing/trunk/setup.py
===================================================================
--- zope.traversing/trunk/setup.py 2007-08-09 14:08:31 UTC (rev 78729)
+++ zope.traversing/trunk/setup.py 2007-08-09 14:10:30 UTC (rev 78730)
@@ -21,8 +21,8 @@
setup(name='zope.traversing',
- version = '3.4.0b1',
- url='http://svn.zope.org/zope.traversing',
+ version = '3.5.0a1',
+ url='http://pypi.python.org/pypi/zope.traversing',
license='ZPL 2.1',
description='Zope traversing',
author='Zope Corporation and Contributors',
@@ -44,7 +44,7 @@
'zope.i18nmessageid',
'zope.interface',
'zope.proxy',
- 'zope.publisher',
+ 'zope.publisher>=3.5.0a1.dev-r78727',
'zope.security',
],
include_package_data = True,
Modified: zope.traversing/trunk/src/zope/traversing/configure.zcml
===================================================================
--- zope.traversing/trunk/src/zope/traversing/configure.zcml 2007-08-09 14:08:31 UTC (rev 78729)
+++ zope.traversing/trunk/src/zope/traversing/configure.zcml 2007-08-09 14:10:30 UTC (rev 78730)
@@ -95,12 +95,18 @@
/>
<view
- name="skin" type="*"
+ name="skin" type="zope.publisher.interfaces.browser.IBrowserRequest"
provides="zope.traversing.interfaces.ITraversable" for="*"
factory="zope.traversing.namespace.skin"
/>
<view
+ name="skin" type="zope.publisher.interfaces.xmlrpc.IXMLRPCRequest"
+ provides="zope.traversing.interfaces.ITraversable" for="*"
+ factory="zope.traversing.namespace.xmlrpc_skin"
+ />
+
+<view
name="vh" type="*"
provides="zope.traversing.interfaces.ITraversable" for="*"
factory="zope.traversing.namespace.vh"
Modified: zope.traversing/trunk/src/zope/traversing/namespace.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/namespace.py 2007-08-09 14:08:31 UTC (rev 78729)
+++ zope.traversing/trunk/src/zope/traversing/namespace.py 2007-08-09 14:10:30 UTC (rev 78730)
@@ -25,6 +25,7 @@
from zope.component.interfaces import ComponentLookupError
from zope.interface import providedBy, directlyProvides, directlyProvidedBy
from zope.publisher.interfaces.browser import IBrowserSkinType
+from zope.publisher.interfaces.xmlrpc import IXMLRPCSkinType
from zope.publisher.browser import applySkin
from zope.security.proxy import removeSecurityProxy
from zope.traversing.interfaces import ITraversable, IPathAdapter
@@ -363,15 +364,23 @@
class skin(view):
+ skin_type = IBrowserSkinType
+
def traverse(self, name, ignored):
self.request.shiftNameToApplication()
try:
- skin = zope.component.getUtility(IBrowserSkinType, name)
+ skin = zope.component.getUtility(self.skin_type, name)
except ComponentLookupError:
raise TraversalError("++skin++%s" % name)
applySkin(self.request, skin)
return self.context
+
+class xmlrpc_skin(skin):
+
+ skin_type = IXMLRPCSkinType
+
+
class vh(view):
def traverse(self, name, ignored):
Modified: zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py
===================================================================
--- zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py 2007-08-09 14:08:31 UTC (rev 78729)
+++ zope.traversing/trunk/src/zope/traversing/tests/test_traverser.py 2007-08-09 14:10:30 UTC (rev 78730)
@@ -18,7 +18,7 @@
import unittest
import zope.component
-from zope.interface import directlyProvides, implementedBy
+from zope.interface import directlyProvides, implementedBy, directlyProvidedBy
from zope.interface.verify import verifyClass
from zope.location.traversing import LocationPhysicallyLocatable
from zope.security.interfaces import Unauthorized
More information about the Checkins
mailing list