IMHO it would be best to not have deprecated methods in the tab completion to start with.
However, its not trivial to find out that something is deprecated. Of course you can easily check for the decorator, but a method could also end up throwing a deprecation warning because it calls a deprecated method. Or call the deprecation warning in the method body.
Maybe you could write at the TOP of the docstring:
DEPRECATED
Or even make the deprecation decorator prepend that to the docstring
automatically?
+1 for having a decorator for deprecation (and for it automatically updating the docstring), rather than having to explicitly call the deprecation explicitly (I believe the only thing we have currently is the @rename_keyword). If a method calls a deprecated function, then something isn't being doctested (properly).
+1 for changing the output for deprecated functions/methods/classes on tab completion, but -1 on removing them altogether.
--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/tD8tHOp3q1I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
On Wednesday, September 24, 2014 10:10:22 AM UTC-5, Volker Braun wrote:IMHO it would be best to not have deprecated methods in the tab completion to start with.
I strongly disagree with this as it defeats half the purpose of deprecation. If suddenly a function/method I was working with (and had a long name that I never remembered or was not lazy enough to type out) suddenly doesn't appear under tab completion. I would think the function is no longer in Sage and would have no idea what it was replaced by.