[Python-checkins] r65505 - in doctools/branches/0.4.x/sphinx: application.py ext/autodoc.py

georg.brandl python-checkins at python.org
Mon Aug 4 22:16:35 CEST 2008


Author: georg.brandl
Date: Mon Aug  4 22:16:35 2008
New Revision: 65505

Log:
Backport fixes found in trunk test.


Modified:
   doctools/branches/0.4.x/sphinx/application.py
   doctools/branches/0.4.x/sphinx/ext/autodoc.py

Modified: doctools/branches/0.4.x/sphinx/application.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/application.py	(original)
+++ doctools/branches/0.4.x/sphinx/application.py	Mon Aug  4 22:16:35 2008
@@ -165,7 +165,7 @@
         return listener_id
 
     def disconnect(self, listener_id):
-        for event in self._listeners:
+        for event in self._listeners.itervalues():
             event.pop(listener_id, None)
 
     def emit(self, event, *args):

Modified: doctools/branches/0.4.x/sphinx/ext/autodoc.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/ext/autodoc.py	(original)
+++ doctools/branches/0.4.x/sphinx/ext/autodoc.py	Mon Aug  4 22:16:35 2008
@@ -252,6 +252,8 @@
         # classes without __init__ method?
         if obj is None or obj is object.__init__:
             return ''
+    if inspect.isbuiltin(obj) or inspect.ismethoddescriptor(obj):
+        return ''
     argspec = inspect.getargspec(obj)
     if what in ('class', 'method') and argspec[0] and \
        argspec[0][0] in ('cls', 'self'):


More information about the Python-checkins mailing list