[Zope3-checkins] CVS: Zope3/src/zope/publisher/interfaces - __init__.py:1.11.12.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:21 -0400


Update of /cvs-repository/Zope3/src/zope/publisher/interfaces
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/publisher/interfaces

Modified Files:
      Tag: cw-mail-branch
	__init__.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/publisher/interfaces/__init__.py 1.11 => 1.11.12.1 ===
--- Zope3/src/zope/publisher/interfaces/__init__.py:1.11	Fri Apr 25 06:36:38 2003
+++ Zope3/src/zope/publisher/interfaces/__init__.py	Sun Jun 22 10:23:50 2003
@@ -21,6 +21,7 @@
 from zope.exceptions import Unauthorized
 from zope.exceptions import NotFoundError, INotFoundError
 from zope.component.interfaces import IPresentationRequest
+from zope.interface import implements
 from zope.interface.common.mapping import IEnumerableMapping
 from zope.interface.common.interfaces import IException
 
@@ -28,13 +29,13 @@
     pass
 
 class PublishingException(Exception):
-    __implements__ = IPublishingException
+    implements(IPublishingException)
 
 class ITraversalException(IPublishingException):
     pass
 
 class TraversalException(PublishingException):
-    __implements__ = ITraversalException
+    implements(ITraversalException)
 
 class INotFound(INotFoundError, ITraversalException):
     def getObject():
@@ -44,7 +45,7 @@
         'Returns the name that was being traversed.'
 
 class NotFound(NotFoundError, TraversalException):
-    __implements__ = INotFound
+    implements(INotFound)
 
     def __init__(self, ob, name, request=None):
         self.ob = ob
@@ -71,7 +72,7 @@
         'Returns the debug message.'
 
 class DebugError(TraversalException):
-    __implements__ = IDebugError
+    implements(IDebugError)
 
     def __init__(self, ob, message):
         self.ob = ob
@@ -92,7 +93,7 @@
 
 class BadRequest(PublishingException):
 
-    __implements__ = IBadRequest
+    implements(IBadRequest)
 
     def __init__(self, message):
         self.message = message
@@ -106,7 +107,7 @@
 
 class Redirect(PublishingException):
 
-    __implements__ = IRedirect
+    implements(IRedirect)
 
     def __init__(self, location):
         self.location = location
@@ -125,7 +126,7 @@
     """Raise this to retry a request.
     """
 
-    __implements__ = IRetry
+    implements(IRetry)
 
     def __init__(self, orig_exc=None):
         self.orig_exc = orig_exc
@@ -286,10 +287,10 @@
     user = Attribute("""User object associated with the request
 
                         It is up to the publication object to set this
-                        attribute.
+                        attribute by calling the setUser method.
                         """)
 
-    response = Attribute("""the request's response object
+    response = Attribute("""The request's response object
 
         Return an IPublisherResponse for the request.
         """)
@@ -323,6 +324,12 @@
         """Set the skin to be used for the request.
 
         It's up to the publication object to decide this.
+        """
+
+    def setUser(user):
+        """Set the user attribute.
+
+        It should be IPrincipal wrapped in it's AuthenticationService's context.
         """