Lack of deprecation period for short option changes

John Arbash Meinel john at arbash-meinel.com
Wed Jan 10 19:52:44 GMT 2007


James Westby wrote:
...

> 
>> Please don't try to go behind my back like that.
> 
> I'm not sure of the value of telling the simple package user of the
> difference when it requires action on the maintainer's part to fix it.
> Maybe it would be fixed quicker as they would bug the maintainer, but
> there were bugs open in the BTS about it for a long while.
> 
> James
> 

This is a standard python warning, so you can filter it using python
warnings semantics.

There are several things that can be done. If you want to do it in
python, you could edit the 'bzr' front end script to add:

import warnings
warnings.simplefilter('ignore', DeprecationWarning)

That will ignore all DeprecationWarnings rather than printing it to the
user.

You can also do it from a command line level.

python -Wignore /usr/bin/bzr

Will ignore all warnings.

Or to ignore only DeprecationWarnings

python -Wignore:'':DeprecationWarning

I think you can even change the #! line to make it:

#!/usr/bin/python -Wignore:'':DeprecationWarning

I don't think it works with 'env', but you could try

#!/usr/bin/env python -Wignore:'':DeprecationWarning


So all of this to say that you don't have to hack the source code to
ignore deprecation warnings. It can be done at a much higher level
thanks to python's deprecation support.

John
=:->



More information about the bazaar mailing list