class SiteViewComponents(BaseGlobalComponents): def _init_registries(self): # This is why this class is needed: we can't work with a # regular AdapterRegistry because it wants to do funny things # with __bases__. self.adapters = VerifyingAdapterRegistry() self.utilities = VerifyingAdapterRegistry() if HAS_FIVE_LSM: self.utilities.LookupClass = registry.FiveVerifyingAdapterLookup self.utilities._createLookup() self.utilities.__parent__ = self if HAS_FIVE_LSM: def registeredUtilities(self): for ((provided, name), (component, info)) in self._utility_registrations.iteritems(): yield UtilityRegistration(self, provided, name, registry._wrap(component, self), info)