[Zope3-checkins] CVS: Zope3/src/zope/app/site - service.py:1.4 servicecontainer.py:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Mar 13 23:03:32 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/site
In directory cvs.zope.org:/tmp/cvs-serv28004/src/zope/app/site

Modified Files:
	service.py servicecontainer.py 
Log Message:
Remove backward-compatibility fixups. They were all way older than 2 months
and backward.zcml was not included anyways. It is not included though.


=== Zope3/src/zope/app/site/service.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/site/service.py:1.3	Sat Mar 13 16:03:21 2004
+++ Zope3/src/zope/app/site/service.py	Sat Mar 13 23:03:31 2004
@@ -330,9 +330,6 @@
         return self.name + " Service"
 
 
-# XXX Pickle backward compatability
-ServiceConfiguration = ServiceRegistration
-
 # Fssync stuff
 
 _smattrs = (
@@ -345,47 +342,3 @@
     def extra(self):
         obj = removeAllProxies(self.context)
         return AttrMapping(obj, _smattrs)
-
-#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
-
-
-def fixup(event):
-    database = event.database
-    connection = database.open()
-    app = connection.root().get('Application')
-    if app is None:
-        # no old site
-        return
-
-    try:
-        sm = app.getSiteManager()
-    except ComponentLookupError:
-        # no old site
-        return
-
-    if hasattr(sm, 'next'):
-        # already done
-        return
-    
-    print "Fixing up sites that don't have next pointers"
-    fixfolder(app)
-    get_transaction().commit()
-    connection.close()
-    
-fixup = Subscriber(fixup)
-
-def fixfolder(folder):
-    try:
-        sm = folder.getSiteManager()
-    except ComponentLookupError:
-        pass # nothing to do
-    else:
-        sm._setNext(folder)
-        sm.subSites = ()
-        for name in ('Views', 'Adapters'):
-            if name in sm._bindings:
-                del sm._bindings[name]
-
-    for item in folder.values():
-        if IPossibleSite.providedBy(item):
-            fixfolder(item)


=== Zope3/src/zope/app/site/servicecontainer.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/site/servicecontainer.py:1.1	Sat Mar 13 10:21:47 2004
+++ Zope3/src/zope/app/site/servicecontainer.py	Sat Mar 13 23:03:31 2004
@@ -20,7 +20,6 @@
 
 from transaction import get_transaction
 from zope.app.container.contained import Contained
-from zope.app.event.function import Subscriber
 from zope.app import zapi
 from zope.app.site.interfaces import IPossibleSite, ISite
 from zope.component.exceptions import ComponentLookupError
@@ -60,36 +59,3 @@
             self,
             ISite,
             zope.interface.directlyProvidedBy(self))
-
-def fixup(event):
-        database = event.database
-        connection = database.open()
-        app = connection.root().get('Application')
-        if app is None or ISite.providedBy(app):
-            # No old data
-            return
-        print "Fixing up sites that don't implement ISite"
-        fixfolder(app)
-        get_transaction().commit()
-        connection.close()
-
-fixup = Subscriber(fixup)
-
-def fixfolder(folder):
-    if ISite.providedBy(folder):
-        # No need to do more, the conversion already happened!
-        return
-    try:
-        folder.getSiteManager()
-    except ComponentLookupError:
-        pass # nothing to do
-    else:
-        zope.interface.directlyProvides(
-            folder,
-            ISite,
-            zope.interface.directlyProvidedBy(folder),
-            )
-
-    for item in folder.values():
-        if IPossibleSite.providedBy(item):
-            fixfolder(item)




More information about the Zope3-Checkins mailing list