I have just implemented a solution to the ImportSpy problem.
ImportSpy used ihooks to track imported modules, in order to reload
those modules with AutoReloadingAppServer. The problem was that using
ihooks could raise problems if you used Cheetah templates or imported
modules like Kid from zipped Python eggs, since these new importers are
not compatible with ihooks.
I have tackled the problem from two sides:
First, ImportSpy now uses new (PEP 302) import hooks instead of ihooks
if available (i.e. since Python 2.3). The compatibility issues should be
solved now. Second, everything from ImportSpy except the import hook
itself has been sourced out to a new ImportManager module. Loading and
using ImportSpy can not be completely suppressed by setting
"UseImportSpy" to False in Application.config (or would AppServer.config
be better?). If ImportSpy is not used, sys.modules is polled instead. By
default, this is set to True, so we get the old behavior.
I will fix two or three more bugs on my list today and then make a 0.9.1
beta release. Is this ok?