Re: [sage-devel] Re: Printing deprecated functions in gray ?
Then maybe Witt should just include designs.WittDesign in the tab completion. On Thursday, September 25, 2014 12:37:33 PM UTC+1, Nathann Cohen wrote: > > > Presumably the old method is being replaced by one that is better named. > So > > if you can't recall the old name then it should be easier to find the > new > > one than finding the old one and then following the deprecation link. Of > > course that assumes that the deprecation was actually an improvement ;-) > > Not necessarily. WittDesign was replaced by designs.WittDesign. If you > are not used to those "tab" things you will not find it immediately. > > Nathann > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Printing deprecated functions in gray ?
> Presumably the old method is being replaced by one that is better named. So > if you can't recall the old name then it should be easier to find the new > one than finding the old one and then following the deprecation link. Of > course that assumes that the deprecation was actually an improvement ;-) Not necessarily. WittDesign was replaced by designs.WittDesign. If you are not used to those "tab" things you will not find it immediately. Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Printing deprecated functions in gray ?
On Wednesday, September 24, 2014 10:44:10 PM UTC+1, Travis Scrimshaw wrote: > > 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. > Presumably the old method is being replaced by one that is better named. So if you can't recall the old name then it should be easier to find the new one than finding the old one and then following the deprecation link. Of course that assumes that the deprecation was actually an improvement ;-) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Printing deprecated functions in gray ?
> But it is not the case for deprecated_callable_import, which is the one I > use. So I will update that one. Done at http://trac.sagemath.org/ticket/17038 Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
Re: [sage-devel] Re: Printing deprecated functions in gray ?
Update: the feature already exists for deprecated_function_alias, eg: designs.BalancedIncompleteBlockDesign? But it is not the case for deprecated_callable_import, which is the one I use. So I will update that one. Nathann On 25 September 2014 11:45, Nathann Cohen wrote: > Hello ! > > +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. >> > > I will try to modify the deprecation decorators to update the doc, but I > have no idea how to change anything related to tab completion. Especially > if colors are involved. > > Nathann > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Printing deprecated functions in gray ?
Hello ! +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. > I will try to modify the deprecation decorators to update the doc, but I have no idea how to change anything related to tab completion. Especially if colors are involved. Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Printing deprecated functions in gray ?
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. > > 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. > +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. Best, Travis -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
[sage-devel] Re: Printing deprecated functions in gray ?
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. On Wednesday, September 24, 2014 3:54:16 PM UTC+1, Nathann Cohen wrote: > > Hello everybody ! > > Here I was deprecating stuff, and I wondered: could we make it explicit in > the tab-completion that some functions are deprecated ? > > In particular, I have to (I am not proud) replace a (now deprecated) > designs.orthogonal_array with a (note the terminal 's') > designs.orthogonal_arrays. > > Wouldn't it be cool if typing "designs." would display the first > deprecated function in light gray, so as to mean "it's disappearing" ? > > I was wondering how to prevent users from reading the (long) documentation > of this function before noticing that it is deprecated when they call it, > only to see how the new one works. > > Clearly not critical :-P > > Nathann > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.