[Checkins] SVN: Sandbox/nadako/zope. Move I*View interfaces from zope.app.publisher to zope.publisher.
Dan Korostelev
nadako at gmail.com
Mon Aug 24 15:43:49 EDT 2009
Log message for revision 103179:
Move I*View interfaces from zope.app.publisher to zope.publisher.
Changed:
U Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/ftp.py
U Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/http.py
U Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/xmlrpc.py
U Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/xmlrpc/__init__.py
U Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/ftp.py
U Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/http.py
U Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/xmlrpc.py
U Sandbox/nadako/zope.publisher/src/zope/publisher/xmlrpc.py
-=-
Modified: Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/ftp.py
===================================================================
--- Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/ftp.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/ftp.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -15,14 +15,9 @@
$Id$
"""
-from zope.publisher.interfaces import IView
-from zope.publisher.interfaces.ftp import IFTPPublisher
+from zope.publisher.interfaces.ftp import IFTPPublisher, IFTPView
-class IFTPView(IView):
- "FTP View"
-
-
class IFTPDirectoryPublisher(IFTPPublisher, IFTPView):
def type(name):
Modified: Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/http.py
===================================================================
--- Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/http.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/http.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -15,13 +15,9 @@
$Id$
"""
-from zope.publisher.interfaces import IView
+from zope.publisher.interfaces.http import IHTTPView
-class IHTTPView(IView):
- "HTTP View"
-
-
class ILogin(IHTTPView):
"""A simple login interface."""
Modified: Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/xmlrpc.py
===================================================================
--- Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/xmlrpc.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/interfaces/xmlrpc.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -15,8 +15,4 @@
$Id$
"""
-from zope.publisher.interfaces import IView
-
-
-class IXMLRPCView(IView):
- """XMLRPC View"""
+from zope.publisher.interfaces.xmlrpc import IXMLRPCView # BBB import
Modified: Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/xmlrpc/__init__.py
===================================================================
--- Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/xmlrpc/__init__.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.app.publisher/src/zope/app/publisher/xmlrpc/__init__.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -22,13 +22,8 @@
import zope.publisher.interfaces.xmlrpc
import zope.app.publisher.interfaces.xmlrpc
-class XMLRPCView(object):
- """A base XML-RPC view that can be used as mix-in for XML-RPC views."""
- zope.interface.implements(zope.app.publisher.interfaces.xmlrpc.IXMLRPCView)
+from zope.publisher.xmlrpc import XMLRPCView
- def __init__(self, context, request):
- self.context = context
- self.request = request
class IMethodPublisher(zope.interface.Interface):
"""Marker interface for an object that wants to publish methods
Modified: Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/ftp.py
===================================================================
--- Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/ftp.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/ftp.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -22,12 +22,15 @@
from zope.publisher.interfaces import IPublishTraverse
from zope.publisher.interfaces import IRequest
+from zope.publisher.interfaces import IView
-
class IFTPRequest(IRequest):
"""FTP Request
"""
+class IFTPView(IView):
+ """FTP View"""
+
class IFTPCredentials(Interface):
def _authUserPW():
Modified: Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/http.py
===================================================================
--- Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/http.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/http.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -27,6 +27,7 @@
from zope.publisher.interfaces import IPublishTraverse
from zope.publisher.interfaces import IRequest
from zope.publisher.interfaces import IResponse
+from zope.publisher.interfaces import IView
class IVirtualHostRequest(Interface):
@@ -214,6 +215,10 @@
"""
+class IHTTPView(IView):
+ "HTTP View"
+
+
class IHTTPCredentials(Interface):
# TODO: Eventially this will be a different method
Modified: Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/xmlrpc.py
===================================================================
--- Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/xmlrpc.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.publisher/src/zope/publisher/interfaces/xmlrpc.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -20,7 +20,7 @@
from zope.interface import Interface
-from zope.publisher.interfaces import IPublication
+from zope.publisher.interfaces import IPublication, IView
from zope.publisher.interfaces import IPublishTraverse
from zope.publisher.interfaces.http import IHTTPRequest
@@ -43,11 +43,11 @@
"""XML-RPC Request
"""
+class IXMLRPCView(IView):
+ """XMLRPC View"""
+
class IXMLRPCPremarshaller(Interface):
"""Pre-Marshaller to remove proxies for xmlrpclib"""
def __call__(self):
"""Return the given object without proxies."""
-
-
-
Modified: Sandbox/nadako/zope.publisher/src/zope/publisher/xmlrpc.py
===================================================================
--- Sandbox/nadako/zope.publisher/src/zope/publisher/xmlrpc.py 2009-08-24 19:41:05 UTC (rev 103178)
+++ Sandbox/nadako/zope.publisher/src/zope/publisher/xmlrpc.py 2009-08-24 19:43:43 UTC (rev 103179)
@@ -28,7 +28,7 @@
import zope.interface
from zope.interface import implements
from zope.publisher.interfaces.xmlrpc import \
- IXMLRPCPublisher, IXMLRPCRequest, IXMLRPCPremarshaller
+ IXMLRPCPublisher, IXMLRPCRequest, IXMLRPCPremarshaller, IXMLRPCView
from zope.publisher.http import HTTPRequest, HTTPResponse, DirectResult
from zope.security.proxy import isinstance
@@ -162,6 +162,16 @@
# XML-RPC prefers a status of 200 ("ok") even when reporting errors.
self.setStatus(200)
+
+class XMLRPCView(object):
+ """A base XML-RPC view that can be used as mix-in for XML-RPC views."""
+ implements(IXMLRPCView)
+
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
+
+
class PreMarshallerBase(object):
"""Abstract base class for pre-marshallers."""
zope.interface.implements(IXMLRPCPremarshaller)
More information about the Checkins
mailing list