Removed unused generations utility
authorThierry Florac <tflorac@ulthar.net>
Sun, 11 Mar 2018 10:51:19 +0100
changeset 465 6ac65e44ba0d
parent 464 78beb60914cd
child 466 ba4e4416841a
Removed unused generations utility
src/pyams_content/site.py
--- a/src/pyams_content/site.py	Sun Mar 11 10:50:16 2018 +0100
+++ b/src/pyams_content/site.py	Sun Mar 11 10:51:19 2018 +0100
@@ -19,37 +19,12 @@
 # import interfaces
 from hypatia.interfaces import ICatalog
 from pyams_content.shared.common.interfaces import IWfSharedContent
-from pyams_utils.interfaces.site import ISiteGenerations
 from zope.intid.interfaces import IIntIds
-from zope.site.interfaces import INewLocalSite
 
 # import packages
 from pyams_utils.container import find_objects_providing
-from pyams_utils.registry import utility_config, set_local_registry, get_utility
-from pyams_utils.site import check_required_utilities, site_factory
-from pyramid.events import subscriber
-from zope.intid import IntIds
-
-
-REQUIRED_UTILITIES = ((IIntIds, '', IntIds, 'Internal IDs'),)
-
-
-@subscriber(INewLocalSite)
-def handle_new_local_site(event):
-    """Create a new IntIds when a site is created"""
-    site = event.manager.__parent__
-    check_required_utilities(site, REQUIRED_UTILITIES)
-
-
-@utility_config(name='PyAMS base', provides=ISiteGenerations)
-class BaseGenerationsChecker(object):
-    """PyAMS base generations checker"""
-
-    generation = 1
-
-    def evolve(self, site, current=None):
-        """Check for required utilities"""
-        check_required_utilities(site, REQUIRED_UTILITIES)
+from pyams_utils.registry import set_local_registry, get_utility
+from pyams_utils.site import site_factory
 
 
 def site_index(request):