#11585: Make deprecated_function_alias print the whole module path when it 
differs
from the original
----------------------------+-----------------------------------------------
    Reporter:  defeo        |         Owner:  jason                     
        Type:  enhancement  |        Status:  needs_work                
    Priority:  minor        |     Milestone:  sage-4.7.2                
   Component:  misc         |    Resolution:                            
    Keywords:  deprecation  |   Work_issues:  startuptime               
    Upstream:  N/A          |      Reviewer:  Rob Beezer, Florent Hivert
      Author:  Luca De Feo  |        Merged:                            
Dependencies:               |  
----------------------------+-----------------------------------------------

Comment(by defeo):

 Ouch! This single line is responsible for it:

 {{{
 module = inspect.getmodule(inspect.stack()[1][0])
 }}}

 In fact, there's about 40 calls to `deprecated_function_alias` in
 4.7.1.rc2; on my laptop:

 {{{
 sage: import inspect
 sage: timeit('inspect.stack()[1][0]')
 25 loops, best of 3: 18.4 ms per loop
 }}}

 The fact is, I don't know how to obtain the name of the module where the
 call to `deprecated_function_alias` happened without inspecting the stack.
 Any ideas?

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