cubicweb #3610472 fix adjust_sys_path() implementation [open]
CubicWebConfiguration.adjust_sys_path() inserts apphome to sys.path (cf. http://hg.logilab.org/master/cubicweb/file/cbc46f94081d/cwconfig.py#l1002 ) and it has side effects on all the registry construction.
Consider the following layout in your cube:
The adjust_sys_path() mentioned above will insert cubes/mycube in sys.path. Later, when modules are loaded to build the registry, logilab.common.modutils will therefore load file1.py as views.file1 rather than cubes.mycube.views.file1. But at this point, if file2 is loaded and imports file1 with the following (expected) statement:
from cubes.mycube.views.file1 import foo
file1 will be reimported rather than picked in sys.modules cache leading to potential class duplicates and inconsistencies
|done in||<not specified>|
|closed by||<not specified>|