[Checkins] SVN: grokcore.component/trunk/src/grokcore/component/interfaces.py Move IGrokErrors from grok to grokcore.component as well.

Philipp von Weitershausen philikon at philikon.de
Tue Jul 22 10:38:05 EDT 2008


Log message for revision 88694:
  Move IGrokErrors from grok to grokcore.component as well.
  

Changed:
  U   grokcore.component/trunk/src/grokcore/component/interfaces.py

-=-
Modified: grokcore.component/trunk/src/grokcore/component/interfaces.py
===================================================================
--- grokcore.component/trunk/src/grokcore/component/interfaces.py	2008-07-22 14:29:35 UTC (rev 88693)
+++ grokcore.component/trunk/src/grokcore/component/interfaces.py	2008-07-22 14:38:04 UTC (rev 88694)
@@ -17,6 +17,7 @@
     it a candidate for auto-association.
     """
 
+
 class IBaseClasses(Interface):
 
     ClassGrokker = Attribute("Base class to define a class grokker.")
@@ -29,6 +30,7 @@
     MultiAdapter = Attribute("Base class for multi-adapters.")
     GlobalUtility = Attribute("Base class for global utilities.")
 
+
 class IDirectives(Interface):
 
     def baseclass():
@@ -79,6 +81,7 @@
         utility, or an instance of it.
         """
 
+
 class IDecorators(Interface):
 
     def subscribe(*classes_or_interfaces):
@@ -95,6 +98,17 @@
         implements an interface or a number of interfaces.
         """
 
+
+class IGrokErrors(Interface):
+
+    def GrokError(message, component):
+        """Error indicating that a problem occurrend during the
+        grokking of a module (at "grok time")."""
+
+    def GrokImportError(*args):
+        """Error indicating a problem at import time."""
+
+
 class IMartianAPI(Interface):
     """Part of Martian's API exposed by grokcore.component."""
 
@@ -103,9 +117,8 @@
     ClassGrokker = Attribute("Grokker for classes.")
     InstanceGrokker = Attribute("Grokker for instances.")
     GlobalGrokker = Attribute("Grokker that's invoked for a module.")
-    GrokImportError = Attribute("Error that may while importing components.")
-    GrokError = Attribute("Error that may occur during the grokking process.")
 
-class IGrokcoreComponentAPI(IBaseClasses, IDirectives,
-                            IDecorators, IMartianAPI):
+
+class IGrokcoreComponentAPI(IBaseClasses, IDirectives, IDecorators,
+                            IGrokErrors, IMartianAPI):
     """grokcore.component's public API."""



More information about the Checkins mailing list