Personal tools
You are here: Home Blog Plone 3 : cleanup left over interfaces

Plone 3 : cleanup left over interfaces

Filed under:
Package to cleanup zope persistent registry released

In Plone 3 sites, even when you uninstalled add-ons properly, interfaces were left over in persistent registries.

Before 3.5.2, zope.interface was broken : it did not remove keys when unregistering adapters or unsubscribing subscribers.

This leads to nasty bugs when the code that defined those interfaces is removed from the system.

The cleanup_zope_persistent_registry package defines a function that cleans up those leftover interfaces. It must be called on a site manager, instance of PersistentComponents like the local site manager of a Plone site:

from zope.component import getSiteManager
from cleanup_zope_persistent_registry import cleanup_leftovers

site_manager = getsitemanager(my_plone_site)
cleanup_leftovers(site_manager)

Enjoy

Document Actions