[patch] deprecation warnings branch
Robert Collins
robertc at robertcollins.net
Thu Jan 12 04:25:29 GMT 2006
On Thu, 2006-01-12 at 14:54 +1100, Jamie Wilkinson wrote:
> This one time, at band camp, Robert Collins wrote:
> >On Wed, 2006-01-11 at 19:27 +1100, Jamie Wilkinson wrote:
> >> This one time, at band camp, Robert Collins wrote:
> >> >@deprecated_function(zero_seven)
> >> >def get_bzr_revision():
> >> > """If bzr is run from a branch, return (revno,revid) or None."""
> >> > import bzrlib.errors
> >> > ...
> >> >
> >> >results in the following pydoc output:
> >> >Help on function decorated_function in bzrlib:
> >> >
> >> >bzrlib.get_bzr_revision = decorated_function(*args, **kwargs)
> >> > If bzr is run from a branch, return (revno,revid) or None.
> >> >
> >> > This function was deprecated in version 0.7.
> >> >
> >> >I'm not sure how to change the 'bzrlib.get_bzr_revision =
> >> >decorated_function(*args, **kwargs)' line - that seems a little ugly to
> >> >me right now.
> >>
> >> FWIW this also affects the output of build-api, all decorated functions
> >> appear without documentation and their signature as (self, *args, *kwargs),
> >> which suck because after tracing the structure in the browser you have to go
> >> open the file in an editor anyway :) (Better go learn ctags I guess :)
> >
> >the docstrings should be correct on the deprecated though, because of
> >the work done.
>
> Parse error :)
>
> Do you mean, they should be correct on your deprecated branch, but possibly
> still broken on bzr.dev? If so, that clears things up for me :)
The warnings patch is in mainline AFAIK, its definately in integration -
so the docstrings should be correct for bzr.dev or integration. But only
on deprecated functions, not on random decorated functions.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060112/bddfb05e/attachment.pgp
More information about the bazaar
mailing list