[Zope-Checkins] SVN: Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/ Move Globals-stuffing to correct point.
Tres Seaver
tseaver at palladion.com
Sat Dec 27 00:28:35 EST 2008
Log message for revision 94375:
Move Globals-stuffing to correct point.
Changed:
U Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/App/startup.py
U Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/Startup/__init__.py
-=-
Modified: Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/App/startup.py
===================================================================
--- Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/App/startup.py 2008-12-27 05:28:15 UTC (rev 94374)
+++ Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/App/startup.py 2008-12-27 05:28:34 UTC (rev 94375)
@@ -46,11 +46,49 @@
app = None
startup_time = asctime()
+def stuff_Globals():
+ # Stuff BBB names into the Globals module
+ import Globals # to set data
+
+ import TreeDisplay
+ Globals.TreeDisplay = TreeDisplay
+
+ import App.Common
+ Globals.package_home = App.Common.package_home
+ Globals.attrget = App.Common.attrget
+ Globals.Dictionary = App.Common.Dictionary
+
+ from Persistence import Persistent
+ from Persistence import PersistentMapping
+ Globals.Persistent = Persistent
+ Globals.PersistentMapping = PersistentMapping
+
+ from App.class_init import default__class_init__
+ from App.class_init import ApplicationDefaultPermissions
+
+ Globals.InitializeClass = default__class_init__
+
+ from App.special_dtml import HTML
+ from App.special_dtml import HTMLFile
+ from App.special_dtml import DTMLFile
+ Globals.HTML = HTML
+ Globals.HTMLFile = HTMLFile
+ Globals.DTMLFile = DTMLFile
+
+ from App.Dialogs import MessageDialog
+ Globals.MessageDialog = MessageDialog
+
+ from App.ImageFile import ImageFile
+ Globals.ImageFile = ImageFile
+
+
def startup():
from App.PersistentExtra import patchPersistent
import Globals # to set / fetch data
patchPersistent()
+ stuff_Globals() # XXX should this be optional?
+
global app
# Import products
Modified: Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/Startup/__init__.py
===================================================================
--- Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/Startup/__init__.py 2008-12-27 05:28:15 UTC (rev 94374)
+++ Zope/branches/tseaver-no_globals_imports/lib/python/Zope2/Startup/__init__.py 2008-12-27 05:28:34 UTC (rev 94375)
@@ -36,42 +36,6 @@
logger = logging.getLogger("Zope")
started = False
-def stuff_Globals():
- # Stuff BBB names into the Globals module
- import Globals # to set data
-
- import TreeDisplay
- Globals.TreeDisplay = TreeDisplay
-
- import App.Common
- Globals.package_home = App.Common.package_home
- Globals.attrget = App.Common.attrget
- Globals.Dictionary = App.Common.Dictionary
-
- from Persistence import Persistent
- from Persistence import PersistentMapping
- Globals.Persistent = Persistent
- Globals.PersistentMapping = PersistentMapping
-
- from App.class_init import default__class_init__
- from App.class_init import ApplicationDefaultPermissions
-
- Globals.InitializeClass = default__class_init__
-
- from App.special_dtml import HTML
- from App.special_dtml import HTMLFile
- from App.special_dtml import DTMLFile
- Globals.HTML = HTML
- Globals.HTMLFile = HTMLFile
- Globals.DTMLFile = DTMLFile
-
- from App.Dialogs import MessageDialog
- Globals.MessageDialog = MessageDialog
-
- from App.ImageFile import ImageFile
- Globals.ImageFile = ImageFile
-
-
def get_starter():
check_python_version()
if sys.platform[:3].lower() == "win":
@@ -86,8 +50,6 @@
# Don't allow any code to call start_zope() twice.
return
- stuff_Globals() # XXX should this be optional?
-
starter = get_starter()
starter.setConfiguration(cfg)
starter.prepare()
More information about the Zope-Checkins
mailing list