VersionedPluginManager

Role

Defines the basic interface for a plugin manager that also keeps track of versions of plugins

API

class yapsy.VersionedPluginManager.VersionedPluginInfo(plugin_name, plugin_path)

Gather some info about a plugin such as its name, author, description...

setVersion(vstring)
class yapsy.VersionedPluginManager.VersionedPluginManager(decorated_manager=None, categories_filter={'Default': <class 'yapsy.IPlugin.IPlugin'>}, directories_list=None, plugin_info_ext='yapsy-plugin')

Handle plugin versioning by making sure that when several versions are present for a same plugin, only the latest version is manipulated via the standard methods (eg for activation and deactivation)

More precisely, for operations that must be applied on a single named plugin at a time (getPluginByName, activatePluginByName, deactivatePluginByName etc) the targetted plugin will always be the one with the latest version.

Note

The older versions of a given plugin are still reachable via the getPluginsOfCategoryFromAttic method.

getLatestPluginsOfCategory(category_name)

DEPRECATED(>1.8): Please consider using getPluginsOfCategory instead.

Return the list of all plugins belonging to a category.

getPluginsOfCategoryFromAttic(categ)

Access the older version of plugins for which only the latest version is available through standard methods.

loadPlugins(callback=None, callback_after=None)

Load the candidate plugins that have been identified through a previous call to locatePlugins.

In addition to the baseclass functionality, this subclass also needs to find the latest version of each plugin.

setCategoriesFilter(categories_filter)

Set the categories of plugins to be looked for as well as the way to recognise them.

Note: will also reset the attic toa void inconsistencies.