[patch] deprecation warnings branch
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 5 16:33:21 GMT 2006
Robert Collins wrote:
> On Thu, 2006-01-05 at 22:53 +1100, Robert Collins wrote:
>
>>Hi. seeking a +1:
>
>
> Updated patch attached, and pushed to the branch. This changes:
>
>
>
>>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.
>
>
> To
>
>
>>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.
>
I think you cut and pasted the wrong thing. You now get:
Help on function get_bzr_revision in bzrlib:
>
>
> 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.
>
> Rob
>
The only thing I miss is seeing the function signature. Specifically,
just doing help(bzrlib.get_bzr_revsion) gives:
Help on function get_bzr_revision in module bzrlib.symbol_versioning:
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.
Obviously the module is wrong, and the arguments have disappeared.
But I think you are genuinely correct that it isn't worth it for
functions which we are deprecating. We are specifically saying 'don't
use these', so it doesn't matter if they are a little harder to use. :)
So +1 for deprecation, and the code seems clean.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060105/c499775b/attachment.pgp
More information about the bazaar
mailing list