tags 658593 + patch
thanks

attached a patch
import_by_name now returns name, obj, parent instead of obj, name
get_documenter uses that parent.

I'm not too sure about hunk #3 though. Needs review.
Index: pymvpa2-2.0.0/doc/sphinxext/autosummary/generate.py
===================================================================
--- pymvpa2-2.0.0.orig/doc/sphinxext/autosummary/generate.py    2012-02-05 
19:50:10.000000000 +0000
+++ pymvpa2-2.0.0/doc/sphinxext/autosummary/generate.py 2012-02-05 
19:55:03.085202497 +0000
@@ -107,7 +107,7 @@
         ensuredir(path)
 
         try:
-            obj, name = import_by_name(name)
+            name, obj, parent = import_by_name(name)
         except ImportError, e:
             warn('[autosummary] failed to import %r: %s' % (name, e))
             continue
@@ -123,7 +123,7 @@
         f = open(fn, 'w')
 
         try:
-            doc = get_documenter(obj)
+            doc = get_documenter(obj, parent)
 
             if template_name is not None:
                 template = template_env.get_template(template_name)
@@ -138,7 +138,7 @@
                 items = []
                 for name in dir(obj):
                     try:
-                        if get_documenter(getattr(obj, name)).objtype == typ:
+                        if get_documenter(getattr(obj, name), parent).objtype 
== typ:
                             items.append(name)
                     except AttributeError:
                         warn("[autosummary] problem accessing attribute "
@@ -215,7 +215,7 @@
     See `find_autosummary_in_lines`.
     """
     try:
-        obj, real_name = import_by_name(name)
+        real_name, obj, parent = import_by_name(name)
         lines = pydoc.getdoc(obj).splitlines()
         return find_autosummary_in_lines(lines, module=name, filename=filename)
     except AttributeError:

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to