#8244: Annoying warnings when building the HTML reference manual
-----------------------------+----------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.3
Component: documentation | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by mpatel):
The following seems to remove the "arg is not a Python function" warnings:
{{{
#!diff
--- autodoc.py.origg 2010-02-18 15:51:38.000000000 -0800
+++ autodoc.py 2010-02-18 17:03:58.000000000 -0800
@@ -1005,7 +1005,16 @@ class MethodDocumenter(ClassLevelDocumen
else:
return None
else:
- argspec = inspect.getargspec(self.object)
+ # The check above misses ordinary Python methods in Cython
+ # files.
+ try:
+ argspec = inspect.getargspec(self.object)
+ except TypeError:
+ if (inspect.ismethod(self.object) and
+ self.env.config.autodoc_builtin_argspec):
+ argspec =
self.env.config.autodoc_builtin_argspec(self.object.im_func)
+ else:
+ return None
if argspec[0] and argspec[0][0] in ('cls', 'self'):
del argspec[0][0]
return inspect.formatargspec(*argspec)
}}}
Should we copy `autodoc.py` to `SAGE_DOC/common/sage_autodoc.py`, make all
of our changes in the latter, and add the custom extension in
`SAGE_DOC/common/conf.py`?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8244#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.