[rfc] better deprecation warnings (was Re: warning on FC5 with

Martin Pool mbp at canonical.com
Sun Jan 14 04:47:15 GMT 2007


bzr 0.13)
Reply-To: 
In-Reply-To: <58b84f8e0701131844h6c56321j909d96a21206a55f at mail.gmail.com>

On 14 Jan 2007, TK Soh <teekaysoh at gmail.com> wrote:
> I just updated bzr to 0.13 on my FC5 box using with yum, but received
> some warning messages. Should this be an issue with FC5 or bzr? How do
> I fix this? Thanks.
> 
> [tksoh at localhost ~]$ bzr version
> /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/__init__.py:20:
> DeprecationWarning: Modifying DEFAULT_IGNORE was deprecated in version
> 0.9. Consider using bzrlib.ignores.add_unique_user_ignores or
> bzrlib.ignores.add_runtime_ignores
>  DEFAULT_IGNORE.append('./.shelf')
> /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/__init__.py:21:
> DeprecationWarning: Modifying DEFAULT_IGNORE was deprecated in version
> 0.9. Consider using bzrlib.ignores.add_unique_user_ignores or
> bzrlib.ignores.add_runtime_ignores
>  DEFAULT_IGNORE.append('./.bzr-shelf*')
> Bazaar (bzr) 0.13.0
> Using python interpreter: /usr/bin/python
> Using python standard library: /usr/lib/python2.4
> Using bzrlib: /usr/lib/python2.4/site-packages/bzrlib

As Alexander says, the immediate fix is to update bzrtools, but it is
not completely obvious that you should do this.  (Later versions of
bzrtools will give a warning if they're out of date, but I think that is
specific to them.)

One thing would be to get more plugins to declare what version of bzr
they support, and warn if there is a mismatch.  But that would require
them all to be updated every month when we release, and probably most of
them won't need substantive changes.

So instead we could try to assume the plugin will work, but then give a
better error if it won't: if there is a DeprecationError, we could look
at the source of the warning, and say that the plugin likely needs to be
upgraded, for example:

  /usr/lib/python2.4/site-packages/bzrlib/plugins/bzrtools/__init__.py:21:
  DeprecationWarning: Modifying DEFAULT_IGNORE was deprecated in version
  0.9. Consider using bzrlib.ignores.add_unique_user_ignores or
  bzrlib.ignores.add_runtime_ignores
   DEFAULT_IGNORE.append('./.bzr-shelf*')
  This probably means that the bzrtools plugin must be upgraded to
  work with bzr 0.14pre.

(Or some better text.)

-- 
Martin



More information about the bazaar mailing list