import_fascist doesn't work too well with zope.configuration

Bug #277274 reported by Francis J. Lacoste on 2008-10-02
Affects Status Importance Assigned to Milestone
Launchpad itself

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
Curtis Hovey (sinzui) on 2009-10-09
tags: added: tech-debt
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers