doc/images/tutos-photowebsite_index-before.png
author |
Philippe Pepiot <philippe.pepiot@logilab.fr> |
|
Fri, 24 Aug 2018 17:19:02 +0200 |
branch | 3.26 |
changeset 12349 |
7e670235174f |
parent 10491 |
c67bcee93248
|
permissions |
-rw-r--r-- |
Fix possible double import of cubes
For a new-style cube, if we import "cubicweb_<name>" and then import
"cubes.<name>", the cube will be imported twice. cubes.<name> and then
cubicweb_name is ok though...
When using pyramid, we try to find which cube define a "includeme" by importing
them with the name "cubes.<name>", so we (possibly ?) double import all new-style cube.
This case may also occur in tests with PyramidCWTest.
Touching the import loader to fix this scares me, so let's fix this by testing
"cubicweb_<name>" *before* "cubes.name" (for old style cubes, importing
cubicweb_<name> raise ImportError).