I'm working on zope.app.module.ZopePersistentModuleImporter. As noted in zodbcode.module.PersistentModuleImporter.__doc__, if the persistent module registry which is consulted on import queries a persistent site manager then the site manager must be activated before being queried or a circular import problem occurs when the ZODB attempts to import the globals necessary to activate the site manager. The site manager will, however, eventually be deactivated, by a transaction.abort() for example. So I'm looking for a way that the importer can know whether or now it's being called as a part of activating the site manager. I've written (and attached diffs for) a very ugly function that inspects the frame stack to detect if the site manager is being activated just to demonstrate what I'm looking for. Is there a way to ask an object if it's being activated? Or what might be a better approach to solving this problem? Ross