default plugin path

Marius Kruger amanic at gmail.com
Tue Jan 27 08:14:45 GMT 2009


2009/1/27 Aaron Bentley <aaron at aaronbentley.com>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
> > On Mon, 2009-01-26 at 22:51 -0500, Aaron Bentley wrote:
> >> Robert Collins wrote:
> >>> On Mon, 2009-01-26 at 22:12 -0500, Aaron Bentley wrote:
> >>>> Robert Collins wrote:
> >>>>>>> What harmful effect will setting the path have?
> >>>>>> It will cause bzrlib clients to load bzr plugins from the system
> path,
> >>>>>> which will be incompatible with their local version of bzrlib.
> >>>>> If I put a patch forward that doesn't spuriously add the system
> python
> >>>>> to the path
> >>>> Adding the system python to the path is *right* for many cases.  It's
> >>>> also *wrong* for many cases.  Therefore the client should decide.
> >>> Alternatively, which is what I'm proposing, the clients that consider
> it
> >>> wrong can just change it.
> >> The client won't know that they consider it wrong until a bunch of their
> >> users break simultaneously due to a package upgrade.
> >
> > I really don't follow here. Can you unpack what you mean?
>
> The developer has a local copy of bzr 1.8 and bzrtools 1.8 specifically
> for the application "FooBaz", so that version skew doesn't affect him.
> He also has bzr and bzrtools 1.8 system-wide via the PPA.
>
> He thinks he's importing bzrtools for the local bzr, but he's actually
> importing the system-wide bzrtools.  He releases FooBaz.  A bunch of
> people install it.
>
> bzr and bzrtools 1.9 are released, the PPAs are updated, the users get
> new system bzr and bzrtools.  Now FooBaz is importing bzrtools 1.9, but
> 1.9 expects bzrlib to support lazy command registration.  FooBaz's
> bzrlib has 1.8, so importing bzrtools starts giving AttributeErrors.
>
> Since everyone's got bzrtools 1.9 via the PPA, not only is the developer
> affected, but most of his users, too.
>

FWIW, I'm in a similar situation where I need different versions of pluggins
for testing

Robert, can't you do :
import bzrlib.plugin
bzrlib.plugin.load_plugin('xyz')


my 2c
marius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090127/77b38dbc/attachment-0001.htm 


More information about the bazaar mailing list