import_fascist doesn't work too well with zope.configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Launchpad itself |
Low
|
Unassigned |
Bug Description
zope.configuration uses __import__ to load modules referenced in ZCML and introspect the stack to see if the error was caused because the module doesn't exist (in which case it re-raises the error) otherwise, it raises an ConfigurationError.
Since the import_fascist works by replacing and delegating to the original __import__, it introduce an additional stack frame and it makes zope.configuration re-raise all ImportError as ConfigurationError.
That is especially bad in directives that tries first to module relative to another (like browser:page) since all these directives will fail when used with full module names.
As a work-around we added a special case for the browser:page directive to the import fascist, but the import fascist should ideally be made to be more transparent to such introspection.
Changed in launchpad-foundations: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: tech-debt |