On Nov 23, 2009, at 9:23 AM, Florent Hivert wrote:

>      Hi Jason
>
>>> Speaking about deprecation, I posted a patch #7515 which does two  
>>> things:
>>>
>>> 1 - Add an option called ``version`` do deprecation where you can  
>>> put the
>>> information on since which version of sage this thing was  
>>> deprecated:
>>>
>>>        sage: def bar():
>>>        ...    sage.misc.misc.deprecation("The function bar is  
>>> removed.",
>>>        ...         'Sage Version 4.2, Release Date: 2009-10-24')
>>>        sage: bar()
>>>        doctest:...: DeprecationWarning: (Since Sage Version 4.2,  
>>> Release Date: 2009-10-24) The function bar is removed.
>>>
>>> Note: This does noting than gluing the two strings, but this  
>>> prompt the writer
>>> of the function to insert this information at the right place. For  
>>> backward
>>> compatibility, This is only optional.
>>>
>
>> Of course, when writing code, we have no idea what date the next  
>> release
>> would be, and sometimes are mistaken about the release that the patch
>> will be included in as well.  How should we take care of this
>> patch-updating problem?
>
> I've been lazy to raise this problem on the lists. Sorry for that.
>
> Is this really a problem a warning tells that a function is  
> deprecated since
> version 3.1 whereas it was really deprecated in version 3.2 ?  If  
> yes a
> possible solution is the following:

It's deprecated as soon as a decision is made.

> Add in the file version.py a dictionary which contains all the  
> previously
> released version:
>
>    past_release_date = {
>        "4.1" : '4395-08-23',
>       "4.2" ...
>      }

Or use the revision control to automatically find the date for any  
given release.

- Robert

-- 
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