The extensions manager UI now reports what extension dependencies will be automatically enabled when a particular extension is enabled. Extensions know about their dependencies through their setup.py's install_requires setting.
Looking at this a little more carefully, I think this could me more efficient:
That way, we avoid using len() when all we care about is non-empty, and in the fallback case we don't render the nodelist.
Review request changed
Thanks for the tip - tested and works like a charm.
Just realized that the extension enabling one is based on this. You may want to use the --parent flag to post-review to specify the parent branches so that it's easier to review changes based on uncommitted changes.
I've decided to combine this review request with the one I filed here: http://reviews.reviewboard.org/r/1591/ (which did the enabling bit)
Instead of dealing with pkg_resources Requirement objects, developers must provide a "requires" list of extension_id's in their Extension to indicate that it relies upon another extension.
-ExtensionManager populates ExtensionInfo.requirements as a list of required Extension classes
-In the UI, only required extensions that are disabled are reported to the user. So, if B relies on A, and A is already enabled, B will not report that it will automatically enable A.
Extension manager UI now reports dependencies that will be automatically enabled
Extension dependencies automatically enable, and the Extension Manager informs the user that this will happen.