[Zope3-checkins] CVS: Zope3/src/zope/app - configure.zcml:1.22 introspector.py:1.9

Sidnei da Silva sidnei@x3ng.com.br
Tue, 24 Jun 2003 14:58:42 -0400


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv23017/src/zope/app

Modified Files:
	configure.zcml introspector.py 
Log Message:
Made the introspector work for interfaces again, plus some whitespace cleanup here and there.

=== Zope3/src/zope/app/configure.zcml 1.21 => 1.22 ===
--- Zope3/src/zope/app/configure.zcml:1.21	Mon Jun 23 18:41:41 2003
+++ Zope3/src/zope/app/configure.zcml	Tue Jun 24 14:58:11 2003
@@ -6,7 +6,7 @@
 
   <include file="meta.zcml" />
 
-<!-- Ordinary Application (non-view) configuration) --> 
+<!-- Ordinary Application (non-view) configuration) -->
 
   <include package="zope.app.component" />
   <include package="zope.app.security" />
@@ -15,7 +15,7 @@
 
   <serviceType
      id="SQLDatabaseConnections"
-     interface="zope.app.interfaces.rdb.IConnectionService" 
+     interface="zope.app.interfaces.rdb.IConnectionService"
      />
 
   <content class="zope.app.rdb.ZopeConnection">
@@ -67,19 +67,19 @@
   <adapter
       factory="zope.app.copypastemove.ObjectMover"
       provides="zope.app.interfaces.copypastemove.IObjectMover"
-      permission="zope.ManageContent" 
+      permission="zope.ManageContent"
       for="*" />
 
   <adapter
       factory="zope.app.copypastemove.ObjectCopier"
       provides="zope.app.interfaces.copypastemove.IObjectCopier"
-      permission="zope.ManageContent" 
+      permission="zope.ManageContent"
       for="*" />
 
   <adapter
       factory="zope.app.copypastemove.NoChildrenObjectCopier"
       provides="zope.app.interfaces.copypastemove.INoChildrenObjectCopier"
-      permission="zope.ManageContent" 
+      permission="zope.ManageContent"
       for="zope.app.interfaces.content.folder.IFolder" />
 
   <adapter


=== Zope3/src/zope/app/introspector.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/introspector.py:1.8	Sat Jun 21 17:21:58 2003
+++ Zope3/src/zope/app/introspector.py	Tue Jun 24 14:58:11 2003
@@ -113,9 +113,13 @@
         methods = []
         attributes = []
         if interface is not None:
-            namesAndDescriptions = interface.namesAndDescriptions()
+            namesAndDescriptions = list(interface.namesAndDescriptions())
             namesAndDescriptions.sort()
             for name, desc in namesAndDescriptions:
+                # XXX According to Jim, Introspector is going away soon
+                # to be replaced with something else, so just add
+                # 'removeAllProxies' for now
+                desc = removeAllProxies(desc)
                 if hasattr(desc, 'getSignatureString'):
                     methods.append((desc.getName(),
                                     desc.getSignatureString(),
@@ -125,7 +129,7 @@
 
             for base in interface.getBases():
                 bases.append(base.__module__+'.'+base.__name__)
-            desc = str(interface.__doc__)
+            desc = str(interface.getDoc())
         return [Iname, bases, desc, methods, attributes]
 
     def getExtends(self):
@@ -140,5 +144,4 @@
         for name, interface in getServiceDefinitions(self.context):
             if self.context.extends(interface):
                 service.append(str(name))
-        print service
         return service