[patch] deprecation warnings branch
Andrew Bennetts
andrew at canonical.com
Mon Jan 9 00:46:43 GMT 2006
On Fri, Jan 06, 2006 at 12:05:43AM +1100, Robert Collins wrote:
[...]
>
> > Help on function decorated_function in bzrlib:
> >
> > bzrlib.get_bzr_revision = get_bzr_revision(*args, **kwargs)
> > If bzr is run from a branch, return (revno,revid) or None.
> >
> > This function was deprecated in version 0.7.
>
>
> Changing the method signature will require hacking vm bytecode or
> dynamically generating the decorated-method method. While aspect
> orientated shit is interesting, its not interesting enough for me to
> care right now. I dont think it matters though, as these are
> *deprecated* functions anyway.
FWIW, see
http://wiki.python.org/moin/PythonDecoratorLibrary#head-b672f56dfbd9809e81572d719e230b2e9f053c0d
I think the library that links to
(http://www.phyast.pitt.edu/~micheles/python/decorator.zip) is does the nasty
stuff needed to correct the signature, probably using code similar to
http://mail.python.org/pipermail/python-dev/2005-May/053449.html
(Interestingly enough, the recipe before that on the wiki page is for a
'deprecated' decorator...)
-Andrew.
More information about the bazaar
mailing list