Updated plugins beahavior according to lodelContext
Now discover is run when we want to know the list of installed plugins.
+ bugfix in module name generation (only in the constructor) to take care
of possible subdirs
The exact same conditionnal statement throwing error if ptype is unknown
in Plugin.register() is already executed by
MetaPlugType.type_from_name(), which is called right after it. Guessing
which class should be concerned by such a check, I ended up removing it
in Plugin.
- Replaced some "hidden" import with LodelContext.expose_modules calls
- in some functions of Setting, Plugin, validator
- in loader.py (temporary version)
In this state the tests runs (151 success), I'm able to run an instance (from debian package using slim) in MONOSITE mode and in MULTISITE mode by creating and loading a context in the loader.
- Child classes where not cleared when Plugin.clear() was called. Now child classes implements a clear_cls() method to clear a Plugin child class
- When discovering plugins if during a is_plugin_dir() check we import two times in the same virtual module name, all non existing attributes values are taken from prvious imported file (the bug was on plugin_type when webui was imported just before dummy, then dummy was an interface)
Created a new class LodelSession to handle session datas
Created an automatic wrapper to acces to session handler plugin function throug SessionHandlerPlugin class methods
Bugfixes done for plugins. The plugin type is store in __plugin_type___ and not in __type__
Implements both Plugin child classes handling extensions and session handling.
Modified the settings plugin preload piece of code. It is now adapted to the new plugins organisation.
Each Plugin child classes provides a confspec indicating where the plugin list is stored in configuration.
- DatasourcePlugin implmentation as child class of lodel.plugin.plugins.Plugin
- moved methods about datasource initialisation from LeObject to DatasourcePlugin ( _init_datasource(), plugin_name(), _get_ds_connection_conf() ...)