Opened 9 years ago

Last modified 9 years ago

#13109 closed enhancement

Rewrite deprecation to use trac ticket numbers — at Version 3

Reported by: vbraun Owned by: mvngu
Priority: major Milestone: sage-5.2
Component: doctest coverage Keywords:
Cc: cremona, kini, was, jason, kcrisman Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by vbraun)

As discussed on, change the deprecation function to the new arguments

deprecation(msg, trac_number) 

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.


Change History (3)

comment:1 Changed 9 years ago by kcrisman

I just have to say it, please don't hurt me!

Definition:     sage.misc.misc.deprecation(message, version=None)
       Issue a deprecation warning.
          * "message" - an explanation why things are deprecated and by
            what it
               should be replaced.
          * "version" - (optional) on which version and when the
               occurred. Please put there the version of sage at the time
               of deprecation.

That's incompatible with the current one, as far as I understand the ways optional args with defaults work. So will the syntax for the deprecation function have to be ... deprecated?

comment:2 Changed 9 years ago by vbraun

That depends on whether the barber of Seville shaves himself or not.

comment:3 Changed 9 years ago by vbraun

  • Description modified (diff)

The first patch changes the deprecation syntax. The second adds the trac numbers to all deprecations in the Sage library. The third fixes all doctests.

Note: See TracTickets for help on using tickets.