[Zope3-checkins] CVS: Zope3/src/zope/exceptions - _duplicate.py:1.4.22.1 _forbidden.py:1.4.22.1 _notfounderror.py:1.5.22.1 _zope_error.py:1.5.22.1 unauthorized.py:1.5.22.1

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


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

Modified Files:
      Tag: cw-mail-branch
	_duplicate.py _forbidden.py _notfounderror.py _zope_error.py 
	unauthorized.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/exceptions/_duplicate.py 1.4 => 1.4.22.1 ===
--- Zope3/src/zope/exceptions/_duplicate.py:1.4	Tue Feb 11 11:00:06 2003
+++ Zope3/src/zope/exceptions/_duplicate.py	Sun Jun 22 10:23:40 2003
@@ -15,12 +15,11 @@
 $Id$
 """
 from zope.exceptions import ZopeError, IZopeError
-from zope.interface.implements import implements
-
-class DuplicationError(ZopeError):
-    """A duplicate registration was attempted"""
+from zope.interface import implements
 
 class IDuplicationError(IZopeError):
     pass
 
-implements(DuplicationError, IDuplicationError)
+class DuplicationError(ZopeError):
+    """A duplicate registration was attempted"""
+    implements(IDuplicationError)


=== Zope3/src/zope/exceptions/_forbidden.py 1.4 => 1.4.22.1 ===
--- Zope3/src/zope/exceptions/_forbidden.py:1.4	Tue Feb 11 11:00:06 2003
+++ Zope3/src/zope/exceptions/_forbidden.py	Sun Jun 22 10:23:40 2003
@@ -16,21 +16,22 @@
 $Id$
 """
 from zope.exceptions import ZopeError, IZopeError
-from zope.interface.implements import implements
+from zope.interface import implements
 from zope.interface.common.interfaces import IAttributeError
 
+class IForbidden(IZopeError):
+    pass
+
 class Forbidden(ZopeError):
     """A resource cannot be accessed under any circumstances
     """
+    implements(IForbidden)
 
-class IForbidden(IZopeError):
+class IForbiddenAttribute(IForbidden, IAttributeError):
     pass
 
 class ForbiddenAttribute(Forbidden, AttributeError):
     """An attribute is unavailable because it is forbidden (private)
     """
-class IForbiddenAttribute(IForbidden, IAttributeError):
-    pass
+    implements(IForbiddenAttribute)
 
-implements(Forbidden, IForbidden)
-implements(ForbiddenAttribute, IForbiddenAttribute)


=== Zope3/src/zope/exceptions/_notfounderror.py 1.5 => 1.5.22.1 ===
--- Zope3/src/zope/exceptions/_notfounderror.py:1.5	Wed Feb 19 10:25:58 2003
+++ Zope3/src/zope/exceptions/_notfounderror.py	Sun Jun 22 10:23:40 2003
@@ -16,6 +16,7 @@
 """
 from zope.exceptions import ZopeError, IZopeError
 from zope.interface.common.interfaces import IKeyError
+from zope.interface import implements
 
 class INotFoundError(IZopeError, IKeyError):
     pass
@@ -23,5 +24,5 @@
 class NotFoundError(ZopeError, KeyError):
     """A resource could not be found.
     """
-    __implements__ = INotFoundError
+    implements(INotFoundError)
 


=== Zope3/src/zope/exceptions/_zope_error.py 1.5 => 1.5.22.1 ===
--- Zope3/src/zope/exceptions/_zope_error.py:1.5	Mon Feb 17 13:01:13 2003
+++ Zope3/src/zope/exceptions/_zope_error.py	Sun Jun 22 10:23:40 2003
@@ -16,12 +16,11 @@
 $Id$
 """
 from zope.interface.common.interfaces import IException
-from zope.interface.implements import implements
-
-class ZopeError(Exception):
-    """Generic base class for Zope errors."""
+from zope.interface import implements
 
 class IZopeError(IException):
     pass
 
-implements(ZopeError, IZopeError)
+class ZopeError(Exception):
+    """Generic base class for Zope errors."""
+    implements(IZopeError)


=== Zope3/src/zope/exceptions/unauthorized.py 1.5 => 1.5.22.1 ===
--- Zope3/src/zope/exceptions/unauthorized.py:1.5	Mon Feb 17 13:01:13 2003
+++ Zope3/src/zope/exceptions/unauthorized.py	Sun Jun 22 10:23:40 2003
@@ -18,11 +18,16 @@
 from types import StringType
 from zope.exceptions import ZopeError
 from zope.exceptions import IZopeError
-from zope.interface.implements import implements
+from zope.interface import implements
+
+class IUnauthorized(IZopeError):
+    pass
 
 class Unauthorized(ZopeError):
     """Some user wasn't allowed to access a resource"""
 
+    implements(IUnauthorized)
+
     def __init__(self, message=None, value=None, needed=None, name=None, **kw):
         """Possible signatures:
 
@@ -75,7 +80,3 @@
         c = getattr(c, '__name__', 'object')
         return "a particular %s" % c
 
-class IUnauthorized(IZopeError):
-    pass
-
-implements(Unauthorized, IUnauthorized)