#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: John Palmieri, Karl-Dieter
Crisman
Authors: Volker Braun | Merged in:
Dependencies: #12544 | 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.v2.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.v3.patch]
This ticket also fixes #8073, #8546.
--
Comment (by vbraun):
Thanks for copy-editing the developer guide section, looks great. With
your patch I got a doctest failure in `coding_in_python.rst` so I combined
the final example into one doctestable example. I don't understand why
this wasn't doctested before, but it passes now.
Since the deprecation is moved to its own module I didn't need any error
checking - any old code failed with an import error. But for the future
its probably good to check that the ticket number is a number. I've
amended the `trac_13109_deprecation.patch` with error checking. The change
is in [[attachment:trac_number_check.diff]]
If you agree with these final changes then our work here will be finished
;-)
Patchbot:
apply trac_13109_deprecation.patch, trac_13109_ticket_numbers.patch,
trac_13109_fix_doctests.patch, trac_13109-documentation.v3.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13109#comment:24>
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.