#17847: Cython: embed signatures in docstrings
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.6
      Component:  cython             |   Resolution:
       Keywords:                     |    Merged in:
        Authors:                     |    Reviewers:
Report Upstream:  Reported           |  Work issues:
  upstream. No feedback yet.         |       Commit:
         Branch:                     |  9cd65e13a5ab68dc0da005240e2686bb6b63bda2
  u/jdemeyer/ticket/17847            |     Stopgaps:
   Dependencies:  #17851             |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:9 SimonKing]:
 > Replying to [comment:6 jdemeyer]:
 > > The attached branch mostly works, but there are still issues in
 `src/sage/misc/sageinspect.py`
 > >
 > > In particular, I need help with navigating this maze:
 > > {{{
 > > #!python
 > > def _sage_getsourcelines_name_with_dot(object):
 > > }}}
 >
 > That's for dynamic classes, hence, it is pure Python, and the embedding
 in docstrings isn't relevant here.
 Apparently it ''is'' relevant, since I'm getting doctest failures in this
 function:
 {{{
 sage -t src/sage/misc/nested_class_test.py
 **********************************************************************
 File "src/sage/misc/nested_class_test.py", line 215, in
 sage.misc.nested_class_test.TestNestedParent
 Failed example:
     print sage_getsource(E)
 Exception raised:
     Traceback (most recent call last):
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 488, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 850, in compile_and_execute
         exec(compiled, globs)
       File "<doctest sage.misc.nested_class_test.TestNestedParent[5]>",
 line 1, in <module>
         print sage_getsource(E)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/misc/sageinspect.py", line 1641, in sage_getsource
         t = sage_getsourcelines(obj, is_binary)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/misc/sageinspect.py", line 1895, in sage_getsourcelines
         return obj._sage_src_lines_()
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/structure/dynamic_class.py", line 392, in _sage_src_lines
         return sage_getsourcelines(doccls)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/misc/sageinspect.py", line 1921, in sage_getsourcelines
         return _sage_getsourcelines_name_with_dot(obj)
       File "/usr/local/src/sage-git/local/lib/python2.7/site-
 packages/sage/misc/sageinspect.py", line 1755, in
 _sage_getsourcelines_name_with_dot
         raise IOError('could not find class definition')
     IOError: could not find class definition
 **********************************************************************
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17847#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to