axw/pushy — Issue #30: auto-importer doesn't support modules not imported by their parent
Author: axw
Created: 2012-02-07 15:01:10+00:00
State: open
Labels: Fix Committed, Medium

You have a package "a", and a module within called "b", i.e.:-
a/__init__.py
a/b.py
a/__init__.py does NOT import b.py.

The auto-importer currently is a bit dumb, assuming that the parent imports the child. Based on this assumption, a auto-import of "a.b" works as follows:
getattr(getattr(conn.modules, "a"), "b")

This will fail if a doesn't import b.