OrderedDict data structure in bzrlib?

Vincent Ladeuil vila+bzr at canonical.com
Tue Sep 20 12:57:29 UTC 2011


>>>>> Kirill Müller <mail at kirill-mueller.de> writes:

    >> There is this: http://pypi.python.org/pypi/ordereddict
    > Gordon,

    > thank you, this would be a good option. What would be the best way to
    > include this dependency into the bzr-rewrite plugin? I can only think of
    > copying te required modules, but there might be better ways.

Just catch the import error and display a warning that such and such
modules are required for this feature in the plugin to work.

That's often called a 'soft' dependency, 'pycurl' is a soft dependency
for bzr, it's used when present but we issue a warning (or may be just a
note in the .bzr.log file) when it's not installed.

At packaging times, add such and such module in the required/optional
dependencies.

        Vincent

P.S.: Get in touch with the plugin maintainers to check that this
approach is ok with them though.

P.P.S.: In case they disagree, you can still define you *own* plugin and
import the parts you're interested in from the 'rewrite' plugin.



More information about the bazaar mailing list