Bug: user plugin directory resolves to .none instead of .DataLab_v1
Component: datalab.config / datalab.plugins
Affected version: 1.3.0 (develop, unreleased — last tag is v1.2.2)
Type: regression, introduced by the SigimaX extraction
Severity: medium — no data loss, but user plugins silently stop being discovered
Symptom
The default user plugin directory changed from ~/.config/.DataLab_v1/plugins to ~/.config/.none/plugins (on Windows: %USERPROFILE%\.DataLab_v1\plugins → %USERPROFILE%\.none\plugins).
Consequences:
- plugins previously installed by the user are no longer loaded;
- the path shown in Plugins > Configure plugins... points to the wrong directory, so newly installed plugins land in
.none too;
- a stray
~/.config/.none/ directory is created on every startup.
Root cause
datalab/plugins.py resolves its default path at import time:
PLUGINS_DEFAULT_PATH = get_config_path("plugins")
if not osp.isdir(PLUGINS_DEFAULT_PATH):
os.makedirs(PLUGINS_DEFAULT_PATH)
get_config_path() delegates to the guidata UserConfig backend held in sigimax.utils.conf.CONF. UserConfig.__init__ sets self.name = "none", and UserConfig.get_path() resolves — and creates — ~/.config/.{self.name}/…. The name only becomes correct once set_application() is called.
Before the SigimaX extraction the configuration was initialized while the config module itself was imported, so the name was always bound early enough. Now initialization is explicit and deferred (initialize() / ensure_initialized()), and it runs after datalab.app has imported datalab.gui.main → datalab.plugins. At that point CONF.name is still "none", so the plugin path is frozen to ~/.config/.none/plugins.
The failure is silent: no exception, no warning, just a wrong (and freshly created) directory.
Bug: user plugin directory resolves to
.noneinstead of.DataLab_v1Component:
datalab.config/datalab.pluginsAffected version: 1.3.0 (
develop, unreleased — last tag is v1.2.2)Type: regression, introduced by the SigimaX extraction
Severity: medium — no data loss, but user plugins silently stop being discovered
Symptom
The default user plugin directory changed from
~/.config/.DataLab_v1/pluginsto~/.config/.none/plugins(on Windows:%USERPROFILE%\.DataLab_v1\plugins→%USERPROFILE%\.none\plugins).Consequences:
.nonetoo;~/.config/.none/directory is created on every startup.Root cause
datalab/plugins.pyresolves its default path at import time:get_config_path()delegates to the guidataUserConfigbackend held insigimax.utils.conf.CONF.UserConfig.__init__setsself.name = "none", andUserConfig.get_path()resolves — and creates —~/.config/.{self.name}/…. The name only becomes correct onceset_application()is called.Before the SigimaX extraction the configuration was initialized while the config module itself was imported, so the name was always bound early enough. Now initialization is explicit and deferred (
initialize()/ensure_initialized()), and it runs afterdatalab.apphas importeddatalab.gui.main→datalab.plugins. At that pointCONF.nameis still"none", so the plugin path is frozen to~/.config/.none/plugins.The failure is silent: no exception, no warning, just a wrong (and freshly created) directory.