Hi deprecation experts,

The current way to deprecate a function that has changed name is:

        old_func = deprecated_function_alias(new_func, "Sage version")

which, upon calling old_func, takes care of printing a deprecation message

        "(Since Sage version) old_func is deprecated. Please use
        new_func instead."

and then executes new_func. Now, if new_func is in a different module than old_func, and if new_func is not imported by sage.all, the message becomes misleading and the user will have a hard time finding where new_func has been put.

Of course, this could be handled using the standard deprecation function, but I would suggest instead that deprecated_function_alias print the full path of new_func, inculding its module part, whenever

        old_func.__module__ != new_func.__module__

This is an easy one line change in sage.misc.misc. What do you think?

Luca

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to