#9976: Decorated functions/methods have generic signature in documentation
--------------------------------+-------------------------------------------
Reporter: jsrn | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: documentation | Keywords: sphinx, documentation, cython
inspection
Author: jsrn, Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by jsrn):
Replying to [comment:62 SimonKing]:
> Building the docs, I get some warnings:
>
> {{{
> docstring of
sage.rings.padics.padic_ZZ_pX_CA_element.pAdicZZpXCAElement:6: (ERROR/3)
Unexpected indentation.
> docstring of sage.rings.padics.padic_capped_relative_element:5:
(ERROR/3) Unexpected indentation.
> docstring of
sage.rings.polynomial.multi_polynomial_ring_generic.MPolynomialRing_generic:18:
(WARNING/2) Literal block expected; none found.
> }}}
>
> But worse is that the arguments of the `groebner_basis` method of
multivariate ideals are not correctly provided: It is `(*args,**kwds)`
again!!! Can you check whether this used to be fine with your original
patch?
>
> Anyway, the reason for the failure is that the `cached_method` decorator
does not provide `_sage_argspec_` yet (it will be, by #11115). I assume
that one can inspect the source code, though.
>
> So, it still needs work, but not today.
>
> My plan for tomorrow:
>
> * Fix the warnings above (I already succeeded with two of them)
> * Fix the argument extraction in sageinspect.
Back again :-)
No, groebner_basis has never worked with my patch; for my patch to work,
it requires that the decorator use @sage_wraps on the wrapping function
which is returned. cached_method doesn't do this. As far as I can see,
however, it should be possible to make (the non-Cython version of)
cached_method use sage_wraps; this would remove some lines in _common_init
and replace it with a @sage_wraps somewhere. You have been working on this
so what do you say?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:64>
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.