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

 {{{
 sage: from sage.misc.misc import deprecated_function_alias
 sage: a = deprecated_function_alias(sqrt, "Version ?")
 sage: a(5)
 ...
 DeprecationWarning: (Since Version ?) a is deprecated. Please use sqrt
 instead.
 sqrt(5)
 }}}

 which is misleading because the user would expect to find `sqrt` in the
 same module as `a`.

 With this patch

 {{{
 sage: from sage.misc.misc import deprecated_function_alias
 sage: a = deprecated_function_alias(sqrt, "Version ?")
 sage: a(5)
 ...
 DeprecationWarning: (Since Version ?) a is deprecated. Please use
 sage.functions.other.sqrt instead.
 sqrt(5)
 }}}

 There's no change in deprecating methods.

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