#12958: Fix sageinspect to better support old style classes
-------------------------------------+--------------------------------------
       Reporter:  nthiery            |         Owner:  mvngu       
           Type:  defect             |        Status:  needs_review
       Priority:  major              |     Milestone:  sage-5.1    
      Component:  documentation      |    Resolution:              
       Keywords:  sageinspect        |   Work issues:              
Report Upstream:  N/A                |     Reviewers:              
        Authors:  Nicolas M. ThiƩry  |     Merged in:              
   Dependencies:                     |      Stopgaps:              
-------------------------------------+--------------------------------------

Comment (by nthiery):

 Replying to [comment:4 SimonKing]:
 > I am not sure what the two doc tests are supposed to demonstrate, as
 they just test against errors being raised.

 The error is worst without the patch :-)

 > Anyway, with #11791 (plus dependencies plus something more, so, someone
 else should cross verify), I get
 > {{{
 > sage: from sage.misc.sageinspect import sage_getsourcelines
 > sage: class Foo: pass
 > ....:
 > sage: sage_getsourcelines(Foo)  # Is it intended to fix this?
 > Traceback (most recent call last):
 > ...
 > IOError: could not find class definition
 > sage: import inspect
 > sage: inspect.findsource(Sets.ParentMethods) # Why is Python's inspect
 module tested??
 > Traceback (most recent call last):
 > ...
 > IOError: could not find class definition
 > sage: L = sage_getsourcelines(Sets.ParentMethods)  # works just fine

 Cool.

 > The code line that is changed in your patch is not touched by #11791.
 So, how does it actually change things?

 From the brief look I had at your path, the line is still there, but
 the logic has changed a bit before. I don't know, and honestly I don't
 want to spend more time on this. I guess I'll simply change #12953 to
 simply not test introspection too deeply since it will get better
 soon. Then it won't depend on this ticket and/or #11971.

 Feel free to mark this one as a dup if you want!

 Cheers,
                           Nicolas

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12958#comment:5>
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.

Reply via email to