#13109: Rewrite deprecation to use trac ticket numbers
--------------------------------+-------------------------------------------
       Reporter:  vbraun        |         Owner:  mvngu       
           Type:  enhancement   |        Status:  needs_review
       Priority:  major         |     Milestone:  sage-5.1    
      Component:  doctest       |    Resolution:              
       Keywords:                |   Work issues:              
Report Upstream:  N/A           |     Reviewers:              
        Authors:  Volker Braun  |     Merged in:              
   Dependencies:                |      Stopgaps:              
--------------------------------+-------------------------------------------

Old description:

> As discussed on https://groups.google.com/d/topic/sage-
> devel/I12IeaFlE7g/discussion, change the deprecation function to the new
> arguments
> {{{
> deprecation(trac_number, message)
> }}}
> where both arguments are mandatory.  Once this code is in Sage, one
> can deduce every possible thing discussed above in this thread from
> the trac number.   The deprecation warning can produce the URL of the
> trac ticket.
>
> Analogous changes are made to `deprecated_function_alias` and
> `deprecated_callable_import`. Finally, the
> `@rename_keyword(deprecated="sage version string", ...)` decorator is
> changed to
> {{{
> @rename_keyword(deprecation=<trac_number>, ...)
> }}}
>
> Apply
>   * [attachment:trac_13109_deprecation.patch]
>   * [attachment:trac_13109_ticket_numbers.patch]
>   * [attachment:trac_13109_fix_doctests.patch]
>   * [attachment:trac_13109_documentation.patch]
>
> This ticket also fixes #8073, #8546.

New description:

 As discussed on https://groups.google.com/d/topic/sage-
 devel/I12IeaFlE7g/discussion, change the deprecation function to the new
 arguments
 {{{
 deprecation(trac_number, message)
 }}}
 where both arguments are mandatory.  Once this code is in Sage, one
 can deduce every possible thing discussed above in this thread from
 the trac number.   The deprecation warning can produce the URL of the
 trac ticket.

 Analogous changes are made to `deprecated_function_alias` and
 `deprecated_callable_import`. Finally, the
 `@rename_keyword(deprecated="sage version string", ...)` decorator is
 changed to
 {{{
 @rename_keyword(deprecation=<trac_number>, ...)
 }}}

 Apply
   * [attachment:trac_13109_deprecation.patch]
   * [attachment:trac_13109_ticket_numbers.patch]
   * [attachment:trac_13109_fix_doctests.patch]
   * [attachment:trac_13109_documentation.patch]

 This ticket also fixes #8073.

--

Comment (by kcrisman):

 Very comprehensive work.
 * I first have to say that [attachment:trac_13109_ticket_numbers.patch] is
 extremely impressive.  I guess that relieves any concerns about
 deprecating the deprecation functionality.
 * Do we want to use the `:trac:` markup anywhere here?  Of course, that
 doesn't show up as nicely in the command line, so perhaps not.
 * So will it be up the end user to determine whether a given item is
 nearing the end of its deprecation life?  I do like that part of #8546.
 It could be really tedious to check whether a number of things are due.
 Why not have that as another (optional) argument?  Maybe there is a good
 reason I'm just missing, certainly this syntax is easier for the person
 writing the code.
 * Also, what happens if Trac goes the way of ... Mercurial for sagenb?
 * I notice that `Foo` also has terrible doctesting, in addition to having
 several ill-conceived methods.  But in general I really like it - very
 clear but also not dry.
 * That said, there should be an example of how to doctest the deprecation,
 because it won't look like what comes out, but rather
 {{{
 doctest:...: DeprecationWarning:
 ]}}
   as you know from the presumably tedious work on the doctest patch.

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