[merge] add symbol_versioning.deprecated_in to make deprecation strings
Martin Pool
mbp at canonical.com
Wed Apr 30 09:59:58 BST 2008
It bothers me a bit that we have to add new variables to
symbol_versioning on every release and import them from each module that
uses deprecations. This lets callers instead just pass the version
tuple:
@deprecated_method(deprecated_in((1, 5, 0)))
I thought about changing the deprecated decorators or the warnings
themselves to pass structured information. But using a string lets us
raise other kinds of warnings and this is a small compatible change from
what we currently have. This is also still fairly easy to grep for if
you want to e.g. kill everything older than 1.0. (Indeed it's somewhat
easier, being decimal numbers.)
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20080430-deprecated_in.diff
Type: text/x-diff
Size: 5956 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080430/21aae883/attachment.bin
More information about the bazaar
mailing list