[patch] deprecation warnings branch

John Arbash Meinel john at arbash-meinel.com
Thu Jan 5 21:56:32 GMT 2006


Robert Collins wrote:
> On Thu, 2006-01-05 at 10:33 -0600, John Arbash Meinel wrote:
> 
> 
>>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:
> 
> 
> Oh, I missed the wrong module. I'll fix that trivially (same as
> __name__)
> 
> 
>>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. :)
> 
> 
> Right. Separate issue though, @needs_read_lock and @needs_write_lock
> have the same issues.
> 
> 
>>So +1 for deprecation, and the code seems clean.
> 
> 
> Thanks, Current version in integration, and I'll have up a module fixing
> one asap.
> 
> Rob
> 

So how does staticmethod and classmethod do it? Do they cheat because
they are C code? Are there any other standard decorators that we could
try and figure out the correct actions?

I'm thinking that we probably could create a decorator function (like
you did with _populate_decorated), which could be used by any decorator
that we end up creating.

Then we would only have to implement whatever convoluted logic once, and
reuse it on any decorator we create.

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/e2b05614/attachment.pgp 


More information about the bazaar mailing list