Help text change notice for plugin authors

Martin (gzlist) gzlist at googlemail.com
Thu Jul 8 16:11:50 BST 2010


Bazaar 2.2 can be run with docstrings stripped as user-visible help is
now explicitly marked with a `__doc__ =` prefix. The goal is to finish
the release without having to change any plugins, but there are a few
things to be aware of.

The aim of docstring stripping is to reduce the size of the Python
bytecode files and thus the cold startup time of bzr when installed
with bundled dependencies. For systems with a package manager and a
separate Python, this doesn't apply as the normal bytecode files will
be used.

The help texts in question for plugins are the package module
docstring, and the docstring of any cmd objects in the plugin. These
can be changed to include the prefix now if you choose. The plugin
developer guide has been updated with this information, and you can
use the 2.2b3 source release and `python -OO` (after deleting any
existing pyo files) if you want to test your plugin now.

The original 2.2b3 windows installer was built with docstrings
stripped, and though this shouldn't apply to bundled plugins a
combination of issues (bug 177500 and bug 600803) broke them. With
those fixes, the remaining problem is if users combine the all-in-one
installer with additional plugins without an install step to get the
right bytecode files. If compiled by a docstring stripping bzr.exe the
plugin will lack help. Am currently looking at building the
library.zip without docstrings but making the executable preserve
them, if that's not possible the windows installer will be released
with the docstring stripping backed out, as with the latest 2.2b3
build.

Martin



More information about the bazaar mailing list