#11768: Get source code for parent/element classes of categories
-----------------------------------------+----------------------------------
Reporter: SimonKing | Owner: jason
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: misc | Resolution:
Keywords: sources dynamic class | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
-----------------------------------------+----------------------------------
Comment (by SimonKing):
OK, done, ready for review!
Not that the coverage script complains. But I think the coverage script
has a bug, since it reports:
{{{
simon@linux-sqwp:~/SAGE/debug/sage-5.5.rc0/devel/sage> ../../sage
-coverage sage/misc/sageinspect.py
----------------------------------------------------------------------
sage/misc/sageinspect.py
ERROR: Please add a `TestSuite(s).run()` doctest.
SCORE sage/misc/sageinspect.py: 60% (26 of 43)
Missing documentation:
* foo(x, a=')"', b={not (2+1==3):
* __init__(self):
* tokeneater(self, type, token, srow_scol, erow_ecol, line):
* foo(x, a=')"', b={(2+1):
* foo(x, a='\')"', b={not (2+1==3):
* dummy' + _grep_first_pair_of_parentheses(source) + ':\n return'
try: return _sage_getargspec_from_ast(proxy) except SyntaxError: # To fix
trac #10860. See #11913 for more information. return None elif
isinstance(obj,functools.partial):
* test_funct(x,y):
* create_set_partition_function(letter, k):
* __cinit__(self):
* object pyobject(self):
* __init__(self, ring, gens, coerce=True):
* test1(a, b=2):
* test3(b, # 12 a=2):
* __init__(self, x=None, base=0):
* test1(a, b=2):
* test3(b, # 12 a=2):
Missing doctests:
* _getblock(lines):
Possibly wrong (function name doesn't occur in doctests):
* dummy' + source[beg:] + '\n return' return
tuple(_sage_getargspec_from_ast(proxy)) except Exception: try: # Try to
parse just the arguments as a Python argspec. proxy = 'def dummy' +
_grep_first_pair_of_parentheses(source) + ':\n return' return
tuple(_sage_getargspec_from_ast(proxy)) except Exception: raise
ValueError, "Could not parse cython argspec" def sage_getfile(obj):
}}}
First bug: It expects a `TestSuite.run()` test, but there is no class
defined for which this would make sense.
Second bug: The `dummy' + source[beg:] + '\n return' return
tuple(_sage_getargspec_from_ast(proxy))...` thingy.
Apply trac11768_source_of_dynamic_class.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11768#comment:36>
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.